Kestrel: Post to X from Your Terminal (or Let Your AI Do It)
If you have ever wanted to fire off a tweet without leaving your terminal, or better yet, hand the keys to an AI agent and trust it not to burn through your X API budget, Kestrel has you covered.
Kestrel is a Rust CLI that posts to X (Twitter) and doubles as an MCP server so AI agents can post through it. The killer feature: a hard daily post limit, shared between the CLI and the MCP server. Your agent might be chatty, but Kestrel knows when to say “that’s enough for today.”
Two modes, one binary
From the terminal, it is dead simple:
Fire up the MCP server with kestrel serve and suddenly Claude Code, Claude Desktop, or Hermes can post on your behalf with exactly the same guardrails. No separate config, no backdoor. If the daily limit is hit, the MCP tool returns an error result instead of posting. Your credit card stays safe.
The economics of X posting in 2026
Here is the part that makes Kestrel genuinely useful instead of just fun. Since February 2026, X’s API is pay-per-use with no free tier. Every post costs real money:
- Plain text tweet: $0.015
- Tweet with a URL: $0.200 (yes, 13x more)
- Summoned reply: $0.010
A link surcharge that steep means one careless agent posting URLs could run up a bill fast. Kestrel’s daily limit is your safety net. At 50 posts per day, plain text costs $22.50/month. With links mixed in at 30%, that jumps to $90/month. Kestrel makes sure you know exactly where you stand.
Built to be boring (in the best way)
The config lives in ~/.config/kestrel/config.toml with 0600 permissions. State is tracked in a tiny JSON file that resets at midnight local time. One binary, one config file, one state file. No daemon, no database, no cloud service. It works the same whether you type kestrel post or your AI agent does.
The MCP server exposes exactly two tools: kestrel_post and kestrel_status. That is it. No read access, no timeline scraping, no DMs. Kestrel is built for one job and it does not overreach.
Worth a look if
You post from the terminal, you run AI agents that need controlled X access, or you just appreciate a well-scoped Rust tool that respects your wallet. The repo has a clear README with pricing tables, troubleshooting guides for every HTTP error code, and a one-command install via cargo install --path ..