Samotpravil MCP

io.github.dkansterPublished by GitHub account dkansterv1.8.0Updated Oct 24, 2026

MCP server for Samotpravil API — docs, typed tools, Python SDK parity, safety flags.

Overview

AI-generated overview

Local MCP server for the Samotpravil email API: lets an assistant read the API docs, send email and packages, and manage stop lists and domains.

What you can do
Search and read Samotpravil API documentation: overview, endpoint list, endpoint details, doc search, plus resources and prompts for integration, sending and delivery checks, without an API key. Send transactional email and packages, and check delivery or package status by message ID or track ID. Manage stop lists and allowed domains: search, add and remove addresses, validate emails, list allowed domains. Run Python SDK parity tools such as statistics, external status, stop-list export, domain add and authkey creation. Call any other API method through a generic request tool or auto-generated per-endpoint tools. Maintain the Postman collection: fetch it, sync a local snapshot, diff it and,
When to use it
Use it when you work with the Samotpravil email delivery service and want an assistant to look up its API, send transactional mail or packages, or manage stop lists and sender domains from the chat. The docs-only tools are useful even without an API key.
Requirements
Runs locally via npx (Node.js) or Docker; stdio by default, optional HTTP transport with host, port and bearer token settings. A Samotpravil account and API key in SAMOTPRAVIL_API_KEY are needed for API tools; there is no free test key, and sender domain verification is required. POSTMAN_API_KEY is only for the Postman maintainer tools. Network access to the Samotpravil API and documentation is required.
Before you install
Sending email and packages is a real, billable action: batch production sending is off by default (SAMOTPRAVIL_ALLOW_SEND=0), and READ_ONLY, ALLOW_MUTATIONS and ALLOW_GENERIC_API flags restrict writes. Stop-list, domain and authkey tools change account data. Secrets are passed by environment variable (SAMOTPRAVIL_API_KEY, POSTMAN_API_KEY, SAMOTPRAVIL_HTTP_AUTH_TOKEN); the README says secrets are masked in responses, but review before exposing the HTTP transport beyond localhost.

Installation

In SourceWeft

  1. Open Samotpravil MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Samotpravil MCP

[CI] [npm] [License: MIT]

MCP-сервер вокруг документации API СамОтправил и HTTP API api.samotpravil.ru.

Версия: 1.8.0 · npm: samotpravil-mcp · MCP Registry: io.github.dkanster/samotpravil-api-mcp · Smithery: smithery.yaml · Cursor Directory: .mcp.json

Хостинг: репозиторий временно в dkanster/samotpravil-api-mcp.
Планируется: переезд в org Samotpravil → @samotpravil/mcp — docs/ORG_MIGRATION.md.

Сервер подтягивает Postman-коллекцию с documenter (live + offline snapshot) и даёт агенту tools для поиска методов, вызова API и безопасных пресетов (READ_ONLY, dry_run). Имена typed tools совпадают с Python SDK samotpravil.

Экосистема: Postman → snapshot → MCP / OpenAPI / Docusaurus — docs/ECOSYSTEM.md · live preview: https://dkanster.github.io/samotpravil-api-mcp/


Быстрый старт

bash
npx -y samotpravil-mcp@latest

Cursor — .cursor/mcp.json:

json
{  "mcpServers": {    "samotpravil": {      "command": "npx",      "args": ["-y", "samotpravil-mcp@latest"],      "env": {        "SAMOTPRAVIL_API_KEY": "your_api_key_here",        "SAMOTPRAVIL_READ_ONLY": "1",        "SAMOTPRAVIL_ALLOW_SEND": "0"      }    }  }}

SAMOTPRAVIL_API_KEY опционален для docs-only tools. После правок: Settings → MCP → Reload.

Бесплатного тестового ключа нет: регистрация в ЛК → верификация домена отправителя → ключ в env. Пакетную боевую отправку по умолчанию не открываем (SAMOTPRAVIL_ALLOW_SEND=0).

Экосистема (рядом с MCP)

АртефактСсылка
Спека OpenAPIhttps://spec.samotpravil.ru/openapi.yaml
Node-клиент APInpm i samotpravil
Пример SaaS (два ключа TX/MKT)dkanster/samotpravil-example
Python MCP (pip)mailganer-samotpravil-mcp
Smitherydaniil-kozemiakin/samotpravil
Cursor Directorysamotpravil-api-mcp

Для SaaS сразу два API-ключа (разные стоп-листы и webhook URL) — см. пример выше.

Сценарии и конфиги для Claude / VS Code: docs/EXAMPLES.md

Cursor Directory

Каталог сообщества cursor.directory автодетектит MCP из корневого .mcp.json (дубль: mcp.json, манифест plugin.json). Первая отправка: cursor.directory/plugins/new → URL этого репозитория (вход GitHub/Google). В листинг не входят swagger-mcp и Postman maintainer.

Дальше править код и карточку — docs/PUBLISH.md § «Cursor Directory»: релиз npm по tag v*; карточку Directory не слать второй раз (дубли). Add to Cursor у уже поставивших сам не обновляется.


Что внутри

КомпонентКол-воНужен ключ
Docs tools4нет
Core typed API9 + api_requestSAMOTPRAVIL_API_KEY
Python SDK parity28SAMOTPRAVIL_API_KEY
Auto tools (api_*)~16SAMOTPRAVIL_API_KEY
Postman maintainer4POSTMAN_API_KEY
MCP Resources9нет
MCP Prompts5нет

Итого: ~59 tools ( +4 postman при POSTMAN_API_KEY).


