“It works with my client” is not production readiness. A production MCP server needs a predictable contract, bounded resource use, diagnostic evidence, and a security boundary that does not depend on the model behaving well.
Use this checklist as a release gate. Each item should have an artifact: a test, a config, a documented decision, or a monitoring signal.
Build and dependencies
- TypeScript builds with
strictenabled and no ignored errors. - The MCP SDK and runtime are pinned in a lockfile; upgrades are reviewed against the protocol revision.
-
npm cireproduces the build from a clean checkout. - The shipped artifact contains only runtime dependencies and no development secrets.
- The Node.js version is declared and matches the deployment runtime.
Tool contract
- Every tool has a narrow input schema with descriptions and bounded values.
- Read-only and destructive annotations match actual behavior.
- Every tool declares and enforces its own authorization checks.
- Results are bounded; large output is paginated, truncated, or linked.
- Errors set
isErrorand include a non-sensitive explanation. - Inputs and outputs are tested for missing fields, wrong types, and oversized values.
- Tool names are stable; breaking changes are versioned or migrated.
Resource and network limits
- Per-call timeouts are enforced on outbound requests.
- Request concurrency is capped.
- Memory and payload limits are explicit.
- Rate limits protect upstream APIs and your own process.
- Recursive filesystem or crawler operations have depth and size limits.
- A cancellation or timeout path terminates work instead of leaking it.
Authentication and authorization
- Credentials come from a secret manager or environment, never from tool arguments.
- Tokens are scoped to the minimum resources and are rotatable.
- Remote endpoints use TLS and validate Origin.
- The server distinguishes 401 from 403 and does not leak token details.
- Multi-tenant requests cannot cross tenant boundaries.
- Logs redact Authorization headers, cookies, and query strings with tokens.
Observability
- Structured logs go to stderr, not stdout, for stdio servers.
- Logs include request id, tool name, duration, and outcome; never full payloads.
- Errors are counted and alertable.
- A health endpoint exists for remote deployments but does not pretend to validate MCP sessions.
- You can trace a user report to a specific tool invocation without storing sensitive content.
Lifecycle
- SIGINT and SIGTERM close the transport, database pools, and child processes.
- Startup validates required configuration and fails with a clear message.
- The container runs as a non-root user with a read-only filesystem where possible.
- Deployment has resource requests and limits.
- The process can restart without duplicate side effects or leaked locks.
Testing and release
- Unit tests cover tool handlers and schemas.
- An integration test exercises the server through the MCP transport.
- At least one test covers an upstream failure and a permission denial.
- A fresh client can connect using the documented configuration.
- The README names supported clients, transports, environment variables, and limitations.
- A rollback path exists for config and server versions.
Common production failures
A server that passes a demo often fails on one of four edges: an upstream timeout that hangs the request, a token with broader access than expected, an unbounded result that exhausts context, or a process that logs to stdout. Each is a design decision, not bad luck.
For remote deployments, continue to deploy an MCP server and monitor and scale. For the security model, read securing MCP servers. If a release fails at the configuration boundary, use the Config Doctor before changing code.
Sources
Sources were checked on Oct 23, 2026. Versions and client behavior can change; confirm the current documentation before relying on a configuration.