GitHub - xdevplatform/xmcp: MCP server for the X API · GitHub
Sunday, April 5, 2026 AI
Scraped Article
[Skip to content](https://github.com/xdevplatform/xmcp#start-of-content)
You signed in with another tab or window. [Reload](https://github.com/xdevplatform/xmcp) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/xdevplatform/xmcp) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/xdevplatform/xmcp) to refresh your session.Dismiss alert
{{ message }}
[xdevplatform](https://github.com/xdevplatform)/ **[xmcp](https://github.com/xdevplatform/xmcp)** Public
- [Notifications](https://github.com/login?return_to=%2Fxdevplatform%2Fxmcp) You must be signed in to change notification settings
- [Fork\\
26](https://github.com/login?return_to=%2Fxdevplatform%2Fxmcp)
- [Star\\
150](https://github.com/login?return_to=%2Fxdevplatform%2Fxmcp)
master
[**1** Branch](https://github.com/xdevplatform/xmcp/branches) [**0** Tags](https://github.com/xdevplatform/xmcp/tags)
[Go to Branches page](https://github.com/xdevplatform/xmcp/branches)[Go to Tags page](https://github.com/xdevplatform/xmcp/tags)
Go to file
Code
Open more actions menu
## Folders and files
| Name | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| ## Latest commit<br><br>Vardhan Agnihotri<br>[updated readme, env var names](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3)<br>2 months agoFeb 6, 2026<br>[028a62f](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3) · 2 months agoFeb 6, 2026<br>## History<br>[2 Commits](https://github.com/xdevplatform/xmcp/commits/master/) <br>Open commit details<br>[View commit history for this file.](https://github.com/xdevplatform/xmcp/commits/master/) 2 Commits |
| [.gitignore](https://github.com/xdevplatform/xmcp/blob/master/.gitignore ".gitignore") | [.gitignore](https://github.com/xdevplatform/xmcp/blob/master/.gitignore ".gitignore") | [reset history](https://github.com/xdevplatform/xmcp/commit/f4e5a2d03bea931c582d7895972d85df53ee828e "reset history") | 3 months agoJan 30, 2026 |
| [README.md](https://github.com/xdevplatform/xmcp/blob/master/README.md "README.md") | [README.md](https://github.com/xdevplatform/xmcp/blob/master/README.md "README.md") | [updated readme, env var names](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3 "updated readme, env var names") | 2 months agoFeb 6, 2026 |
| [env.example](https://github.com/xdevplatform/xmcp/blob/master/env.example "env.example") | [env.example](https://github.com/xdevplatform/xmcp/blob/master/env.example "env.example") | [updated readme, env var names](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3 "updated readme, env var names") | 2 months agoFeb 6, 2026 |
| [requirements.txt](https://github.com/xdevplatform/xmcp/blob/master/requirements.txt "requirements.txt") | [requirements.txt](https://github.com/xdevplatform/xmcp/blob/master/requirements.txt "requirements.txt") | [reset history](https://github.com/xdevplatform/xmcp/commit/f4e5a2d03bea931c582d7895972d85df53ee828e "reset history") | 3 months agoJan 30, 2026 |
| [server.py](https://github.com/xdevplatform/xmcp/blob/master/server.py "server.py") | [server.py](https://github.com/xdevplatform/xmcp/blob/master/server.py "server.py") | [updated readme, env var names](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3 "updated readme, env var names") | 2 months agoFeb 6, 2026 |
| [test\_grok\_mcp.py](https://github.com/xdevplatform/xmcp/blob/master/test_grok_mcp.py "test_grok_mcp.py") | [test\_grok\_mcp.py](https://github.com/xdevplatform/xmcp/blob/master/test_grok_mcp.py "test_grok_mcp.py") | [updated readme, env var names](https://github.com/xdevplatform/xmcp/commit/028a62f918def95b1ac98a26a5e48cc9817baba3 "updated readme, env var names") | 2 months agoFeb 6, 2026 |
| View all files |
## Repository files navigation
# X API FastMCP Server
[Permalink: X API FastMCP Server](https://github.com/xdevplatform/xmcp#x-api-fastmcp-server)
Run a local MCP server that exposes the X API OpenAPI spec as tools using
FastMCP. Streaming and webhook endpoints are excluded.
## Prerequisites
[Permalink: Prerequisites](https://github.com/xdevplatform/xmcp#prerequisites)
- Python 3.9+
- An X Developer Platform app (to get tokens)
- Optional: an xAI API key if you want to run the Grok test client
## Setup (local)
[Permalink: Setup (local)](https://github.com/xdevplatform/xmcp#setup-local)
1. Create a virtual environment and install dependencies:
- `python -m venv .venv`
- `source .venv/bin/activate`
- `pip install -r requirements.txt`
2. Create your local `.env`:
- `cp env.example .env`
- Required values (do not skip):
- `X_OAUTH_CONSUMER_KEY`
- `X_OAUTH_CONSUMER_SECRET`
- `X_BEARER_TOKEN` (required for this setup; k