Skip to main content
Glama
Samotpravil MCP

Samotpravil MCP

by dkanster

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/


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

npx -y samotpravil-mcp@latest

Cursor — .cursor/mcp.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)

Артефакт

Ссылка

Спека OpenAPI

https://spec.samotpravil.ru/openapi.yaml

Node-клиент API

npm i samotpravil

Пример SaaS (два ключа TX/MKT)

dkanster/samotpravil-example

Python MCP (pip)

mailganer-samotpravil-mcp

Smithery

daniil-kozemiakin/samotpravil

Cursor Directory

samotpravil-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 у уже поставивших сам не обновляется.


Related MCP server: grok-api-mcp

Что внутри

Компонент

Кол-во

Нужен ключ

Docs tools

4

нет

Core typed API

9 + api_request

SAMOTPRAVIL_API_KEY

Python SDK parity

28

SAMOTPRAVIL_API_KEY

Auto tools (api_*)

~16

SAMOTPRAVIL_API_KEY

Postman maintainer

4

POSTMAN_API_KEY

MCP Resources

9

нет

MCP Prompts

5

нет

Итого: ~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_email

POST /api/v1/smtp_send

send_mail_v2

POST /api/v2/mail/send

get_delivery_status

GET /api/v2/issue/status (message_id или x_track_id)

get_package_status

GET /api/v2/package/status

search_stop_list

Поиск email в стоп-листах

add_stop_list_email / remove_stop_list_email

Стоп-лист (mail_from или domain)

validate_email

POST /api/v2/emails/validate/

list_allowed_domains

GET /api/v2/blist/domains

api_request

Generic 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_snapshot

Postman API → data/collection.snapshot.json

postman_diff_snapshot

Diff 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_parity

Python SDK → MCP tools

MCP Resources

URI

Содержимое

samotpravil://overview

Обзор API

samotpravil://endpoints

Индекс методов

samotpravil://endpoint/{slug}

Один метод

samotpravil://errors

Популярные ошибки

samotpravil://integration

SMTP, X-Track-ID, трекинг

samotpravil://sdk-mapping

Python 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_MODE

auto | live | snapshot

dry_run: true

Preview запроса без отправки

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


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

HTTP transport

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).

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

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

Спека: mailganer/samotpravil-smtp-api@1.0.0 · docs/SWAGGERHUB.md

Docusaurus preview

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

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

Discovery

Площадка

Ссылка

npm

https://www.npmjs.com/package/samotpravil-mcp

MCP Registry

https://registry.modelcontextprotocol.io

Smithery

smithery.yaml в корне — docs/PUBLISH.md

Официальный promo

docs/official/


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

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

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


Разработка

git clone https://github.com/dkanster/samotpravil-api-mcp.git
cd samotpravil-api-mcp
npm install && npm test && npm run dev
npm run setup-hooks   # optional: pre-commit (lint + test)
npm run lint          # ESLint
npm run pre-publish-check   # перед npm tag
npm run release-prepare      # pre-flight перед npm tag
npm run generate-tool-catalog
npm run scaffold-typed-tool send_package

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

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

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

Лицензия

MIT

Available Tools

58 tools
add_stop_list_emailA
Destructive

Добавить email в стоп-лист

Inputs: email (required), domain, dry_run, mail_from.

api_delete_v2_stop_list_export_tokenB
Destructive

DELETE /api/v2/stop-list/export/:token — Удалить задачу

Inputs: dry_run.

api_get_v1_get_fbl_reportC
Read-only

GET /api/v1/get_fbl_report — Отчёт о пожаловавшихся v1

Inputs: key, date, dry_run.

api_get_v1_get_smtp_issue_statC
Read-only

GET /api/v1/get_smtp_issue_stat — Сводный отчет за сутки v1

Inputs: key, date, dry_run.

api_get_v1_get_stop_reportC
Read-only

GET /api/v1/get_stop_report — Отчёт о недоставках v1

Inputs: key, date, dry_run.

api_get_v1_package_reportC
Read-only

GET /api/v1/package_report — Недоставки пакетной отправки v1

Inputs: id, key, dry_run.

api_get_v1_package_report_fblC
Read-only

GET /api/v1/package_report_fbl — Жалобы пакетной отправки v1

Inputs: key, dry_run, pack_id.

api_get_v1_package_statusC
Read-only

GET /api/v1/package_status — Статус отправки v1

Inputs: key, dry_run, pack_id.

