Dev ships MCP-X: a 42-tool Go server for the X API, designed around pay-per-use survival

GoldBroccoli7073 · reddit · 2026-09-10

Tired of Twitter's engagement obligations, an engineer handed the X API to his coding model and built a full-surface MCP server: 42 tools covering posts, users, lists and media, 12k lines of Go with tests, stdio and HTTP transports (repo).

The design is mostly about money, since X now bills per use and reads are billed per resource returned (maxresults 100 costs 20x maxresults 5): every read tool instructs the model to request the smallest result count, a count tool sizes topics before searching, lookups are batched, and pagination is deliberately manual. Failing loudly: the server refuses to boot on bad keys and catches the read-only token trap (fix: regenerate the access token, not the API key); error messages are written for models and mark non-retryable errors.

It's explicitly not an engagement farm — posts publish for real, deletes are irreversible. v0.1.1 caveats: no DMs, no streaming, 7-day search limit, one account per process, and a funded developer account is required.

Related event: Developer builds mcp-x: 42 X API tools designed to stop agents overspending(2 posts)→

Original post →

More from coding & agent

coding & agent channel →