The fastest X/Twitter automation for AI agents.
Overview
The fastest X/Twitter automation for AI agents. 104 tools · no browser · no API keys · no monthly fees Quick Start · Tools · Why Spectre? · Safety · Integrations · Reference Spectre is an MCP server that gives AI agents 104 tools for X/Twitter automation — from search and posting to DMs, lists, and communities. Under the hood, it talks directly to X's internal GraphQL and REST APIs. No browser to spin up, no Puppeteer to maintain, no DOM scraping that breaks on UI changes. 1. Open and make sure you're logged in 2. Open (F12 or Ctrl+Shift+I) 3. Go to → → select 4. Find and copy these two values: - — long hex string (e.g. a1b2c3d4...) - — 160-character hex string ct0 is exactly 160 hex characters. Double-check you copied the full value — partial cookies will fail silently. Add to your MCP client config (~/.hermes/config.yaml, claude_desktop_config.json, .cursor/mcp.json, or equivalent): For client-specific setup (Hermes skill, Claude, Cursor, Python), see Integrations.
README
Spectre MCP
The fastest X/Twitter automation for AI agents.
104 tools · no browser · no API keys · no monthly fees
Quick Start · Tools · Why Spectre? · Safety · Integrations · Reference
Spectre is an MCP server that gives AI agents 104 tools for X/Twitter automation — from search and posting to DMs, lists, and communities. Under the hood, it talks directly to X’s internal GraphQL and REST APIs. No browser to spin up, no Puppeteer to maintain, no DOM scraping that breaks on UI changes.
| Spectre | XActions | twikit | |
|---|---|---|---|
| Architecture | Direct GraphQL/REST | Puppeteer (headless browser) | Python API wrapper |
| Speed | <1s per request | 3–10s (browser startup) | ~1s per request |
| Memory | ~10 MB | ~200 MB+ (Chromium) | ~10 MB |
| MCP Server | ✓ 104 tools | ~50 API tools | ✗ None |
| Account Pool | ✓ Multi-account auto-rotation | ✗ Single auth_token | ✗ Single session |
| Browser Required | ✗ Never | ✓ Always | ✗ Never |
| DOM Breakage Risk | ✗ None | ~ breaks on UI changes | ✗ None |
| Media Upload | ✓ Cookie-based (no API keys) | ~ requires API keys | ✗ |
| Lists | ✓ Full CRUD + members + subscribe | ✗ | ✗ |
| Drafts & Scheduled | ✓ Full CRUD | ~ Basic | ✗ |
| Bookmark Folders | ✓ Full CRUD + timeline | ✗ | ✗ |
| DM Search | ✓ All / groups / people | ✗ | ✗ |
| Community Notes | ✓ Read + rate | ✗ | ✗ |
| Highlights | ✓ Create, delete, get | ✗ | ✗ |
| Notifications | ✓ Full timeline | ✗ | ✗ |
| Language | Python | JavaScript | Python |
1. Install
pipx install spectre-mcp # or: uv tool install spectre-mcp
2. Add Your X Account
Extract cookies from your browser:
- Open x.com and make sure you’re logged in
- Open DevTools (
F12orCtrl+Shift+I) - Go to Storage → Cookies → select
https://x.com - Find and copy these two values:
auth_token— long hex string (e.g.a1b2c3d4...)ct0— 160-character hex string
spectre add myaccount "auth_token=a1b2c3d4...; ct0=e5f6a7b8..."
Tip:
ct0is exactly 160 hex characters. Double-check you copied the full value — partial cookies will fail silently.
3. Configure Your MCP Client
Add to your MCP client config (~/.hermes/config.yaml, claude_desktop_config.json, .cursor/mcp.json, or equivalent):
{
"mcpServers": {
"spectre": {
"command": "uvx",
"args": ["spectre-mcp"]
}
}
}
For client-specific setup (Hermes skill, Claude, Cursor, Python), see Integrations.
No
uv? Install it:curl -LsSf https://astral.sh/uv/install.sh | shOr usepython3 -m spectre.serverto run from a local clone.
4. Call a Tool — IDs Are Strings
Every tool that takes an X ID (tweet_id, user_id, list_id, community_id, reply_to, quote_tweet) takes it as a string:
get_tweet("2111332908657148356")
X IDs are 64-bit integers. Most MCP clients and model APIs parse JSON numbers as IEEE-754 doubles, which rounds anything above 2^53 — 2111332908657148356 silently becomes 2111332908657148416, and the tool reports a perfectly good tweet as “not found or deleted”. Passing the ID as a string removes the round-trip entirely, so the server sees the exact ID the model meant. A full https://x.com/... URL works too, and a plain integer is still accepted for backwards compatibility.
- All 104 Tools — every tool, grouped by feature
- Integrations — Hermes, Claude, Cursor, Python
- Safety — destructive tools, rate limits
- Reference — X query operators, CLI, env vars, limitations
License
MIT
Install
uvx spectre-mcpConfiguration
{
"mcpServers": {
"spectre": {
"command": "uvx",
"args": ["spectre-mcp"]
}
}
}