api_get_v2_email_activityC
Read-only

GET /api/v2/email/activity — Активность

Inputs: email, dry_run.

api_get_v2_stop_list_export_tokenC
Read-only

GET /api/v2/stop-list/export/:token — Скачать стоп-лист

Inputs: dry_run.

api_get_v2_ticketsB
Read-only

GET /api/v2/tickets — Список обращений

Inputs: dry_run.

api_get_v2_tickets_idA
Read-only

GET /api/v2/tickets/:id/ — Отдельное обращение

Inputs: dry_run.

api_post_v2_email_checkC
Read-only

POST /api/v2/email/check — Проверить верстку

Inputs: body, checks, dry_run.

api_post_v2_emails_cleanC
Read-only

POST /api/v2/emails/clean/ — Стандартизация

Inputs: email, dry_run.

api_post_v2_ticketsC
Destructive

POST /api/v2/tickets — Создать обращение

Inputs: dry_run, message, subject, client_name, +1 more.

api_post_v2_tickets_idB
Destructive

POST /api/v2/tickets/:id/ — Обновить обращение

Inputs: dry_run, message, subject, client_name, +1 more.

api_post_v2_tickets_ipA
Destructive

POST /api/v2/tickets — Создать обращение на выделенный IP

Inputs: type, speed, region, cooment, +2 more.

api_requestB
Destructive

Generic HTTP к api.samotpravil.ru (safety flags, dry_run). Отключается через SAMOTPRAVIL_ALLOW_GENERIC_API=0.

Inputs: path (required), method (required), body, query, +1 more.

create_authkeyD
Destructive

POST /api/v2/authkey/create — WhiteLabel (Python SDK parity)

Inputs: blist_id (required), dry_run, check_ips, allowed_ips.

create_blistC
Destructive

POST /api/v2/blist/create — WhiteLabel (Python SDK parity)

Inputs: name (required), dry_run, webhook_url, webhook_active, +3 more.

domain_addC
Destructive

POST /api/v2/blist/domains/add (Python SDK parity)

Inputs: domain (required), dry_run.

domain_check_verificationD
Destructive

POST /api/v2/blist/domains/verify (Python SDK parity)

Inputs: domain (required), dry_run.

domain_removeC
Destructive

POST /api/v2/blist/domains/remove (Python SDK parity)

Inputs: domain (required), dry_run.

get_authkeyB
Read-only

GET /api/v2/authkey — WhiteLabel (Python SDK parity)

Inputs: dry_run.

get_blistC
Read-only

GET /api/v2/blist — WhiteLabel (Python SDK parity)

Inputs: blist_id (required), dry_run.

get_delivery_statusC
Read-only

GET /api/v2/issue/status по x_track_id

Inputs: dry_run, message_id, x_track_id.

get_endpointC
Read-only

Документация по методу API.

Inputs: name_or_path (required).

get_ext_statusC
Read-only

GET /api/v2/issue/ext_status — полная история статусов (Python SDK parity)

Inputs: dry_run, message_id, x_track_id.

get_fbl_report_by_dateC
Read-only

GET /api/v2/blist/report/fbl (Python SDK parity)

Inputs: date_to (required), date_from (required), limit, dry_run, +1 more.

get_fbl_report_by_issueD
Read-only

GET /api/v2/issue/report/fbl (Python SDK parity)

Inputs: issuen (required), limit, dry_run, cursor_next.

get_ip_infoC
Read-only

GET /api/v2/ip — WhiteLabel (Python SDK parity)

Inputs: dry_run.

get_issue_statD
Read-only

GET /api/v1/get_issue_stat (Python SDK parity)

Inputs: ids (required), dry_run.

get_non_delivery_by_dateC
Read-only

GET /api/v2/blist/report/non-delivery (Python SDK parity)

Inputs: date_to (required), date_from (required), limit, dry_run, +1 more.

get_non_delivery_by_issueD
Read-only

GET /api/v2/issue/report/non-delivery (Python SDK parity)

Inputs: issuen (required), limit, dry_run, cursor_next.

get_overviewC
Read-only

Обзор API СамОтправил.

Inputs: no named parameters.

get_package_statusD
Read-only

GET /api/v2/package/status

Inputs: issuen (required), dry_run.

get_statisticsD
Read-only

GET /api/v2/issue/statistics (Python SDK parity)

Inputs: date_to (required), date_from (required), limit, dry_run, +1 more.

get_unsubscribe_by_dateC
Read-only

