mcpField
X
xdataapi: X (Twitter) data

xdataapi: X (Twitter) data

Remote
xdataapi.ioSocial Media1Updated 5w ago

About xdataapi: X (Twitter) data

xdataapi is a read-only MCP server for developers and AI agents to retrieve public X data, including profiles, posts, threads, and search results. It provides hosted access with OAuth or API-key authentication and charges credits for returned profiles or posts.

Key features

  1. 01Read public profiles and timelines
  2. 02Search posts with X operators
  3. 03Retrieve threads, replies, and quotes
  4. 04Inspect followers and following
  5. 05Track credit usage and balance

Use cases

  1. 01Research public X conversations
  2. 02Retrieve account and post data for agents
  3. 03Analyze followers and discussion threads

MCP support

The hosted MCP server at https://api.xdataapi.io/mcp exposes read-only tools for profiles, posts, search, and related data. MCP clients can authenticate with OAuth or an x-api-key.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://api.xdataapi.io/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

14
ParameterTypeRequiredDescription
freshbooleanNoBypass the cache. Costs 2x credits.
handlestringYesHandle, with or without @

Details

From the project README

xdataapi

Read-only public X (Twitter) data for developers and AI agents. Profiles, tweets, timelines, threads, followers, and search with the x.com operators. One credit per tweet or profile returned. Empty results and errors are free.

Not affiliated with X Corp. Public data only. No write endpoints.

MCP

Claude Code, as a plugin — the server plus a skill that teaches the search operators and the cost rules:

claude plugin marketplace add xdataapi/xdataapi
claude plugin install xdataapi@xdataapi

Or the server on its own, in any MCP client:

claude mcp add --transport http xdataapi https://api.xdataapi.io/mcp

The server signs you in with OAuth on first use. Clients without OAuth pass a key instead:

{
  "mcpServers": {
    "xdataapi": {
      "url": "https://api.xdataapi.io/mcp",
      "headers": { "x-api-key": "xd_live_..." }
    }
  }
}

Stdio-only clients can bridge with mcp-remote:

{
  "mcpServers": {
    "xdataapi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.xdataapi.io/mcp", "--header", "x-api-key:${XDATAAPI_KEY}"],
      "env": { "XDATAAPI_KEY": "xd_live_..." }
    }
  }
}

Tools: get_user, get_users, get_user_tweets, get_followers, get_following, get_follower_ids, search_tweets, get_tweet, get_tweets, get_thread, get_replies, get_quotes, get_retweeters, get_balance. All read-only. Listed on the official MCP Registry as io.xdataapi/xdataapi.

REST

curl "https://api.xdataapi.io/v1/tweets/search?q=from:x%20since:2026-09-01&count=20" \
  -H "x-api-key: xd_live_..."

Every response carries credits_charged and balance_remaining. Pages return next_cursor; pass it back as cursor.

SDKs

TypeScript, npm install xdataapi:

import { xdataapi } from 'xdataapi';
const api = xdataapi({ apiKey: process.env.XDATAAPI_KEY! });
const { data } = await api.searchTweets({ query: { q: 'from:x', count: 20 } });

Python, pip install xdataapi:

from xdataapi import AuthenticatedClient
from xdataapi.api.tweets import search_tweets
client = AuthenticatedClient(base_url="https://api.xdataapi.io", token=KEY, prefix="", auth_header_name="x-api-key")
page = search_tweets.sync(client=client, q="from:x", count=20)

The TypeScript client has no runtime dependencies; npm install xdataapi pulls one package.

Both are generated from openapi.yaml by sdk/generate.sh; the source is in sdk/typescript and sdk/python. Nothing in them is hand-written except the small wrapper in sdk/typescript/src/index.ts and the READMEs, so an API change means regenerating rather than editing.

Framework packages

Installable tools for agent frameworks. Each one carries the credit cost in every tool description, so the model can see what a plan costs before it runs it, and each takes a max_results cap so one agent step cannot empty the balance.

PackageInstallSource
LangChain and LangGraphpip install langchain-xdataapipackages/langchain
LlamaIndexpip install llama-index-tools-xdataapipackages/llama-index
n8ncommunity node n8n-nodes-xdataapipackages/n8n
Claude Codeclaude plugin install xdataapi@xdataapiplugins/xdataapi

For anything else, see examples/: CrewAI, the Vercel AI SDK, and the OpenAI Agents SDK. An agent that speaks MCP needs none of them.

Pricing

Prepaid credit packs from $10. Credits never expire. No per-call minimum. Rate limit rises with lifetime spend. Details: https://xdataapi.io/#pricing

Support

[email protected]. Security reports: https://xdataapi.io/.well-known/security.txt

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.