Skip to main content
Glama
README.md
# mcp-x MCP server

MCP project to connect Claude with X API. Built on top of [X API v2](https://developer.x.com/en/docs/x-api)

# Demo
[![video-demo](https://github.com/Lyonsupernova/mcp-x/blob/main/media/demo.mp4)](https://github.com/user-attachments/assets/4e54a6d9-8c90-4d2a-a24b-f19995a1f1a7)

# Supported Features
- Post tweets

# Configuration

## Getting Started with X
- Go to [X Developer Platform](https://developer.x.com/en) and login with your X account
- Start with Basic plan
- Store the Access Token, Secret, Client ID, Client Secret and Bearer token
Docs: [x-api-start](https://developer.x.com/en/docs/x-api/getting-started/getting-access-to-the-x-api)

## Set up 
- On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`


```json
{
  "mcpServers": {
    "x": {
      "command": "uv",
      "args": [
        "--directory",
        "PROJECT_PATH/src/mcp_x",
        "run",
        "mcp-x"
      ],
      "env": {
        "X_API_KEY": "YOUR_API_KEY",
        "X_API_KEY_SECRET": "YOUR_API_KEY_SECRET",
        "X_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN",
        "X_ACCESS_TOKEN_SECRET": "YOUR_ACCESS_TOKEN_SECRET",
        "X_BEARER_TOKEN": "YOUR_BEARER_TOKEN",
        "LOGGING_PATH": "PROJECT_PATH/src/mcp_x/logs"
      }
    }
  }
}
```

## TODO

- Tests
- Add Get tweets
- Add Delete tweets
- ...

## Deployment

(todo)

### Building and Publishing

To prepare the package for distribution:

1. Sync dependencies and update lockfile:
```bash
uv sync
```

2. Build package distributions:
```bash
uv build
```

This will create source and wheel distributions in the `dist/` directory.

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusing it with another. The purpose of x_PostTweet is clear and unambiguous.

Naming Consistency4/5

The tool name combines a prefix 'x_' with CamelCase 'PostTweet', which mixes conventions but is still readable and suggests a consistent pattern if more tools existed. As a single tool, its name is clear and not chaotic.

Tool Count2/5

A single tool is too few for a server purportedly for the X (Twitter) API, which has many operations. The server feels critically under-scoped, offering only posting functionality.

Completeness1/5

The tool surface covers only posting tweets, leaving out essential operations like reading, searching, or deleting tweets. This is severely incomplete for a server meant to interact with X.

Maintenance

ActivityInactive
ResponsivenessNo issues