GET /api/v2/blist/report/unsubscribe (Python SDK parity)

Inputs: date_to (required), date_from (required), limit, order, +2 more.

get_unsubscribe_by_issueD
Read-only

GET /api/v2/issue/report/unsubscribe (Python SDK parity)

Inputs: issuen (required), limit, order, dry_run, +1 more.

list_allowed_domainsC
Read-only

GET /api/v2/blist/domains

Inputs: dry_run.

list_endpointsC
Read-only

Список методов API.

Inputs: limit, category.

remove_stop_list_emailB
Destructive

Удалить email из стоп-листа

Inputs: email (required), domain, dry_run, mail_from.

search_docsC
Read-only

Поиск по документации API.

Inputs: query (required), limit.

search_stop_listA
Read-only

Поиск email в стоп-листах

Inputs: email (required), dry_run.

send_emailD
Destructive

POST /api/v1/smtp_send

Inputs: subject (required), email_to (required), email_from (required), params, +8 more.

send_mail_v2D
Destructive

POST /api/v2/mail/send

Inputs: subject (required), email_to (required), email_from (required), params, +7 more.

send_packageC
Destructive

POST /api/v1/add_json_package — массовая отправка (Python SDK parity)

Inputs: users (required), subject (required), name_from (required), email_from (required), +11 more.

send_package_xmlC
Destructive

GET /api/v1/add_package — XML-пакет по URL (Python SDK parity)

Inputs: url (required), dry_run.

stop_list_export_createC
Destructive

POST /api/v2/stop-list/export — создать задачу экспорта (Python SDK parity)

Inputs: dry_run.

stop_list_export_deleteC
Destructive

DELETE /api/v2/stop-list/export/{token} (Python SDK parity)

Inputs: token (required), dry_run.

stop_list_export_downloadC
Read-only

GET /api/v2/stop-list/export/{token} (Python SDK parity)

Inputs: token (required), dry_run.

stop_list_export_tasksC
Read-only

GET /api/v2/stop-list/export — список задач экспорта (Python SDK parity)

Inputs: status, dry_run.

stop_list_failedD
Read-only

GET /api/v2/stop-list/failed (Python SDK parity)

Inputs: limit, dry_run, cursor_next.

stop_list_fblC
Read-only

GET /api/v2/stop-list/fbl (Python SDK parity)

Inputs: limit, dry_run, cursor_next.

stop_list_unsubscribeC
Read-only

GET /api/v2/stop-list/unsubscribe (Python SDK parity)

Inputs: limit, dry_run, cursor_next.

stop_packageC
Destructive

GET /api/v1/package_stop — остановить пакет (Python SDK parity)

Inputs: package_id (required), dry_run.

update_blistC
Destructive

POST /api/v2/blist/update — WhiteLabel (Python SDK parity)

Inputs: blist_id (required), name, active, dry_run, +5 more.

validate_emailD
Destructive

POST /api/v2/emails/validate/

Inputs: email (required), dry_run.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.9/5.0

    Scored across 58 tools

    Disambiguation1/5

    Multiple tools have overlapping or identical purposes (e.g., send_email vs send_mail_v2, stop_list_export_delete vs api_delete_v2_stop_list_export_token, api_post_v2_tickets vs api_post_v2_tickets_ip). The presence of both SDK-parity and raw API wrapper functions creates redundant paths for the same operation, making it very difficult for an agent to determine which tool to use.

    Naming Consistency2/5

    The naming is a mix of descriptive snake_case (get_delivery_status), versioned names (send_mail_v2), and raw API-style names with HTTP verbs and version prefixes (api_get_v2_tickets_id). There is no consistent verb_noun pattern; the api_* group breaks the otherwise somewhat consistent snake_case convention, and versioning is applied haphazardly.

    Tool Count1/5

    With 58 tools, this server is severely overloaded. The count includes many redundant wrappers, meta-tools for documentation (list_endpoints, get_endpoint, search_docs), and near-duplicates of the same endpoint. This far exceeds a usable tool surface for an email delivery API, overwhelming agents with unnecessary choices.

    Completeness4/5

    The tool set covers a wide range of the email API domain: sending (email, packages), delivery status, stop-list management, reports, tickets, domain whitelist, IP info, and email validation. While there are some potential gaps (e.g., missing update for packages, no bulk update operations), the core lifecycle is well represented and an agent can accomplish most tasks without hitting dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessMostly unanswered

    Related MCP Connectors

    Related MCP Servers