Works Today · FastMCP v3

FastMCP Production Manual — 100+ Pages, Deploy, Secure, Monitor

From uvicorn app:app to a hardened MCP server behind nginx with auth, monitoring, and CI/CD — in one copy-paste ready manual. For developers who wrote their first MCP tool and need it in production.

The free guides on this site get you running. This manual keeps you running — and covers every edge case those guides can't fit. If FastMCP v4 ships within 6 months, you get the update for free. Questions? support@deploymcp.dev.

FREE PREVIEW — Chapter 0

Chapter 0: Start Here — The Gap Between Local and Production

Your MCP server works locally. Then you push it to a server, put nginx in front, point a domain at it, and wire up Claude or Cursor — and things start breaking in ways the official docs don't cover.

Real failures devs hit on their first production deploy:

  • The client hangs, then returns an empty response with no error at all
  • Tool calls reliably return 504 Gateway Timeout
  • Everything works until something fails, then a CORS error appears and buries the actual error
  • Sessions drop every other request — mcp-session-id mysteriously vanishes
  • Claude just shows "Unable to connect" while a raw curl works fine

None of these are bugs. They're the gap between local and production. The official docs are an API reference — they tell you what each function does, but not that a single missing proxy_buffering off silently kills Streamable HTTP, or that the MCP spec mandates OAuth 2.1 + Dynamic Client Registration + PKCE, without which the major clients simply won't connect.

This manual is that missing deployment guide. Every chapter is a wall you'll hit taking a real FastMCP server to production — and the complete, copy-pasteable fix.

Where This Picks Up

Chapter 1 (free) maps the deployment ladder L1→L4 and the four architecture decisions: transport, mcp.run() vs mcp.http_app(), auth, and hosting. This manual is the build itself. Chapters 2–8 take you from L2 (uvicorn + nginx + TLS) to L4 (K8s + OTEL + RBAC) — every config, every fix, validated against a real environment.

If you haven't read Chapter 1 yet, scroll down. Then come back here when you need the build sheets.

What This Is Not

  • Not a translation of the API docs. The official reference is good. We don't repeat it.
  • Not a "Hello World" tutorial. Assumes you've already built a working local MCP server.
  • Not AI-generated filler. Every config block, CVE mitigation, and error fix was validated against a real environment.

Based on FastMCP 3.4.x (June 2026). The MCP ecosystem moves fast — every config and mitigation is current as of this version, with lifetime updates.

FREE PREVIEW — Chapter 1 (Saves ~3h)

Chapter 1: Architecture & Deployment Blueprint

Map your FastMCP architecture before you write a single line of config. The biggest production failures don't come from bad nginx settings — they come from picking the wrong deployment pattern on day one and discovering it three weeks later, when you've already built around it.

1.1 The FastMCP Deployment Ladder

There is no single "correct" way to deploy a FastMCP server. There's a ladder, and you climb it as your user count and reliability requirements grow. Each rung adds capability and complexity. Climbing too early wastes weeks on infrastructure you don't need; climbing too late means an outage forces the upgrade at the worst possible time.

LevelSetupForComplexity
L1fastmcp dev + InspectorSolo dev, local testingZero
L2uvicorn + nginx + TLSSmall team (3–10 users)Low
L3Docker + auth + health checksTeam (10–50 users)Medium
L4K8s + OTEL + RBACEnterprise (50+ users, multi-team)High

Rule of thumb: If you can't name the specific requirement pushing you to the next level (more users than one box can handle, a compliance audit, multi-team isolation), you're not ready for it yet. Most teams reading this should target L2 or L3.

L1 — Local dev. You run fastmcp dev, the MCP Inspector opens, you test tools by hand. No TLS, no auth, no persistence. Nothing survives a reboot. L2 — First real deploy. One machine, uvicorn + nginx + TLS, real domain. Handles 3–10 concurrent users, ~$5/month. Chapter 2 lives here. L3 — Hardened. Containerize, add auth, health checks that verify MCP readiness (not just HTTP 200). Chapters 3–6. L4 — Enterprise. K8s, OTEL, RBAC, multi-region. Chapters 5/7/8 reach here. Don't skip rungs: K8s doesn't fix a broken nginx config — it makes it broken in 12 pods instead of 1.

1.2 Critical Architecture Decisions (Get These Right First)

Four decisions shape everything downstream. Each one is hard to reverse once you've built on it.

Decision 1 — Transport: Stdio vs HTTP

Stdio runs the server as a subprocess of a single local client. Perfect for personal tools — no network, no TLS, no auth. HTTP runs the server as a long-lived network service that any number of remote clients connect to. This is what you need the moment the server lives on a different machine than the client.

