Skip to main content
Glama
mcp-plus-tard

mcp-plus-tard

by boreales

Plus Tard MCP

Python FastAPI MCP License

Подключите своего ИИ-ассистента (Claude, Cursor, n8n…) к Plus Tard для планирования публикаций в Facebook, Instagram, LinkedIn, X/Twitter, TikTok, Threads, Bluesky и Google My Business с помощью простого диалога.

Production endpoint : https://mcp.plus-tard.com/mcp/ Руководство пользователя : https://plus-tard.com/api-mcp


Демонстрация за 30 секунд

Вы : «Запланируй пост в Facebook на моей странице Boréales завтра в 10:00: "Hello le monde !"»

Claude автоматически вызывает:

  1. list_accounts → находит идентификатор Facebook для "Boréales"

  2. schedule_post(provider="facebook", page_id="…", planned_at="2026-05-05T10:00:00Z", text="Hello le monde !")

Plus Tard : ✅ Пост #1432 запланирован на 05/05/2026 в 10:00.


Related MCP server: posthive

Инструменты (5)

Инструмент

Описание

validate_api_key

Проверяет активность API-ключа и возвращает его метаданные.

list_accounts

Выводит список всех аккаунтов соцсетей, подключенных к Plus Tard.

schedule_post

Планирует пост в одной сети (1 вызов = 1 сеть).

register_user

Создает нового пользователя и возвращает OAuth URL.

get_user

Детали пользователя: подключенные провайдеры и под-аккаунты.

Ресурсы (2)

URI

Содержимое

plus-tard://accounts

JSON-список подключенных аккаунтов.

plus-tard://users/{id}

JSON-детали пользователя.


Установка на стороне клиента

Claude Desktop

Добавьте в ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "plus-tard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.plus-tard.com/mcp/",
        "--header",
        "X-Api-Key:${PLUS_TARD_TOKEN}"
      ],
      "env": {
        "PLUS_TARD_TOKEN": "your_plus_tard_api_key"
      }
    }
  }
}

Claude Code (CLI)

claude mcp add plus-tard \
  --transport http https://mcp.plus-tard.com/mcp/ \
  --header "X-Api-Key: your_plus_tard_api_key"

Claude.ai (web)

Settings → Connectors → Add custom connector — URL https://mcp.plus-tard.com/mcp/, заголовок X-Api-Key: your_key.

Cursor / n8n

Те же URL и заголовок. См. полную документацию.


Self-host (для разработчиков)

Стек

  • Python 3.12 · FastAPI · mcp[fastapi] (Streamable HTTP transport)

  • httpx · pydantic v2 · pydantic-settings

  • pytest · pytest-asyncio · respx

Архитектура

Client (Claude/Cursor/n8n)
   │  Streamable HTTP + X-Api-Key header
   ▼
MCP server (this repo)
   │  X-Api-Key forwarded as-is
   ▼
Plus Tard Symfony API

Каждый запрос MCP поступает с X-Api-Key, который передается в API Plus Tard без изменений. Нет сессий, нет хранения данных на стороне сервера — каждый клиент использует свой собственный ключ.

Локальная разработка

git clone https://github.com/<votre-org>/plus-tard-mcp.git
cd plus-tard-mcp

python3.12 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

cp .env.example .env
# Édite .env : PLUS_TARD_BASE_URL=https://plus-tard.com

uvicorn main:app --reload --port 8001

Сервер слушает на http://127.0.0.1:8001/mcp/. Быстрая проверка с помощью MCP Inspector :

npx @modelcontextprotocol/inspector
# Transport: Streamable HTTP
# URL: http://127.0.0.1:8001/mcp/
# Header: X-Api-Key = ta_clef_plus_tard

Тестирование

pytest
# 24 passed

Развертывание Docker (production)

Репозиторий предоставляет Dockerfile + docker-compose.yml, готовые для VPS с nginx-proxy + acme-companion :

sudo docker compose up -d --build

