Anvil is a backend framework built for a world where APIs get called by both browsers and AI agents. Write one route file, you get a REST endpoint, an MCP tool, and an A2A skill, all sharing the same schema, checked at build time. No hand-wiring MCP SDKs on top of Express, no duplicating validation across three layers.
Hey Product Hunt 👋
I built Anvil because I wanted an Express-level flexible backend framework with Next.js-style file routing and real compile-time schema validation, without wiring up a dozen separate libraries for auth, rate limiting, observability, and crash recovery on every project.
One route file gives you a type-safe REST endpoint out of the box. Auth, sessions, rate limiting, tracing, and crash-resumable checkpointing come with the framework, not bolted on later.
Since a lot of what I build these days touches AI, Anvil also has an optional layer for that: expose any route as an MCP tool or A2A skill, or add a full agent runtime with tool-calling, streaming, multi-model fallback, evals, and memory/RAG. None of it is required, it's there when you need it.
200+ tests, still actively hardening a few areas (validation coverage, streaming, vector store adapters, sandboxing), roadmap's open, feedback welcome.
Would love for you to try `npx anvil init` and tell me what breaks. 🙏
Report
Finally got to play with Anvil and it's refreshing to have one source of truth for both REST and MCP. One thing I'd love to see is built-in support for streaming responses in the route files, especially for long-running agent tasks where you want to send partial results back without blocking the whole request. That would make it a no-brainer for real-time use cases.
Report
The build-time schema check is genuinely useful, caught a mismatched response type before I even hit run. Love that one route file gives me MCP, REST, and A2A without any glue code.
CodeNearby
Finally got to play with Anvil and it's refreshing to have one source of truth for both REST and MCP. One thing I'd love to see is built-in support for streaming responses in the route files, especially for long-running agent tasks where you want to send partial results back without blocking the whole request. That would make it a no-brainer for real-time use cases.
The build-time schema check is genuinely useful, caught a mismatched response type before I even hit run. Love that one route file gives me MCP, REST, and A2A without any glue code.