xpal

ranaroussi/xpal
★ 0 stars Python 🔌 API Integration Updated today
A batteries-included Python client, CLI, and MCP server for the X (Twitter) API
View on GitHub → Try with Claude — $10 free →

Quick Install

Copy the config for your editor. Some servers may need additional setup — check the README.

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "xpal": {
      "command": "uvx",
      "args": [
        "xpal"
      ]
    }
  }
}

Or install with pip: pip install xpal

README Excerpt

A tiny, batteries-included Python client for the **X (Twitter) API** — one `xpal.client()`, five clean domain namespaces (`users` · `posts` · `timelines` · `bookmarks` · `dms`), built-in rate limiting, a **CLI**, and a bundled **MCP server** so any AI client can drive X over stdio. No globals, no env-var juggling, no per-call client wiring.

Tools (18)

PageX_ACCESS_TOKENX_ACCESS_TOKEN_SECRETX_AUTH2_ACCESS_TOKENX_BEARER_TOKENX_CONSUMER_KEYX_CONSUMER_KEY_SECRETaccess_tokenaccess_token_secretapi_keyapi_secretbearer_tokendictdm_actionsfollow_actionslike_actionsoauth2_access_tokenpost_actions