# Stdio — single local client, launched on demand
mcp.run()  # defaults to stdio

# HTTP — remote, multi-client, production
mcp.run(transport="http", host="0.0.0.0", port=8000)

Use HTTP for production unless you are specifically building a personal, single-machine tool. Everything in Chapters 2–8 assumes HTTP transport.

⚠️ FastMCP 3.x defaults HTTP to Streamable HTTP, not the older SSE transport. This matters for your nginx config (Chapter 2) — Streamable HTTP breaks silently if the proxy buffers responses.

Decision 2 — mcp.run() vs mcp.http_app()

This is the decision people get wrong most often. mcp.run() starts a built-in server — one line, works in dev, but manages its own single process with no worker pool, no graceful reload. mcp.http_app() returns a standard Starlette ASGI application that you hand to a real ASGI server (uvicorn or gunicorn) which handles workers, restarts, signals, and graceful shutdown.

# Development — built-in server, single process
mcp.run(transport="http", port=8000)

# Production — expose an ASGI app, run under uvicorn/gunicorn
app = mcp.http_app()

# Then: uvicorn server:app --host 0.0.0.0 --port 8000 --workers 4

Use mcp.http_app() in production, always. Chapter 4 (Docker) and Chapter 6 (CI/CD) both assume you're exposing an ASGI app.

⚠️ Multi-worker note: if you run --workers > 1, in-memory session state breaks (each worker has its own). You either run stateless mode or move sessions to Redis. Chapter 3 covers this — decide your worker count before you design session storage.

Decision 3 — Auth Provider: Bearer vs OAuth

