Read public X posts, replies, profiles, and search results through Rettiwt or the official API.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add twitter-x --env RETTIWT_API_KEY='<RETTIWT_API_KEY>' -- npx -y @granitebps/twitter-mcp~/.codex/config.toml
[mcp_servers.twitter-x]
command = "npx"
args = ["-y", "@granitebps/twitter-mcp"]
env = { RETTIWT_API_KEY = "<RETTIWT_API_KEY>" }
# codex mcp add twitter-x --env RETTIWT_API_KEY='<RETTIWT_API_KEY>' -- npx -y @granitebps/twitter-mcp~/.cursor/mcp.json
{
"mcpServers": {
"twitter-x": {
"command": "npx",
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"env": {
"RETTIWT_API_KEY": "<RETTIWT_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"twitter-x": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"env": {
"RETTIWT_API_KEY": "<RETTIWT_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"twitter-x": {
"command": "npx",
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"env": {
"RETTIWT_API_KEY": "<RETTIWT_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"twitter-x": {
"command": "npx",
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"env": {
"RETTIWT_API_KEY": "<RETTIWT_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"twitter-x": {
"command": "npx",
"args": [
"-y",
"@granitebps/twitter-mcp"
],
"env": {
"RETTIWT_API_KEY": "<RETTIWT_API_KEY>"
}
}
}
}Environment variables
RETTIWT_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.