mcp-x: 42 X API tools designed so the model can't burn your money
GoldBroccoli7073 · reddit · 2026-09-10
Finding the only existing X API MCP server abandoned at 64 stars and a single Python file, a developer rewrote it properly in Go: 42 tools across posts, users, lists and media, identical over stdio and http, every tool annotated with readOnlyHint/destructiveHint, returning structured JSON mirrored into the text block for clients that ignore structuredContent.
The core constraint: X killed its free tier and bills reads per resource returned, so asking for 100 results costs 20x asking for 5. Hence tool descriptions that argue for the smallest useful count, a sizing tool that costs no post-read budget, batch lookups, manual pagination, and hard spend ceilings in env vars rather than the model's hands.
Error handling turned out to be most of the work: X returns application/problem+ failures the Go client doesn't parse, so everything is classified into a domain error set surfaced identically from all 42 tools, with non-retryable errors stating "do not retry". The server refuses to start on bad credentials (catching the read-only-token trap where regenerating is required for write perms), and media upload reads only from a required MEDIAROOT with symlinks resolved — otherwise an LLM could read and publish any file on the host. MIT licensed, v0.1.1, with Docker image, prebuilt binaries and an .mcpb bundle.
Related event: Developer builds mcp-x: 42 X API tools designed to stop agents overspending(2 posts)→
More from coding & agent
- ScreenContext: free open-source Mac recorder that feeds screen videos to AI agents as context — MarcusSchiesser · 2026-09-10
- Dev: Plan 9's 30-year-old 9P protocol fits the external shape of agent systems — remilouf · 2026-09-10
- No frameworks, no magic: turning your work into a library the AI can actually search — dfinke · 2026-09-10
- Personal AGI experiment: a tiny harness, five tools, Markdown, one LLM to give agents memory — dfinke · 2026-09-10
- 16x Microsoft MVP livestreams Personal AGI: five tools and Markdown to make agents compound knowledge — dfinke · 2026-09-10
- asc CLI ships per-release changelogs designed for AI agents to consume — rudrank · 2026-09-10