BearerOAuth 2.1 + DCR + PKCE
Setup effortMinutesDays (or use FastMCP's built-in provider)
IdentityOne shared secretPer-user (Google/GitHub/SSO)
Public client support (Claude/Cursor)Won't connectRequired
Best forInternal services, trusted clientsPublic servers, team SSO, multi-tenant

Start with Bearer, upgrade to OAuth when you need Claude/Cursor to connect or need per-user login. Chapter 3 covers both paths in full.

Decision 4 — Hosting

OptionCostScalingOps burdenBest for
VPS (Hetzner/DO)~$5–6/moManual (vertical)LowMost teams — L2/L3
Cloud Run / ECSPer-requestAutoMediumSpiky traffic, no host maintenance
KubernetesHighAuto + multi-regionHighEnterprise, multi-team — L4

Default to a VPS. A $5 Hetzner box can run a serious production MCP server. Reach for Cloud Run/ECS when you need auto-scale, and for K8s only when a concrete enterprise requirement forces it.

Putting It Together

By the end of this chapter you should be able to answer four questions about your deployment:

  1. Which rung? (L1 dev / L2 single box / L3 containerized team / L4 enterprise)
  2. Transport? (Stdio for personal, HTTP for everything remote)
  3. App entry point? (mcp.http_app() under uvicorn for production)
  4. Auth + hosting? (Bearer or OAuth; VPS, serverless, or K8s)

Most teams land on: L2–L3, HTTP transport, mcp.http_app() under uvicorn, Bearer-then-OAuth, on a single VPS. That's a real, defensible production architecture — and it's exactly the path Chapters 2–8 build, step by step.

Want the rest? Chapters 2–8 cover everything below.

Chapter 1 Got You Started. The Other 7 Cover…

ChWhat You'll LearnTime Saved
1Architecture blueprint — L1→L4 ladder, four critical decision frameworks (transport, ASGI entry point, auth, hosting), deployment pattern selection~3h saved
2Production nginx + TLS — full config with HTTP/2, chunked streaming, rate limiting zones, certbot automation, CORS deep dive~2h saved
3Auth in production — Bearer/JWT/OAuth setup, token persistence (Redis/file), session management, multi-team SSO, CVE-2026-48710 mitigation~3h saved
4Docker + Compose — multi-service Dockerfile with health checks, secrets management, non-root user, multi-stage builds, Compose with nginx sidecar~2h saved
5Security hardening checklist — all 10 items expanded (threat → verify → fix → validate), Cerbos/OPA RBAC integration, audit logging, WAF rules~4h saved
6CI/CD pipeline — GitHub Actions test→build→deploy, coverage gates, canary deployments, rollback automation, multi-environment (staging→prod)~3h saved
7Monitoring & alerting — OpenTelemetry setup, Prometheus metrics, Grafana dashboards, alert rules, log aggregation with Loki~3h saved
830+ production errors & fixes — CORS silent failures, transport inference errors, session management bugs, token expiry, Docker networking, K8s probes~4h saved

Total: ~24h saved across 8 chapters, 100+ pages.

Choose Your Edition

One-time purchase. Lifetime updates. 30-day money-back guarantee.

Essential

The complete production manual — 8 chapters, copy-paste ready.

$39 one-time
  • 8 chapters — Architecture to CI/CD
  • Production nginx + TLS + Docker Compose setup
  • Authentication — Bearer, JWT, OAuth with SSO
  • 10-point security hardening checklist
  • CI/CD pipeline — GitHub Actions
  • 30+ production errors with root cause + fix
  • PDF + Markdown. Instant download.
  • Lifetime updates
Buy Essential — $39
RECOMMENDED

Pro

Everything in Essential, plus four add-ons not sold separately.

$59 one-time
  • Everything in Essential
  • Security Pen-Test Script — Python script that runs all 10 checklist checks against your live endpoint
  • Config Template Pack — standalone nginx, Docker, K8s, CI/CD files, ready to drop in
  • Canary Deployment Workflow — staged rollout GitHub Actions: 10% → 50% → 100%
  • Grafana Dashboard + Alert Rules — pre-built JSON dashboard and Prometheus alert rules for MCP monitoring
  • PDF + Markdown + ZIP (all templates)
  • Lifetime updates

Honest note: pen-test script uses single JSON-RPC calls — if your server requires initialize-then-call, some checks may return WARN (README covers the fix). Grafana dashboard uses standard metric names — find-replace in JSON if yours differ. Both verify in ~5 min on your live server.

Buy Pro — $59

Who This Manual Is For

Python developers who built a local MCP server and need to ship it

Your tool works on localhost. Now your team wants to use it. This manual bridges that gap — every config, every security step, every monitoring setup.

DevOps engineers setting up MCP infrastructure for internal teams

You need to run MCP servers in production safely — not just "get it working." This covers the boring parts: health checks, rate limiting, secret rotation, audit trails.

Startups shipping AI features with MCP

You don't have a platform team. This manual is your platform team — production patterns tested and documented, ready to copy-paste into your infrastructure.

Who This Is NOT For

"What's MCP?" beginners

The free guides on this site cover MCP basics. Start there first.

Stdio-only personal tools

If you're the only user and it runs locally, you don't need this.

Already running MCP at scale

If you have a platform team and K8s cluster with OTEL already, this is too basic.

30-Day Money-Back Guarantee

If this manual doesn't save you at least 10 hours of trial-and-error in the first 30 days, email support@deploymcp.dev and I'll refund every cent. No questions asked.

FAQ

Is this guide specific to FastMCP, or does it apply to any MCP server?

All deployment patterns (nginx, Docker, K8s, monitoring) apply to any MCP server. FastMCP-specific sections cover auth providers, CORS configuration, ASGI setup, and tool-level RBAC. If you use raw MCP SDK, about 70% of the manual still applies.

Does it cover FastMCP v3 specifically?

Yes. It's up-to-date with v3's HTTP deployment, ASGI support, OAuth, multi-client architecture, and CVE-2026-48710 mitigation (Starlette ≥1.0.1).

How is this different from the free guides on this site?

The free guides cover the happy path. The manual covers edge cases, failure modes, monitoring, alerting, incident response, and 30+ error fixes — everything you'd only discover after running in production for months.

What format is the manual?

PDF with copy-pasteable code blocks and config files. All nginx configs, Dockerfiles, YAML manifests, and Python code are complete — not snippets. Pro edition adds standalone config files (ZIP), pen-test script (Python), canary workflow (YAML), and Grafana dashboard (JSON).

What's the difference between Essential and Pro?

Essential ($39) is the complete 8-chapter manual (PDF + Markdown). Pro ($59) adds four add-ons not sold separately: Security Pen-Test Script (automates all 10 checklist checks), Config Template Pack (standalone nginx/Docker/K8s/CI files), Canary Deployment Workflow (staged rollout GitHub Actions), and Grafana Dashboard + Alert Rules (pre-built JSON). If you're copy-pasting into production, Pro is zero-typing from purchase to deployed. Note: pen-test and dashboard take ~5 min to verify against your server — README covers MCP handshake and metric name alignment.

Will it be updated for FastMCP v4?

If FastMCP v4 ships within 6 months of your purchase, you get the updated edition free. Just email your receipt to support@deploymcp.dev.

Save ~24 Hours of Trial-and-Error

100+ pages, 8 chapters. Every config copy-paste ready. 30-day money-back guarantee. Lifetime updates. From $39.

View Pricing — from $39

Secure payment via Paddle. EU VAT may apply.