Skip to content

Community-maintained FDE reference. Not an official Vercel or Anthropic project. About this project

Patterns

Audience:engineerarchitectsecurityMCP spec 2026-07-28

Reusable ways to structure MCP servers and the systems around them, re-grounded for Vercel. Each pattern states a problem, the shape that solves it, and the security trade-offs; most also have a runnable TypeScript server under examples (in the repository) and an illustrative infrastructure companion under terraform/patterns/ (terraform/README.md, in the repository). Where the platform changes the pattern (no resident processes, no server-to-server network, edge controls in front of every route), the page says so instead of pretending the translation is free.

Pages

  • Adapter - a thin server that wraps one untouched backend (REST, SQL, CLI) and exposes a curated slice as tools; on Vercel that is one Function route in its own project, and the backend credential’s scope is its blast radius.
  • Sidecar - isolation for risky work. Vercel has no pod-with-two-containers, so the pattern reshapes: Vercel Sandbox for per-request isolation, or a separate project gated by Deployment Protection for a long-lived service sidecar.
  • Facade - one MCP surface fronting many backends behind a single namespaced endpoint; rewrites and the Firewall attach at the same edge, and one process spans every backend credential.
  • Least privilege - grant each server, tool, and credential the minimum capability it needs and deny everything else by default; OIDC federation instead of static cloud keys.
  • Trust boundaries - mutually untrusted servers with no direct server-to-server path; the host mediates any cross-server composition.
  • Orchestrator - the host-side pattern for composing several deployed servers into one coherent, isolated surface (it lives in the host, not in a server).
  • Query vs command - a tool-design pattern: keep read (“query”) tools separate from write or side-effecting (“command”) tools, with tool annotations carrying the difference.
  • Async jobs - return an opaque handle fast, do the work out of band, stream progress, and fetch the result idempotently by handle; maxDuration makes this pattern load-bearing on Vercel.

Where to look now

  • terraform/patterns/ (terraform/README.md, in the repository) - the infra-relevant patterns expressed with the official vercel/vercel provider (validate-checked, never applied in CI).
  • examples (in the repository) - runnable TypeScript MCP servers that implement these patterns at the protocol level.
  • Least privilege and Trust boundaries - the security backbone the other patterns lean on.
  • Serverless sessions - how every one of these shapes behaves when a request may land on a fresh function instance.