Nifra docs, runnable examples, and API types as an MCP server for any AI assistant.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
The AI-native TypeScript framework.
Typed APIs and full-stack SSR on five UI libraries, one app across Bun, Node, Deno, and the edge -
built so both humans and coding agents can change it safely.
Documentation · Playground · Benchmarks · vs. other frameworks
Most code is now written with an AI agent in the loop - and agents drift. They call an endpoint that moved, expect a response shape that changed, or hand-roll fetch with types that rot. Nifra removes that class of bug at the framework level: the client is inferred from the server's TypeScript (drift is a compile error), the docs are a live MCP server (agents read the real API, not stale memory), and a route-assurance gate fails the build when any route - human- or agent-written - ships without its required security evidence.
or start with just a typed API:
Routes are typed automatically from their path literals, handler context, and return values. Add a Standard Schema when you need runtime validation/coercion or an explicit request/response contract:
Change a route and every caller stops compiling until it's updated. That one property is what keeps agent-edited codebases correct. For a decoupled, versionable surface, use defineContract + implement.
Register the MCP server and any coding agent reads your live routes, fetches version-checked examples, runs real requests against the app it just edited, and gates its own drift:
The loop covers live project context and routes, verified docs/examples/types, checks with structured
fixes, real requests and SSR renders, request inspection, tests, assurance, and verification levels.
nifra_context and nifra_example are version-aware; nifra_run, nifra_render, and
nifra_inspect verify what the edited app actually does; nifra_check and nifra_assure close the
drift and security gates. Full tool list →
Agents that read skills get the conventions too - the same four skills on every surface:
Not in a Nifra repo? The docs tools are also hosted - add https://mcp.nifra.dev to Claude, Cursor, or ChatGPT and it learns Nifra from the same verified corpora, no checkout. One MCP, two transports (the same hosted-plus-local pairing Supabase, Stripe, and GitHub use): project tools run only on your machine over stdio - your code never reaches our servers.
The same public contracts also cover applications that are agent products:
| Use case | Packages | What it provides |
|---|---|---|
| Bounded agent turns | agent | Typed tools, budgets, approvals, resumable token-only evidence, token streaming, and shared run state. Model, storage, and policy stay injected ports. |
| Coding-agent host | coding-agent · agent-protocol · pi | A standalone nifra-agent host with sessions, workflows, extensions, post-turn verification with bounded automatic repair, native approval events/resolution, local RPC, and an optional Pi backend. |
| Browser and desktop UI | agent-app · runner · apps/workbench | Content-free negotiated views, ordered/resumable event handling, capability registry, decision inbox, Run Studio projections, and structured in-process request runs. |
| Protocol bridges | a2a · ag-ui | A2A 1.0 JSON-RPC/SSE and AG-UI SSE endpoints over the same agent runner, including typed human-in-the-loop resume. |
| Observability and skills | agent-telemetry · skills | Token-only OpenTelemetry run traces and portable skills that keep agents pointed at the live MCP contract. |
bun add @nifrajs/coding-agent @nifrajs/pi
bunx nifra-agent --backend pi --message "run the checks and explain failures"
--verify-after-turn check --max-repair-attempts 2
Provider credentials, durable state, authorization, and approval policy are application ports rather than hidden framework state. The local process adapter contains crashes and accidents but is not a hostile-code sandbox; use OS-level isolation for untrusted code. A2A and AG-UI mounts likewise require the host application to add authentication and authorization at its route boundary.
Three CI gates turn security posture into build failures:
nifra assure - a policy file classifies every route by reflection and fails CI naming exactly what evidence is missing: authentication on a write, a rate limit, CSRF, a body cap. No other framework ships this.nifra capabilities check - routes declare effect tokens ({ capabilities: ["db.write"] }); the check compares what a route says against what its module graph can actually reach, pinned in a lockfile. A GET that can reach a domain write is an error.nifra manifest diff - one hash-verified artifact of contracts + assurance + effects + response sensitivity; deploy promotion fails closed on breaking contracts, lost assurance, or newly exposed sensitive fields.Security & hardening → · Effect provenance → · Verification ladder →
The same routes, loaders, actions, streaming SSR, defer()/<Await> progressive rendering, islands,
and typed data layer work on React, Vue, Solid, Svelte, or Preact - switching is one adapter
import, not a rewrite. File routing, SSG/ISR, progressive-enhancement forms, query cache, and server
functions whose bodies never ship to the browser.
Frameworks → · Rendering → · Server functions →
Nifra includes a conservative Tailwind → StyleX codemod for static JSX class lists:
The codemod rewrites supported className="..." attributes to stylex.props(...) and a local
stylex.create(...) table. It understands responsive breakpoints and element-local pseudo-classes.
Dynamic class expressions, arbitrary values, parent-dependent variants, and unknown utilities are
left untouched with file/line diagnostics for manual review. Use --dir <path> to scan a subdirectory.
StyleX compilation is built into Nifra's Bun pipeline. Install the runtime and optional compiler peers,
then register both browser and SSR transforms in nifra.config.ts:
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/nifra-docs)<a href="https://allmcps.com/mcp/nifra-docs"><img src="https://allmcps.com/api/badge/nifra-docs?style=directory" alt="Nifra docs on AllMCPs" /></a>