# Twitter MCP Server
An **MCP (Model Context Protocol)** server that allows LLM agents and developer tools (Continue.dev, Claude Desktop, VS Code MCP clients) to interact with Twitter (X).
## Features
- 🔍 Search recent tweets (read-only)
- ✍️ Post tweets (text or images)
- 🖼 Upload images
- 📊 Analyze engagement
- 🧠 Summarize tweets
- 🏷 Extract topics & hashtags
---
## Why STDIO?
This server uses **JSON-RPC over STDIN/STDOUT** (`transport="stdio"`), as required by MCP.
- No open ports (secure by default)
- Process-based lifecycle (spawned by client)
- Works out-of-the-box with MCP clients
> MCP servers are **CLI-style tools**, not web services.
---
## Authentication
- **Read-only**: Bearer Token (Twitter API v2)
- **Write / Media**: OAuth 1.0a
- Media upload → v1.1 API
- Tweet creation → v2 API
---
## Environment Variables
```bash
TWITTER_BEARER_TOKEN=...
TWITTER_API_KEY=...
TWITTER_API_SECRET_KEY=...
TWITTER_ACCESS_TOKEN=...
TWITTER_SECRET_ACCESS_TOKEN=...