X (Twitter) MCP
X (Twitter) MCP server: post and thread from your AI agent
By ArturPublished Updated
X has its own MCP server now, and it is good at reading X. Posting through it still means an X developer app, your own pay-per-use bill and your own OAuth. Ampost's MCP server posts to X with the X calls included in your plan, and stops at a draft until you approve.
No review, but a bill per post
X has no app review: any developer app can post. What X charges instead is money per call. A plain post costs about 1 unit, a post with a link about 13, so a link is the expensive part of any X post.
On Ampost, X is part of the Max and Scale plans. Max includes 660 plain posts (or 50 with links) every 30 days, Scale 1,320 (or 101). Ampost checks the allowance before each billed call, so an agent in a loop gets a clear error rather than a surprise bill.
X limits your agent works within
- Text
- 280 characters
- Media
- up to 4 images or 1 video
- Sizes
- images 5 MB, videos 512 MB (larger files are compressed to fit before publishing)
- Video length
- up to 2 min 20 s (longer videos are refused, never trimmed)
- First comment
- yes, up to 280 characters
- Thread
- up to 25 follow-up posts
- Alt text
- up to 1,000 characters on images
- Publish pace per account
- 90 per 15 minutes
Each post in a thread has its own 280 characters, and posts_validate names the item that is too long (thread[2]) before anything is billed. options.twitter has three fields: text to word the X version differently from the other networks, firstComment for a self-reply, and thread for up to 25 follow-up posts. Images (up to 4) and a video don't mix in one post; alt text goes on images.
A worked agent run: a thread with a chart
You: Post this as an X thread: the headline first, then the three changes, and attach the chart to the first post.
Agent → posts_create {
"targets": [
{
"platforms": [
"twitter"
]
}
],
"text": "Our API now answers in 80 ms at p95, down from 210 ms. What changed:",
"media": [
{
"url": "https://cdn.example.com/latency.png",
"type": "image",
"altText": "p95 latency falling from 210 to 80 ms"
}
],
"thread": [
{
"text": "1. Connection pooling in the edge function"
},
{
"text": "2. One query instead of four for the post list"
},
{
"text": "3. Media metadata cached for 24 hours"
}
]
}
← { "id": "…", "status": "draft" }
Agent: Draft ready: 4 posts, each under 280 characters, the chart on the first. Publish?
You: Yes, publish it.
Agent → posts_publish { "postId": "…" }
← { "status": "published", "platformPosts": [{ "publishedUrl": "https://x.com/yourhandle/status/1861234567890123456" }] }
Agent: Published. The thread used 4 posts of your X allowance.The thread publishes in order, each post replying to the one before. If X refuses post three, posts one and two stay up and posts_get says which one failed and why; posts_retry continues from there.
A shorter run, where the agent names the cost of a link before you pay it:
You: Tell X the docs are live, with the link. Show me first.
Agent → posts_create { "targets": [{ "platforms": ["twitter"] }],
"text": "The new docs are live: https://example.com/docs" }
← { "status": "draft" }
Agent: Draft ready. It carries a link, so it uses about 13 plain posts
of your X allowance. Post it as is, or drop the link?When you don't need Ampost
- You mostly read, search or follow trends. X's hosted server at
https://api.x.com/mcpreads posts, users, bookmarks, news and trends, and has aread_onlymode. You need your own X app's Client ID from the Developer Console, because it doesn't register clients for you (X's docs, read 2026-11-25). - You already pay for the X API and post from one account. xdevplatform/xmcp runs locally and exposes the whole X API, posting included, with your consumer key, secret and bearer token. EnesCinr/twitter-mcp is a lighter choice for posts, replies with images and search. With your own key, both are enough.
- You want X data for research. Ampost doesn't search X or read timelines; it reads only your own posts' results.
Ampost fits when one agent posts the same news to X and other networks, when you manage several X accounts, or when you would rather not run an X app, its OAuth and its media upload. The REST side is on the X API page.
Set it up
Follow the install guide for your client, then ask the agent to connect X. The Ampost MCP server page has the tool list and the other networks.
FAQ
X and Twitter MCP questions
Is there a Twitter MCP server on GitHub?
Several. xdevplatform/xmcp is X's own: it turns the X API's OpenAPI spec into tools you run locally with your app's keys. EnesCinr/twitter-mcp is a small community server that posts, replies with up to 4 images and searches, also with your own developer keys.
Is there a free X MCP server?
The servers are free; X's API is not. Every post through your own app is billed by X under pay-per-use. On Ampost the X calls are included in the Max and Scale plans, up to the plan's X allowance.
How do I post to X from Claude?
Add Ampost's server to Claude, sign in, connect your X account with accounts_connect, and ask. Claude drafts with posts_create and posts only after you confirm with posts_publish.
What is the X MCP server URL?
X's hosted server is https://api.x.com/mcp, and it needs your own X app's Client ID. Ampost's is https://api.ampost.io/mcp, which signs you in with your Ampost account and needs no X app.
Twitter MCP or X MCP: is there a difference?
No. Twitter became X in 2023, and the API kept the same posts endpoints. Tools still say tweet or post depending on when they were written.
Related resources
More on X and MCP
The X API page, the MCP server hub and the per-client install guide.
Let your agent write the thread
Pick a plan with X, connect your account from the chat, and approve the first thread.