@m8lab/mcp-x-twitter
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@m8lab/mcp-x-twitter
MCP server for X (Twitter) — post tweets, upload media, and manage interactions via Claude Code or Claude Desktop.
Install
npx @m8lab/mcp-x-twitterRelated MCP server: Twitter MCP Server
Claude Code Configuration
Add to your .claude/mcp.json (or run claude mcp add):
{
"mcpServers": {
"x-twitter": {
"command": "npx",
"args": ["-y", "@m8lab/mcp-x-twitter"],
"env": {
"X_API_KEY": "your_api_key",
"X_API_SECRET": "your_api_secret",
"X_ACCESS_TOKEN": "your_access_token",
"X_ACCESS_SECRET": "your_access_secret"
}
}
}
}Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"x-twitter": {
"command": "npx",
"args": ["-y", "@m8lab/mcp-x-twitter"],
"env": {
"X_API_KEY": "your_api_key",
"X_API_SECRET": "your_api_secret",
"X_ACCESS_TOKEN": "your_access_token",
"X_ACCESS_SECRET": "your_access_secret"
}
}
}
}Available Tools
Tool | Description | Tier Required |
| Post a tweet with optional media and reply support | Free |
| Delete a tweet by ID | Free |
| Fetch a tweet with full details and expansions | Free |
| Search recent tweets (last 7 days) by query | Basic+ |
| Upload image or video and get a media_id | Free |
| Like a tweet as the authenticated user | Free |
| Retweet a tweet as the authenticated user | Free |
| Retrieve recent mentions of the authenticated user | Free |
Note:
search_tweetsrequires Basic or Pro tier X API access — not available on the free tier.
Environment Variables
Variable | Required | Description |
| Yes | Your X app API Key (Consumer Key) |
| Yes | Your X app API Secret (Consumer Secret) |
| Yes | Access Token for the authenticated user |
| Yes | Access Token Secret for the authenticated user |
| No | Bearer Token (optional, for app-only auth) |
How to Get X API Credentials
Go to developer.twitter.com and sign in
Create a new Project and App (or use an existing one)
Under your App settings, enable Read and Write permissions (required for posting)
Generate API Key & Secret under "Keys and tokens"
Generate Access Token & Secret (make sure they have Read+Write scope)
Copy all four values into your MCP config or
.envfile
Development
# Clone the repo
git clone https://github.com/lmtNoLimit/mcp-x-twitter.git
cd mcp-x-twitter
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Fill in your credentials in .env
# Type check
npm run typecheck
# Build
npm run build
# Run locally
node dist/index.jsLicense
MIT — see LICENSE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Publish and schedule tweets and threads on X (Twitter) from your AI assistant.
Analyze X (Twitter) posts, then draft and schedule from Claude or ChatGPT. OAuth; paid plans.
Read public X (Twitter) data and verify follows, reposts, replies and quotes. 14 read-only tools.
Search X (Twitter) posts and read profiles, followers, trends and X Articles. OAuth sign-in.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables creating, managing, and publishing X/Twitter posts, threads, and replies directly through Claude chat. Supports draft management with the ability to create, list, publish, and delete tweet drafts.101MIT
- AlicenseAqualityCmaintenanceEnables seamless interaction with Twitter/X platform through Claude AI, allowing users to post tweets with images, search for tweets, and engage in conversations using natural language commands.1055 npm27MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with X (Twitter) API v2 for posting tweets, searching, liking, retweeting, and more through natural language.MIT
- AlicenseBqualityDmaintenanceEnables users to interact with X/Twitter via Claude, allowing posting tweets, searching, liking, retweeting, and more using OAuth 2.0 PKCE authentication.107MIT