Skip to main content
Glama
vigneshsai890

social-mcp

social-mcp

A strict MCP social-tool surface with a normalized provider boundary.

Reference infrastructure for composing MCP-compatible social tools without coupling tool contracts to one provider implementation.

TypeScript · Node.js · MCP SDK  ·  MCP tools: publish_post and get_analytics

01 / SYSTEM CARD

  • Primary boundary: tool handlers → SocialProvider → X API v2 adapter

  • Documentation stance: architecture and presentation only; application source is intentionally untouched.

  • Visual language: Y2K terminal grid, brutalist labels, maximalist contrast, readable static SVG fallback.

Related MCP server: PostLake

02 / ARCHITECTURE

The map above is a compact view of the repository's visible runtime boundary. It is designed to answer three questions quickly: where input enters, where policy or domain logic lives, and where external side effects leave the system.

Architecture map for social-mcp

03 / DESIGN NOTES

  • Provider-specific behavior stays behind the SocialProvider port.

  • Injected HTTP, token, clock and sleep dependencies keep tests deterministic.

This upgrade adds documentation assets only. It does not change source files, dependency manifests, tests, workflows or runtime configuration.

04 / EXISTING PROJECT DOCUMENTATION

social-mcp

A strict TypeScript starter for MCP social tools. It provides a normalized SocialProvider contract, exact MCP-compatible tool definitions, and an X API v2 adapter.

API

  • publish_post: calls publish(), or reply() when replyToId is present.

  • get_analytics: calls analytics().

  • XProvider: maps those operations to X v2 POST /2/tweets and GET /2/tweets/:id.

Register socialTools with an MCP server and dispatch tool calls through createSocialToolHandlers({ x: provider }).

X adapter guarantees

All side effects are injected: HttpClient, TokenStore, Clock, and Sleep. The provider refreshes OAuth tokens before expiry, performs at most one additional refresh after a 401, and transparently retries 429 responses within configured count and delay bounds. It honors both retry-after and x-rate-limit-reset, choosing the later deadline.

Errors use the allow-listed SocialProviderError shape. The provider has no logger and never places credentials, authorization headers, token request bodies, or raw responses in errors. A production HttpClient must apply the same redaction policy.

Commands

Dependencies are exact-pinned. After an intentional install by the consumer:

npm run check
npm test

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables interaction with the X (Twitter) API through MCP tools for managing users, posts, bookmarks, likes, and lists. Supports markdown or JSON output and uses OAuth 2.0 PKCE authentication.
    22
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Publish, schedule and read analytics across every major social network from one MCP server. 15+ tools covering publishing, scheduling, validation, media upload and normalised cross-platform analytics.
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP-based interaction with the X (Twitter) API v2, supporting reads like timeline, mentions, and search, and writes through a two-step draft-and-confirm process that ensures human-visible previews before any public post.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables MCP clients to interact with the X (Twitter) API v2 through 41 typed tools for reading, searching, engaging, publishing, and managing content, with policy-based access control and session credit budgets to prevent overspending.
    41
    8 npm
    1
    MIT