TwitterXAPI
通过八个托管的MCP工具,为AI代理提供公开的X帖子、个人资料、对话、关注者、搜索和趋势。
托管 MCP 服务器
npx add-mcp 'https://twitterxapi.com/api/mcp'可安装到 Claude Code、Codex、Cursor 等客户端
文档
Give your agent rich X data
Connect Claude, Cursor or any MCP client to twitterxapi. Your agent can search posts, read profiles, threads, lists, trends and communities with eight ready-made tools.
{
"mcpServers": {
"twitterxapi": {
"type": "http",
"url": "https://twitterxapi.com/api/mcp",
"headers": {
"Authorization": "Bearer <TWITTERXAPI_KEY>"
}
}
}
}
claude mcp add --transport http twitterxapi \
https://twitterxapi.com/api/mcp \
--header "Authorization: Bearer $TWITTERXAPI_KEY"
{
"mcpServers": {
"twitterxapi": {
"type": "http",
"url": "https://twitterxapi.com/api/mcp",
"headers": {
"Authorization": "Bearer <TWITTERXAPI_KEY>"
}
}
}
}
Replace <TWITTERXAPI_KEY> with the key from your dashboard.
Get your API keyAdd the server to your clientAsk your agent about anything on X
🤖
Tools your agent can call
search_xSearch posts, accounts, or the posts behind a trend.
get_x_userA profile by username or ID, or the account's About information.
get_x_user_timelineOne page of an account's posts, posts and replies, or media.
get_x_user_networkOne page of followers, verified followers, following, or subscriptions.
get_x_postA post, or one page of its replies, thread, or retweeters.
get_x_listOne page of a List's posts or members.
get_x_trendsOne page of trends for a category.
get_x_communityCommunity information, or one page of its posts, members, or moderators.
Answers your agent can read
Each tool result includes Contentful text for the model to read and Moderate structured data for follow-up calls. Requests are billed per record, the same as the HTTP API.
Illustrative workflow, not a live response
Who are the most followed accounts replying to @marclou's latest post?
⚙get_x_user_timeline✓
⚙get_x_post · replies✓
I can compare the accounts in the returned replies by follower count, with links to each reply.
Connect your agent in a minute
Sign up with Google, copy your key into the config, and start asking.