Model Context Protocol · Security · Scaffolding

MCP servers that start denied, not exposed

mcpnew scaffolds secure-by-default MCP servers in TypeScript or JavaScript — deny-all permissions, typed tool stubs, and audit hooks pre-wired from the first commit.

Get started View source
zsh
$ npx mcpnewcli create inventory --lang ts
 scaffolded inventory (ts)
  + src/server.ts          # typed tools + gates + audit hooks
  + src/audit.js           # JSONL trail → logs/audit.jsonl
  + mcp.permissions.json   # everything starts "deny"
$ npx mcpnewcli audit
✔ audit passed: deny-all posture intact, audit hooks wired

Secure by construction, not by intention

The default MCP demo copies an allow-everything posture into your codebase. mcpnew ships the opposite default and keeps it verifiable.

🔒

Deny-all permissions

Tools, resources, prompts, network, filesystem — every capability starts denied in mcp.permissions.json. Wildcards are rejected outright.

🧩

Typed tool stubs

mcpnew add-tool inserts a zod-schema'd stub already wired through its permission gate and audit hook. You write the body; the plumbing is correct on arrival.

🧾

Audit hooks pre-wired

Every tool call logs timestamp, tool, arguments, outcome, and duration to logs/audit.jsonl — gitignored, append-only, yours to ship anywhere.

Audit as a test gate

npx mcpnewcli audit exits non-zero if anything loosens: allow-all defaults, ungated tools, unwired hooks. Drop it into CI and stay honest.

⚙️

TS or JS, your pick

One flag switches between strict TypeScript (with manifest types) and plain ESM JavaScript. Both get identical security scaffolding.

📦

Zero-dep CLI

mcpnew itself has zero runtime dependencies on Node 18+. Your generated project depends only on the official MCP SDK and zod.

Three commands to a defensible server

From empty directory to CI-audited MCP server in under a minute.

Scaffold

mcpnew create srv

Pick TS or JS. You get a working stdio MCP server, tests that assert the deny-all posture, and a permission manifest where everything is denied.

Add tools

mcpnew add-tool search

Each new tool arrives typed, gated by requireAllowed(), audited — and denied until you flip exactly one manifest line after review.

Stay verified

mcpnew audit

Fails loudly when defaults loosen, tools lose their gates, or hooks go missing. Wire it into CI so drift never merges.

Pricing

The scaffold is free and open source, forever. Pro is for teams running MCP servers in production.

Open Source
$0 / forever
  • Unlimited scaffolds (TS & JS)
  • Deny-all manifests + typed stubs
  • Audit hooks & JSONL trail
  • mcpnew audit for local + CI
Use it now

FAQ

Does denying everything break my server?

No — denial happens per tool call with a clear error naming the manifest line to change. Scaffolded tests assert the posture you intend, so flipping a tool to allow is a reviewed, visible diff.

Which MCP SDK does the generated code use?

The official @modelcontextprotocol/sdk with zod schemas over stdio. No lock-in: it's ordinary SDK code you own and can extend.

TypeScript or JavaScript?

Both are first-class: --lang ts adds strict types for the permission manifest and tool args; the default JS build runs with zero build step.

What does Pro actually add?

Governance: pull-request diffs of permission manifests, required approval before any deny becomes allow, centralized audit-log shipping, and a compliance report mapping each grant to its approval record. One tier, $9/month.