Connect PrimaryAPI’s MCP server and your agent can search X, read profiles, posts, replies and whole threads, and check what is trending, all with one key.
Server URL
claude mcp add --transport http primaryapi \
https://api.primaryapi.com/mcp \
--header "Authorization: Bearer $PRIMARYAPI_API_KEY"Run it in a terminal. Your shell fills in the key from the environment.
Ask your agent
Get the replies to this post and tell me which objections come up most: <post URL>
X APIs
Your agent runs each one with run_api and its name. Prices are in credits, from 1 credit per call, and a call that fails costs nothing.
X is a trademark of its owner. PrimaryAPI is not affiliated with X.
How it works
Connected to the server, the agent lists the X APIs or searches for what it needs, reads the chosen API’s input schema, and runs it with your key. You set the key’s spend limit, so it can only spend what you allow.
What an MCP server is, and every tool it has · X in the API reference
// Find every X API. No key needed.
{
"name": "list_apis",
"arguments": {
"platform": "twitter"
}
}
// Run one with your key.
{
"name": "run_api",
"arguments": {
"sku": "twitter.replies",
"input": {
"url": "https://x.com/NASA/status/1846987139428634858"
}
}
}Yes. Search takes X’s advanced search syntax, such as from: and since:, and returns posts with their author and engagement, a page at a time.
Yes. It resolves the thread a post belongs to, from the first post through the author’s own continuations, and it can list the replies to any post.
No. These APIs read public X data only, so an agent can research and monitor but not post, like or follow.
No. PrimaryAPI runs this MCP server and is not affiliated with X. It gives your agent public X data through PrimaryAPI’s APIs, next to every other platform in the catalog.
No. Your agent uses one PrimaryAPI key for every X API on this page and for the rest of the catalog. There is no X app to register.
Connecting and browsing are free. Each X API above has its own price in credits, and you only pay when data comes back.
Create an account, make a key with a spend limit, and add one URL to your MCP client.