strata
About
Strata composes verified and deterministically personalized backend modules into your codebase
Details
- Author
- stratalib
- Categories
- Developer Tools
Jump to
Setup
Install strata in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/stratalib/strata
Follow the installation instructions in the repository README, then restart your MCP client.
Your agent writes the backend. Strata proves it runs.
An MCP server that composes verified backend modules into your codebase — reading your schema, following your conventions, wiring them in the order Express actually requires — then writes one command that boots the app and exercises every requirement against a live server.
$ # your agent calls one tool, once strata_use dir=./shop-api task="product list API" capabilities=[ "cursor pagination with sorting", "per-IP rate limiting", "structured request logging" ] FILES CREATED server.js strata/lib.js — the implementation these import from strata/verify.js — boots the app and exercises the feature end to end $ npm install && node strata/verify.js PASS unit selftests — 3 passed, 0 failed PASS server boots and answers /health PASS correlation id honours an inbound x-request-id PASS an authorization header is NOT written to the log PASS a password in a request BODY is NOT written to the log PASS a malformed body is a 4xx and leaks no stack trace to the caller PASS /items walks pages by cursor without repeating a row PASS a sort field that is not allowlisted is REJECTED, not honoured PASS a burst past capacity yields 429 + Retry-After 12/12 checks passed — the delivered feature works end to end.
- Schema-aware composition— reads Prisma, Mongoose, Drizzle, TypeORM, Sequelize or plain JS and wires modules against your real entity, fields and ID column
- Correct middleware ordering— logging above body parsing, rate limits above routes, error handlers last, enforced by rank rather than left to the model
- Generated end-to-end verifier—strata/verify.jsboots the app on a free port and drives every requirement against it
- Six machine-checked admission gates— no module reaches your project without passing all of them
- Honest declines— refuses roughly a third of tasks, where composing costs more than writing the code
$ # asked for something the library does not cover strata_use task="slugify helper" capabilities=["convert a string to a url slug"] No verified Strata recall covers "slugify helper". Build it from scratch the normal way — a clean hand-written implementation is the right outcome here, not a forced match.
- Local by construction— your source and schema never leave the machine; only the task text is sent
Run one task three times with one model. The interesting question is not"was it good"— it is"was it the same".
On the two tasks the library covers well,every Strata run returns the identical score— a run-to-run spread of 0.0 points against baseline's 26.9 on idempotency. Strata does not beat the ceiling; a good baseline run reaches 86% at best. It reaches itevery time.
That 14% is not a grading artefact — it repeats on re-grade. The session invented an order API whose create endpoint rejected every request shape the grader tried, and since everything else depends on creating an order, five checks collapsed at once.A cliff, not a slightly worse result, and nothing in the session's own output says it happened.
Baseline also editedprisma/schema.prisma— the database schema — in two of three runs, on a task that never mentions the data model, and touched six different files across three runs with only two written every time. You cannot predict which files come back changed. Strata touched0.3project files per run and wrote 46 lines to baseline's 201.
Where it does not hold:stripejune is published with its failures intact. Both arms produce a build that does not run — baseline never wrote an entry point in one run, Strata shippedbullmq@5.81.3pinned besideredis@4.7.1in another, which cannot install. Both packages are model-chosen; Strata covers the webhook and nothing else there. That is the rule the whole board obeys:the advantage tracks how much of the task the library actually covers.
n=3, Claude Haiku 4.5, one model per cell. Cost is the least stable number here — it moves with the model, the prompt and the machine. The consistency figures need no such caveat.
Everything below is a five-arm battery on adifferent prompt instrument. Its numbers are never averaged with the v1.1 cells above.
60 full agent sessions: four backend tasks, five arms, three runs each. Checks were frozen and published before the first run, every check carries a negative control proving it can fail, and every output tree is archived. Delivered module source is not published — modules live in the hub and reach a project at call time.
"Worked first try" = every pre-registered check for that task passed, with no second attempt. Plain haiku is the cheapest per run and produced nothing that fully worked in eleven attempts.
Two checks were failed by every baseline run at every tier and passed by every Strata run— a rate limiter whose window never refills (baseline 0/9, Strata 6/6) and a malformed request that returns a stack trace to the caller (0/9, 6/6). haiku 0/3, sonnet 0/3, opus 0/3 on both. A larger model fixed neither.
This battery measured a cost premium— +26% on haiku, +51% on sonnet — caused by reading rather than writing: most of an agent bill is re-reading accumulated context, and a session here read ~12–14k tokens of delivered implementation where a baseline read ~1k.
v1.1 removed it.The implementation is now installed as a dependency instead of copied in as source, the unit-test layer is no longer shipped, and the delivery leads with the result of a verification run the engine already performed. On the same catalog task the premium became0.40× baseline cost. See the v1.1 figures above; the sentence about a premium describes this older battery only.
Roughly three quarters of the advantage is in defects you would not have noticed— edge cases, timing, and correctness bugs that surface later as incidents. On defects youwouldnotice, a plain model is already right 86.4% of the time. That is whystrata/verify.jsexists: it turns correctness into a list of named checks you can read.
Full methodology, per-run scores, the visible/invisible split and every instrument defect found along the way:docs/BENCHMARK.md.
Prerequisites:Node.js ≥ 18 and any MCP client — Claude Code, Cursor, Windsurf, VS Code or Claude Desktop.
// .mcp.json (or claude_desktop_config.json for Claude Desktop) { "mcpServers": { "strata": { "command": "npx", "args": ["-y", "stratalib"] } } }
Restart the client and ask for a backend feature that needs several parts:
Add cursor pagination, per-IP rate limiting and request logging to the products API.
Strata reads the project, composes the modules, writes the files, and prints what it created and what it modified. Then:
npm install && node strata/verify.js
[!NOTE] No API key and no account. Modules are served from the hub; the task text is the only thing sent. Your source, schema and files stay on your machine.
Strata registers exactly one tool. Every tool in an MCP schema is billed on every turn, so the surface is kept to one that does the whole job.
Returns the files created and modified, the exports available from each module, and the command to verify the result.
1 · Reads the project— locates the ORM and extracts the real entity: fields, types, enums and the actual ID column. Deterministic, in Node, before the model sees a byte. Where the entity cannot be identified with confidence, Strata leaves a slot rather than guessing.
2 · Selects modules— each capability phrase is scored against the library, and anything matching on shared vocabulary alone is discarded. Fewer than two surviving modules triggers a decline.
3 · Composes— modules contribute to the app rather than owning it, each contribution carrying a rank that fixes its position in the middleware chain. A malformed request throws during body parsing, so logging mounts above it; get that backwards and the one request most worth tracing is the one that loses its correlation id.
4 · Writes the verifier—strata/verify.jsruns each module's own suite, boots the app on a free port, and exercises every requirement against it. Built against your entity, so the checks run on your fields and your routes.
Every module passes six machine-checked gates before it can be served. A module that fails is discarded, not repaired — hand-patching generated modules returns coverage to craft and stops it scaling.
The adversarial gate is the one that matters. Every hand-written module in this library shipped with a real bug its own tests did not catch — a 404 that reset a circuit breaker's failure count, a dropped enum constraint, an attacker-controlled request id echoed into a response header. A confirmatory suite admits exactly those.
Modules are served from the hub; the task text is the only thing sent. Your source, schema and files stay on your machine.
npm install node --max-old-space-size=8192 node_modules/typescript/bin/tsc -p tsconfig.mcp.json # build node scripts/admit-recall.js recalls/<domain>/<name>/v1 # run the gates node benchmark/quality/negative-control.js # prove the checks can fail node benchmark/run-quality-battery.js --tasks catalog --max 3 # collect runs
STRATA_MODE=localcomposes against a localrecalls/checkout instead of the hub — required when testing a module that has not been deployed.
Built on the Model Context Protocol, Express, Prisma, Mongoose, Drizzle, TypeORM and Sequelize.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Create crafted UI components inspired by the best 21st.dev design engineers.
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.
Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





