Inspiration
If you pay for more than one coding agent you juggle four CLIs, four logins and four quota meters, and you only learn one is empty when it dies mid-task. Stitchwork stitches those limbs into one body.
What it does
Stitchwork is an open-source MCP gateway in front of Codex CLI, Claude Code, Gemini CLI and OpenCode. Any MCP client (Kiro, Claude Desktop, Cursor) sees one set of tools: agent_run, skill_run, agents_list, skills_list, quota_status.
- A shared rolling-window quota ledger is checked before every run, so an exhausted agent is refused before a call is wasted.
- agent: "auto" routes to the healthy agent with the most headroom (or a skill's preferred agents).
- When a vendor answers 429 / usage limit, the run fails over to the next agent and the limited one cools down.
- MCP progress notifications and cancellation (cancel kills the child process).
- Reusable Markdown skills with front matter.
stitchwork demoreplays the whole story with bundled stand-in CLIs: no subscriptions, no tokens. ## How we built it Spec-first in Kiro: steering docs, EARS requirements, design with correctness properties, task lists and agent hooks all live in /.kiro. TypeScript on Node 22 with zero runtime dependencies; property-based tests with fast-check. ## Challenges Every CLI reports usage differently (or not at all), so each adapter parses what it can and falls back to an estimate. Failover had to stay bounded and never fire on explicit runs. ## What's next Validate adapters against the latest real CLI releases and addstitchwork lab, a local dashboard for the ledger.
Built With
- claude-code
- codex
- fast-check
- gemini-cli
- kiro
- mcp
- node.js
- opencode
- typescript