Read public X posts, replies, profiles, and search results through Rettiwt or the official API.
MCPpedia last refreshed this data
io.github.granitebps/twitter-mcp is an MCP server that read public X posts, replies, profiles, and search results through Rettiwt or the official API. Its tool list has not been published yet over stdio and http, requires no API key, and scores 85/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"twitter": {
"env": {
"RETTIWT_API_KEY": "your_key_here"
},
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Twitter/X MCP lets an MCP client read public X posts, replies, and profiles, or search X. It uses Rettiwt by default, so you do not need an X developer plan. You can switch to the official X API if you have access.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@granitebps/twitter-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @granitebps/twitter-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search
An autonomous agent that conducts deep research on any data using any LLM providers
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
The official MCP server implementation for the Perplexity API Platform
Production ready MCP server with real-time search, extract, map & crawl.
MCP Security Weekly
Get CVE alerts and security updates for io.github.granitebps/twitter-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Twitter/X MCP lets an MCP client read public X posts, replies, and profiles, or search X. It uses Rettiwt by default, so you do not need an X developer plan. You can switch to the official X API if you have access.
RETTIWT_API_KEY. Official X API credentials work when you select API mode.Once the package is published, your MCP client can run it without a clone:
npx -y @granitebps/twitter-mcp
The server selects Rettiwt when you omit TWITTER_MODE. Pass RETTIWT_API_KEY in the client configuration.
The server uses stdio. Keep stdout reserved for MCP traffic.
To develop the server or use a clone directly:
git clone https://github.com/granitebps/twitter-mcp.git
cd twitter-mcp
npm ci
npm run build
Point your MCP client at the compiled entry point:
node /absolute/path/to/twitter-mcp/dist/cli.js
Run npm run build after each source change. Do not use src or npm run dev as the client's stdio command. Build logs on stdout can corrupt MCP messages.
Each example starts with the npm package, followed by the local equivalent. Replace /absolute/path/to/twitter-mcp with your clone's path and your_key_here with your Rettiwt key. Do not commit a configuration file that contains the key.
Add the npm package to Claude Code:
claude mcp add twitter --env RETTIWT_API_KEY=your_key_here -- npx -y @granitebps/twitter-mcp
For a local build:
claude mcp add twitter --env RETTIWT_API_KEY=your_key_here -- node /absolute/path/to/twitter-mcp/dist/cli.js
Claude Code uses local scope by default. Add --scope user before twitter to make the server available across projects.
Claude Desktop reads the same server from claude_desktop_config.json. Restart the app after editing the file.
{
"mcpServers": {
"twitter": {
"command": "npx",
"args": ["-y", "@granitebps/twitter-mcp"],
"env": {
"RETTIWT_API_KEY": "your_key_here"
}
}
}
}
For a local build, replace command and args with:
{
"command": "node",
"args": ["/absolute/path/to/twitter-mcp/dist/cli.js"]
}
Add the npm package to ~/.codex/config.toml, or to .codex/config.toml in a trusted project:
[mcp_servers.twitter]
command = "npx"
args = ["-y", "@granitebps/twitter-mcp"]
[mcp_servers.twitter.env]
RETTIWT_API_KEY = "your_key_here"
For a local build:
[mcp_servers.twitter]
command = "node"
args = ["/absolute/path/to/twitter-mcp/dist/cli.js"]
[mcp_servers.twitter.env]
RETTIWT_API_KEY = "your_key_here"
Restart Codex after editing the file. The CLI, IDE extension, and desktop app share this configuration on the same computer.
Add the npm package to opencode.json or opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"twitter": {
"type": "local",
"command": ["npx", "-y", "@granitebps/twitter-mcp"],
"enabled": true,
"environment": {
"RETTIWT_API_KEY": "your_key_here"
}
}
}
}
For a local build, replac