x mcp
An MCP server that allows Claude to create, manage and publish X/Twitter posts directly through the chat interface.
An MCP server that allows Claude to create, manage and publish X/Twitter posts directly through the chat interface.
An MCP server to create, manage and publish X/Twitter posts directly through Claude chat.
To install X(Twitter) MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install x-mcp --client claude
Clone the repository:
git clone https://github.com/yourusername/x-mcp.git
Install UV globally using Homebrew in Terminal:
brew install uv
Create claude_desktop_config.json:
~/Library/Application Support/Claude/
and create the file inside itFor Windows: Open directory %APPDATA%/Claude/
and create the file inside it
Add this configuration to claude_desktop_config.json:
{
"mcpServers": {
"x_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/x-mcp",
"run",
"x-mcp"
],
"env": {
"TWITTER_API_KEY": "your_api_key",
"TWITTER_API_SECRET": "your_api_secret",
"TWITTER_ACCESS_TOKEN": "your_access_token",
"TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}
}
}
}
Get your X/Twitter API credentials:
http://localhost/
and Website URL to http://example.com/
Generate and copy all keys and tokens from Keys and Tokens section
Update the config file:
/path/to/x-mcp
with your actual repository pathAdd your X/Twitter API credentials
Quit Claude completely and reopen it
If not working:
- Make sure UV is installed globally (if not, uninstall with pip uninstall uv
and reinstall with brew install uv
)
- Or find UV path with which uv
and replace "command": "uv"
with the full path
- Verify all X/Twitter credentials are correct
- Check if the x-mcp path in config matches your actual repository location
[
{
"description": "Create a draft tweet",
"inputSchema": {
"properties": {
"content": {
"description": "The content of the tweet",
"type": "string"
}
},
"required": [
"content"
],
"type": "object"
},
"name": "create_draft_tweet"
},
{
"description": "Create a draft tweet thread",
"inputSchema": {
"properties": {
"contents": {
"description": "An array of tweet contents for the thread",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"contents"
],
"type": "object"
},
"name": "create_draft_thread"
},
{
"description": "List all draft tweets and threads",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "list_drafts"
},
{
"description": "Publish a draft tweet or thread",
"inputSchema": {
"properties": {
"draft_id": {
"description": "ID of the draft to publish",
"type": "string"
}
},
"required": [
"draft_id"
],
"type": "object"
},
"name": "publish_draft"
},
{
"description": "Delete a draft tweet or thread",
"inputSchema": {
"properties": {
"draft_id": {
"description": "ID of the draft to delete",
"type": "string"
}
},
"required": [
"draft_id"
],
"type": "object"
},
"name": "delete_draft"
}
]