logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp_social_platform_gateway

This utility facilitates AI model interaction with the X/Twitter ecosystem, abstracting platform specifics for common operations like publishing updates, tracking other accounts, and fetching timeline content via a uniform interface.

Author

mcp_social_platform_gateway logo

0xhijo

MIT License

Quick Info

GitHub GitHub Stars 10
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

mcp_twittertwittertweetstwitter functionalitytwitter interactionmcp_twitter twitter

MCP X/Twitter Orchestrator

Overview

The X/Twitter Orchestrator, compliant with the Model Context Protocol (MCP), furnishes a mediated connection point to the X/Twitter infrastructure. It consolidates diverse platform API calls into a standardized toolkit, empowering AI agents to execute mandated social media tasks.

Available Capabilities

This server implements the following distinct operations:

  • post_a_new_status_update: Publish a fresh message to the X platform.
  • respond_to_existing_post: Submit a direct reply to a specific tweet, referenced by its unique identifier.
  • retrieve_latest_user_post: Fetch the most chronologically recent submission from a designated user profile.
  • query_recent_posts_by_criteria: Retrieve multiple recent submissions matching a given textual search criterion.
  • publish_multi_part_narrative: Compose and sequentially disseminate an interconnected series of posts (a thread).
  • initiate_follow_action: Command the system to follow a target user specified by their screen name.
  • fetch_full_user_details: Acquire comprehensive profile metadata associated with a given username.
  • resolve_username_to_user_identifier: Convert a known screen name into its corresponding numerical user ID.
  • fetch_recent_user_activity_and_replies: Obtain a sequence of recent posts and replies originating from a specified account.
  • retrieve_most_recent_posts_only: Get the latest submissions posted by a user, excluding replies.
  • obtain_own_account_metadata: Retrieve configuration and profile details for the authenticated account.

Deployment and Execution

Local Deployment Procedure

bash

Acquire the source code repository

git clone https://github.com/0xhijo/mcp_twitter.git

Install required libraries and finalize the build

pnpm build

Start the service process

node ./build/index.js

Execution via NPX

bash npx mcp_twitter

Configuration Parameters

Authentication utilizing Scraper Credentials

  1. Edit the environment definition file (.env):

sh TWITTER_AUTH_MODE = "CREDENTIALS" # Designates credential-based access

Necessary login parameters

TWITTER_USERNAME="ACCOUNT_HANDLE" TWITTER_PASSWORD="SECRET_KEY" TWITTER_EMAIL="CONTACT_EMAIL"

Authentication requires defining these variables either in a dedicated .env file or setting them directly as environment variables.

Authentication utilizing Official API Keys

  1. Establish a Developer Portal Presence:

Ensure you possess an active X/Twitter account. Navigate to the Developer Platform interface. Generate the necessary API authorization tokens. Consult relevant documentation if assistance with developer account setup is needed.

  1. Configure the Environment Variables (.env):

sh TWITTER_AUTH_MODE = "API" # Designates API key access

Tokens sourced from the Developer Portal

TWITTER_API="CONSUMER_KEY" TWITTER_API_SECRET="CONSUMER_SECRET" TWITTER_ACCESS_TOKEN="USER_TOKEN" TWITTER_ACCESS_TOKEN_SECRET="USER_TOKEN_SECRET"

Integration with the Claude Agent

To enable Claude's utilization of this service, the gateway must be enumerated within the claude_mcp_config.json manifest. This step grants Claude the capability to issue commands against the X/Twitter platform through this standardized server layer.

Updating Claude's Configuration File

Incorporate the subsequent JSON structure into your claude_mcp_config.json:

"mcp_twitter": { "command": "npx", "args": ["mcp_twitter"], "env": { "TWITTER_AUTH_MODE": "CREDENTIALS", "TWITTER_USERNAME": "YOUR_ACCOUNT_HANDLE", "TWITTER_PASSWORD": "YOUR_SECRET_KEY", "TWITTER_EMAIL": "YOUR_CONTACT_EMAIL" } }

Substitute the placeholder credentials with your specific, active authentication details. This entry specifies that the MCP X/Twitter server should be initialized using npx whenever Claude requires Twitter operations.

Operational Usage with Claude

Upon successful configuration, Claude gains the authority to invoke any functionality exposed by this MCP server—sending status updates, fetching timelines, etc.—by transparently routing those requests through the initialized service.

See Also

`