См. deploy/README.md для подробностей (фрагмент nginx-proxy с поддержкой SSE, управление TLS Let's Encrypt, обновление).


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

Переменная

Описание

По умолчанию

PLUS_TARD_BASE_URL

Базовый URL API Plus Tard

(обязательно)

MCP_HOST

Хост для привязки uvicorn

0.0.0.0

MCP_PORT

Порт для привязки uvicorn

8001

Аутентификация выполняется через заголовок запроса X-Api-Key — токены не хранятся на стороне сервера.

Разрешенные хосты

SDK MCP активирует защиту от DNS-ребиндинга, которая разрешает только добавленные в белый список хосты. Хосты по умолчанию:

  • mcp.plus-tard.com

  • localhost, 127.0.0.1 (для разработки)

Чтобы добавить свой домен, отредактируйте список в main.py (TransportSecuritySettings.allowed_hosts).


Структура проекта

.
├── main.py                # FastAPI + FastMCP + middleware X-Api-Key
├── app/
│   ├── config.py          # Settings via pydantic-settings
│   ├── auth/              # Dependency X-Api-Key (réutilisable hors MCP)
│   ├── models/            # Schémas pydantic v2 (post, account, user)
│   ├── services/          # PlusTardClient async (httpx)
│   └── tools/             # 5 tools métier (str → str)
├── tests/                 # 24 tests pytest-asyncio
├── deploy/
│   ├── README.md          # Guide déploiement VPS
│   ├── vhost.d/           # Snippet nginx-proxy SSE
│   └── twig/              # Template Symfony pour la doc utilisateur
├── docs/index.html        # Doc utilisateur statique (HTML)
├── Dockerfile
├── docker-compose.yml
└── pyproject.toml

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

  • Только HTTPS в production (TLS через Let's Encrypt).

  • Нет логирования содержимого постов или API-токенов.

  • Защита от DNS-ребиндинга через TransportSecuritySettings в SDK MCP.

  • Изолированная мультиарендность : каждый запрос обрабатывается собственным клиентом httpx, который закрывается по завершении запроса (без кросс-пользовательского пулинга).

  • Если вы подозреваете, что ключ скомпрометирован, аннулируйте его в личном кабинете Plus Tard.


Дорожная карта

  • [ ] Структурированное логирование (JSON, без токенов и контента)

  • [ ] Ограничение частоты запросов (rate limiting) по API-ключу

  • [ ] Метрики Prometheus

  • [ ] OAuth flow для коннекторов (вместо копирования API-ключа)

  • [ ] Поддержка completion/complete MCP для подсказок page_id (ожидается Python SDK, который предоставит ToolReference)

Идеи и вклад приветствуются — открывайте issue или PR.


Полезные ссылки


Лицензия

MIT © 2026 Plus Tard — Boréales Créations.

Сделано с ❤️ во Франции.

Available Tools

5 tools
get_userA

Récupère les informations d'un utilisateur Plus Tard par son id, incluant ses providers connectés (Facebook, Instagram, LinkedIn, etc.) et leurs sous-comptes (pages Facebook, comptes Instagram pro...). Utilise ce tool avant schedule_post pour identifier le bon page_id à utiliser : pour Facebook/Instagram, c'est l'id du sous-compte (providers[].accounts[].id) ; pour les autres providers (LinkedIn, Twitter, TikTok, Threads, Bluesky), c'est providers[].providerId.

Inputs: user_id (required). Returns: result

list_accountsA

Liste tous les comptes réseaux sociaux connectés à Plus Tard. Utilise ce tool pour savoir quels comptes sont disponibles avant de planifier un post.

Inputs: no named parameters. Returns: result

register_userA

Crée un nouvel utilisateur Plus Tard et retourne une URL OAuth permettant de connecter ses comptes de réseaux sociaux. Utilise ce tool quand l'utilisateur veut onboarder un nouveau client ou se créer un compte. Email et langue sont optionnels — la langue par défaut est 'fr'. L'URL OAuth doit être ouverte dans un navigateur par l'utilisateur final pour qu'il connecte ses réseaux. Elle est valable 24h.

Inputs: email, language. Returns: result

schedule_postA

Planifie un post sur un seul réseau social via Plus Tard. Utilise ce tool quand l'utilisateur veut programmer, publier ou scheduler du contenu sur Facebook, Instagram, LinkedIn, X/Twitter, TikTok, Threads, Bluesky ou Google My Business.

IMPORTANT :
- Un appel = un réseau. Pour publier sur plusieurs réseaux, appelle
  ce tool plusieurs fois.
- AVANT D'APPELER ce tool : appelle d'abord list_accounts (ou
  get_user pour la vue détaillée) pour obtenir le page_id correct.
- Le `page_id` à passer ici est l'identifiant EXTERNE du compte sur
  le réseau social (champ `accountId` / `page_id` retourné par
  list_accounts, ex. "1097653263583548"), PAS l'identifiant interne
  Plus Tard (champ `id` / `internal_id`, ex. "34"). Confondre les
  deux crée un post mal rattaché et apparaissant comme "compte
  déconnecté".
- Pour les providers sans sous-comptes (Twitter, LinkedIn, TikTok,
  Threads, Bluesky, Google), utilise le `providerId` retourné par
  get_user.
- Instagram exige au moins une image ou vidéo dans image_posts.
- planned_at doit être une date/heure UTC future au format ISO8601
  (ex: 2026-05-01T10:00:00Z).

Inputs: page_id (required), provider (required), planned_at (required), text, +3 more. Returns: result

validate_api_keyA

Vérifie que la clef API Plus Tard fournie est valide. Utilise ce tool si l'utilisateur veut diagnostiquer un problème d'authentification ou simplement confirmer que sa clef est active. Retourne aussi la date de création et d'expiration de la clef.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a unique, non-overlapping purpose: validate_api_key checks authentication, list_accounts retrieves connected accounts, schedule_post creates a post, register_user creates a user, and get_user retrieves user details. No confusion between tools.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in lowercase with underscores (validate_api_key, list_accounts, schedule_post, register_user, get_user). The naming style is uniform and predictable.

    Tool Count5/5

    With 5 tools, the server offers a focused set of operations for a social media scheduling service. Each tool addresses a distinct need without redundancy, fitting well within the typical 3-15 tool range.

    Completeness3/5

    The server covers core operations (validation, listing, scheduling, user management) but lacks tools for retrieving, updating, or deleting scheduled posts. This is a notable gap for a scheduling domain, preventing full lifecycle management.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Schedule and manage social media posts across 13 platforms (Bluesky, Threads, Instagram, LinkedIn, Mastodon, YouTube, Facebook, Pinterest, Telegram, Nostr, X/Twitter, Discord, Tumblr and more). OAuth 2.0 + PKCE, 10 tools, draft-first workflow for AI agents.
      2
      10
      28
      AGPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables finding trending content across social networks and scheduling/publishing posts with full lifecycle management.
      125 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Schedule, publish, and measure social posts on Facebook, Instagram, TikTok, LinkedIn, Threads, Pinterest, and X for one brand or many.
      38
      MIT