Skip to main content

Spectre

Spectre MCP

The fastest X/Twitter automation for AI agents.

111 tools · no browser · no API keys · no monthly fees

Quick Start · Tools · Why Spectre? · Safety · Integrations · Reference


Why Spectre?

Spectre is an MCP server that gives AI agents 111 tools for X/Twitter — 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 ✓ 111 tools ~50 API tools ✗ None
Account Pool ✓ Multi-account rotation ✗ Single auth_token ✗ Single session
Browser Required ✗ Never ✓ Always ✗ Never
DOM Breakage Risk ✗ None ~ breaks on UI changes ✗ None
Pagination ✓ Cursors on list endpoints ✗ partial
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 ✗ ✗
Quote Tweets ✓ Full timeline ✗ ✗
Community Notes ✓ Read + rate ✗ ✗
Highlights ✓ Create, delete, get ✗ ✗
Notifications ✓ Full timeline ✗ ✗
Language Python JavaScript Python

Every tool returns the same clean JSON shapes, and failures carry a kind (auth, rate_limit, permission, validation, not_found, upstream) so your agent knows whether to retry, switch accounts, or stop.


Quick Start

1. Install

pipx install spectre-mcp    # or: uv tool install spectre-mcp

2. Add Your X Account

Extract cookies from your browser:

  1. Open x.com and make sure you're logged in
  2. Open DevTools (F12 or Ctrl+Shift+I)
  3. Go to Storage → Cookies → select https://x.com
  4. 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..."

Spectre checks the cookies with X before saving them, so a bad copy fails immediately instead of at the first empty search.

Tip: ct0 is exactly 160 hex characters. Double-check you copied the full value.

Handy commands:

spectre list      # accounts and their state
spectre status    # pool health
spectre doctor    # auth + connectivity check

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 | sh Or use python3 -m spectre.server to run from a local clone.


Tools

What You Get

Area What it covers
Search search with full operator syntax (from:, since:, filter:media, min_faves:…), search_users
Profiles get_user, get_user_by_id, get_users_by_ids, timelines, media, followers/following up to 5,000, verified followers, mutuals, likes, highlights
Posts get_tweet, get_tweets (batch), replies, get_thread, get_tweet_quotes, retweeters, favoriters, edit history, similar posts, community notes
Compose post_tweet (text/reply/quote/media), upload_media, download_media, scheduled posts, drafts
Engagement like, retweet, bookmark, pin, pin reply — each with its undo
Social follow, mute, block, remove follower, muted/blocked lists
DMs inbox, conversation history, send, search (all/groups/people), muted threads, DM block
Lists create, edit, delete, members, subscribers, subscribe, list timeline, memberships, ownerships
Communities info, posts, join, leave
Topics & trends topic info/follow, trends by location, get_trend_locations for woeids
Bookmarks list, search, folders, folder timeline
Account get_me, settings, profile edits, avatar, banner, pool management, get_rate_limits

Full list with arguments and gotchas: docs/tools.md.


Reference

  • All 111 Tools — every tool, grouped by feature
  • Integrations — Hermes, Claude, Cursor, Python
  • Safety — what to confirm before writing, and rate limits
  • Reference — X query operators, CLI, env vars, output shapes, limitations
  • Changelog — what changed between versions

License

MIT

Metadata

Release files for spectre-mcp 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spectre-mcp 2.0.2
File Size Uploaded Provenance Actions
spectre_mcp-2.0.2.tar.gz 74.6 kB Without provenance Details for spectre_mcp-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spectre-mcp 2.0.2
File Interpreter ABI Platform Actions
spectre_mcp-2.0.2-py3-none-any.whl Python 3 none any Details for spectre_mcp-2.0.2-py3-none-any.whl

Total release size: 128.8 kB

Release files / spectre_mcp-2.0.2.tar.gz

Download URL spectre_mcp-2.0.2.tar.gz
Size 74.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bdc904334317b800089d586c5f3ad2020cf0161778336dbde67e3108aa1205e6
BLAKE2b-256 checksum
How to use checksums
7b644dc6760e9d3b8d8659d3dc3a9d3adab7182b3db5f51a12ca1fdffd595871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / spectre_mcp-2.0.2-py3-none-any.whl

Download URL spectre_mcp-2.0.2-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15e4ef367b861f5963ba09c81fc9effe239b2fed798b34c85783d85b5f07cdc4
BLAKE2b-256 checksum
How to use checksums
173cb6e99fcea36d8fa891b1d8098c0b6ce5b18d54023106e26759536b8050bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for spectre-mcp 2.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page