Skip to content
cheapxapi

MCP server

X data in your AI agent, one URL away.

Add https://api.cheapxapi.com/mcp to Claude Code, Cursor or any MCP client that supports remote servers, with your API key in the x-api-key header. Your agent gets 31 read-only tools for profiles, tweets, search, followers, lists, communities and trends.

$0.0006 per tool call, pay as you go. No X developer account, no cookies, nothing to install.

Connect in a minute.

  1. 1. Create an account and copy your API key from the dashboard.
  2. 2. Add the server to your client with the snippet for it, replacing YOUR_KEY.
  3. 3. Ask your agent something that needs X data, for example “What did @NASA post this week?”

The key in the header is the only credential. Keep config files that contain it out of shared repositories.

claude mcp add --transport http cheapxapi https://api.cheapxapi.com/mcp \
  --header "x-api-key: YOUR_KEY"

31 tools, all read-only.

Each tool is one API endpoint; its arguments are that endpoint’s query parameters. Paginated tools return next_cursor; the agent passes it back as cursor for the next page, and each page is one call.

Users

Followers

Tweets

Lists

Communities

Trends

* required argument. Full parameter and field reference on each linked docs page.

What a tool call returns.

The server speaks MCP over Streamable HTTP: JSON-RPC in a POST, plain JSON back, no session to keep. A tool result carries the endpoint’s JSON response as text, exactly as the REST API returns it.

When the API answers with an error status, the result has isError set and the text HTTP <status>: <body>, so the agent can read why. A call without a key returns “Missing API key” and is not charged.

curl -X POST https://api.cheapxapi.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Response to “Call a tool”, captured live

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"status\":\"success\",\"message\":\"check follow relationship success\",\"data\":{\"following\":false,\"followed_by\":true}}"
      }
    ],
    "isError": false
  }
}

The text, parsed

{
  "status": "success",
  "message": "check follow relationship success",
  "data": {
    "following": false,
    "followed_by": true
  }
}

What an agent’s work costs.

You pay per tool call, not per item returned. A search page holds up to 20 tweets and a followers page up to 100 profiles, so jobs that read many items cost far less than on the official X API, which bills each item.

Rate limit: 2 calls a second until your first top-up, 10 after. See pricing and how other providers compare.

List prices, USD
JobTool callscheapxapiOfficial X API
Look up 100 profiles100$0.06$1.00$0.01 per user
Read 1,000 tweets from a search50$0.03$5.00$0.005 per post
List 10,000 followers with profiles100$0.06$100.00$0.01 per follower

Official prices: X API pay-per-usage list prices from X’s developer documentation. Tweet counts assume full pages of 20.

Building it yourself instead?

  • API documentation: every endpoint behind the tools, plus the account actions (posting, liking, following) that MCP does not expose.
  • OpenAPI spec for generating your own client or tool definitions.
  • llms-full.txt: the whole reference in one text file for an agent’s context.

Questions.

Is there an MCP server for Twitter (X)?

Yes. cheapxapi hosts one at https://api.cheapxapi.com/mcp. It gives AI agents 31 read-only tools for X data: profiles, tweets, advanced search, replies, followers, lists, communities and trends. You add the URL and your API key to your MCP client; nothing to install or run.

What does it cost?

$0.0006 per tool call, billed to your API key from a prepaid balance, the same as a direct API request. Listing the tools and connecting are free. Calls that fail on our side (rate limited, insufficient balance, invalid key, service errors) are not charged.

Can the agent post tweets or send DMs through it?

No. The MCP server exposes read-only tools only. Posting, liking, following and messaging exist as account-action endpoints in the REST API, not as MCP tools.

Do I need an X developer account or X cookies?

No. Your cheapxapi API key is the only credential. The tools read public X data; no X account, developer app or cookies are involved.

Which clients work?

Any MCP client that connects to remote servers over Streamable HTTP and lets you set a request header, such as Claude Code and Cursor. The server answers with plain JSON (no event stream) and keeps no session, so it also works behind proxies that do not hold connections open.

Is there a local version I can run with npx?

Not yet. The server is hosted only, so clients that run local (stdio) servers only cannot connect to it directly.