saas-audit-mcp
Audits a Next.js App Router codebase, reporting size, routes and middleware protection, data model usage, environment variable wiring, and locale completeness to surface gaps between declared and actual behavior.
Reads the Prisma schema and cross-references every model against Prisma client calls in the codebase, showing how often each model is queried and identifying models that are never used.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@saas-audit-mcpRun a full audit on this Next.js repo and show gaps."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
saas-audit
Tell a Next.js codebase's claims from its behaviour. One command reports the gaps between what a repository declares and what it actually runs — a Prisma model nothing queries, an environment variable nothing reads, a locale that drifted out of sync.
Zero dependencies. It reads files. It never runs your code, opens your database, or sends anything anywhere.
npx saas-audit Codebase audit
────────────────────────────────────────────────
Size (code = non-blank, non-comment lines)
src/app 40 files 2375 code
src/components 27 files 1890 code
src/lib 10 files 858 code
────────────────────────────────────────────
total 101 files 6248 code
Data model (uses = Prisma client calls in src/)
User 16 fields 25 uses
Organization 8 fields 2 uses
ApiKey 10 fields 6 uses
Locales (8 declared · 374 keys in en)
en complete fr complete de complete …
No findings. Every model is queried, every env var is wired,
every locale is complete.Why
Three defects are invisible to TypeScript, invisible to your test runner, and invisible in review — and each one ships regularly:
Defect | What you see | What actually happens |
A Prisma model nothing queries | a feature in the schema | an empty table, forever |
| works on your machine |
|
A translation key in | the English page is fine | every other language throws at render |
saas-audit looks for exactly those. When it prints nothing, that is a result.
It came out of a commercial Next.js starter whose landing page makes claims about its own code. Running this in CI is how those claims stay true — and the first run reported six findings against the very repository that shipped it.
Related MCP server: Next.js MCP Server
What it reports
Size — files, total lines, and lines that are neither blank nor a comment, per directory. Two numbers, because "lines of code" means whatever the author wants it to.
Routes — derived from
src/app/, never a hand-kept list, with whethermiddleware.tsmatches each one. A blank is not a guarantee: a route can guard itself.Data model — every Prisma model with how many times
src/calls its generated accessor.Environment —
.env.examplecross-checked against everyprocess.env.Xinsrc/and everyenv("X")in the schema, in both directions. Variables read by an SDK rather than by your code are listed apart instead of called dead.Locales — for a
next-intlproject: per language, keys missing against the default, extra keys, empty values, and ICU placeholder drift —{count}in one file and{n}in another, which typechecks and throws for that language's visitors.
Use
npx saas-audit # report on the current directory
npx saas-audit ../other-app # somewhere else
npx saas-audit --json # for a script
npx saas-audit --strict # exit 1 on any findingIn CI:
- run: npx saas-audit --strictFor coding agents (MCP)
The same analysis, over the Model Context Protocol. An agent asking route_map
gets every route and its protection in one call, instead of reading twenty files
and guessing.
claude mcp add saas-audit -- npx -y saas-audit-mcpAny MCP client works — stdio transport, JSON-RPC 2.0:
{
"mcpServers": {
"saas-audit": { "command": "npx", "args": ["-y", "saas-audit-mcp"] }
}
}Eight read-only tools: audit, route_map, data_model, plans, locales,
env_check, size, conventions. Nothing writes a file, runs a migration or
touches a database, so an agent can explore without asking permission.
What it expects
A Next.js App Router project. Everything else is optional and skipped when absent:
prisma/schema.prisma→ the data model section.env.example→ the environment sectionsrc/middleware.tswithcreateRouteMatcher([...])→ route protectionsrc/i18n/routing.ts+src/messages/*.json(next-intl) → the locale section
Pages Router is not supported. Drizzle is not read yet — open an issue if you want it.
What it is not
Not a linter, not a formatter, not a type checker, not a security scanner. Those exist and are good. This answers one narrower question: does this repository do what it says it does?
Extracted from SaaS Starter, a Next.js 15 SaaS boilerplate that publishes this command's output on its own landing page. MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Website QA for your coding agent: audit SEO, performance, security, accessibility over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server for AI coding agents to inspect repositories, audit code quality, route engineering skills, and plan safe issue/PR workflows.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible clients to inspect Next.js codebases, analyze App Router and Pages Router structure, discover API routes, and audit build performance through controlled tools.24MIT
- AlicenseAqualityCmaintenanceRead-only MCP tools for coding agents to audit deployment targets, detect fabricated code, review backlog, database schema, analytics, ML models, architecture docs, and decision lenses.1119MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to audit and safeguard repositories by detecting dependency pinning issues, license compliance problems, hardcoded secrets, and dead code through MCP tools.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/THE-KIPDEV/saas-audit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server