Инструменты

Документация (без API-ключа)

ToolОписание
get_overviewАвторизация, SMTP, лимиты, категории
list_endpointsСписок всех методов API
search_docsПоиск по документации
get_endpointПодробности по методу

Typed API (нужен SAMOTPRAVIL_API_KEY)

ToolОписание
send_emailPOST /api/v1/smtp_send
send_mail_v2POST /api/v2/mail/send
get_delivery_statusGET /api/v2/issue/status (message_id или x_track_id)
get_package_statusGET /api/v2/package/status
search_stop_listПоиск email в стоп-листах
add_stop_list_email / remove_stop_list_emailСтоп-лист (mail_from или domain)
validate_emailPOST /api/v2/emails/validate/
list_allowed_domainsGET /api/v2/blist/domains
api_requestGeneric escape hatch

Python SDK parity (v1.3+)

Typed tools с именами как в PyPI-пакете samotpravil: send_package, get_statistics, get_ext_status, stop_list_export_create, domain_add, get_blist, create_authkey и др.

Полный список и маппинг: docs/EXAMPLES.md#python-sdk-parity · prompt python_sdk_parity

Postman maintainer (нужен POSTMAN_API_KEY)

ToolОписание
postman_get_collectionКоллекция из Postman API
postman_sync_snapshotPostman API → data/collection.snapshot.json
postman_diff_snapshotDiff Postman vs локальный snapshot
postman_search_requestsПоиск запросов в коллекции

Подробнее: docs/EXAMPLES.md#postman-tools

Auto tools

api_{method}_{path} — для HTTP-методов, не покрытых typed tools (legacy v1, tickets, email check/clean и т.д.).

MCP Prompts

PromptОписание
integration_overviewОбзор SMTP + HTTP + лимиты
send_transactionalЧеклист отправки письма
stop_list_workflowРабота со стоп-листами
check_deliveryСтатус по X-Track-ID / выпуску
python_sdk_parityPython SDK → MCP tools

MCP Resources

URIСодержимое
samotpravil://overviewОбзор API
samotpravil://endpointsИндекс методов
samotpravil://endpoint/{slug}Один метод
samotpravil://errorsПопулярные ошибки
samotpravil://integrationSMTP, X-Track-ID, трекинг
samotpravil://sdk-mappingPython SDK → MCP tools
samotpravil://changelogФрагмент CHANGELOG пакета
samotpravil://rate-limitsЛимиты API и отправки
samotpravil://api-wishlistПредложения по HTTP API (фрагмент)

Безопасность

EnvЭффект
SAMOTPRAVIL_READ_ONLY=1Только GET/HEAD
SAMOTPRAVIL_ALLOW_SEND=0Блок send/package
SAMOTPRAVIL_ALLOW_MUTATIONS=0Блок stop-list, доменов, authkey
SAMOTPRAVIL_ALLOW_GENERIC_API=0Отключить api_request
SAMOTPRAVIL_DOCS_MODEauto | live | snapshot
dry_run: truePreview запроса без отправки

Секреты (api_key, key= в query) маскируются в ответах MCP.


Транспорты и интеграции

HTTP transport

bash
npx samotpravil-mcp --http --port 3000# POST http://127.0.0.1:3000/mcp

Env: SAMOTPRAVIL_HTTP_HOST, SAMOTPRAVIL_HTTP_PORT, SAMOTPRAVIL_HTTP_AUTH_TOKEN, SAMOTPRAVIL_HTTP_JSON_LOG=1 (structured logs).

bash
docker build -t samotpravil-mcp .docker run --rm -p 3000:3000 -e SAMOTPRAVIL_API_KEY=... -e SAMOTPRAVIL_HTTP_AUTH_TOKEN=... samotpravil-mcp

OpenAPI + Swagger-MCP

bash
npm run export-openapi        # → data/openapi.yamlnpm run upload-swaggerhub     # SwaggerHub (нужен .env.swaggerhub)npm run prepare-swagger-mcp   # Vizioz/Swagger-MCP

Спека: mailganer/[email protected] · docs/SWAGGERHUB.md

Docusaurus preview

bash
npm run docusaurus:install && npm run docusaurus:start

Live: https://dkanster.github.io/samotpravil-api-mcp/ · docs/DOCS_SITE.md

Discovery

ПлощадкаСсылка
npmhttps://www.npmjs.com/package/samotpravil-mcp
MCP Registryhttps://registry.modelcontextprotocol.io
Smitherysmithery.yaml в корне — docs/PUBLISH.md
Официальный promodocs/official/

Конфигурация

Шаблон: .env.samotpravil.example

env
SAMOTPRAVIL_API_KEY=your_key_here# POSTMAN_API_KEY=...          # maintainer tools# SAMOTPRAVIL_READ_ONLY=1

Ключ API: https://samotpravil.ru/get-access

Полный список env: docs/EXAMPLES.md


Разработка

bash
git clone https://github.com/dkanster/samotpravil-api-mcp.gitcd samotpravil-api-mcpnpm install && npm test && npm run devnpm run setup-hooks   # optional: pre-commit (lint + test)npm run lint          # ESLintnpm run pre-publish-check   # перед npm tagnpm run release-prepare      # pre-flight перед npm tagnpm run generate-tool-catalognpm run scaffold-typed-tool send_package

Источник документации

Из git clone в свой проект

bash
/path/to/samotpravil-api-mcp/setup.sh .

Лицензия

MIT

Source: README.md at commit d55b156

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.8.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts