{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "modelcontextprotocol-typescript-sdk--serve-mcp-over-http-with-express-and-the-typescript-sdk",
 "repo": "modelcontextprotocol/typescript-sdk",
 "repo_url": "https://github.com/modelcontextprotocol/typescript-sdk",
 "repo_slug": "modelcontextprotocol-typescript-sdk",
 "title": "Serve MCP tools over HTTP from an Express app",
 "page_title": "How to serve MCP tools over HTTP from an Express app with TypeScript SDK",
 "summary": "Add the Express middleware package so an existing web service can offer MCP tools over the Streamable HTTP transport.",
 "who": "A backend developer who already runs an Express or Fastify service.",
 "problem": "A stdio server only works locally; remote agents need an HTTP endpoint.",
 "outcome": "Your existing web app answering MCP requests next to its normal routes.",
 "steps": [
  "Install the server package with `npm install @modelcontextprotocol/server`",
  "Add the adapter with `npm install @modelcontextprotocol/express express`, or `npm install @modelcontextprotocol/fastify fastify` for Fastify",
  "For plain Node.js HTTP use `npm install @modelcontextprotocol/node` for the Streamable HTTP transport",
  "Register your tools on an McpServer and mount it through the adapter, following the middleware README"
 ],
 "agent_prompt": "With modelcontextprotocol/typescript-sdk, add MCP to my Express service <repo path>: run `npm install @modelcontextprotocol/express express`, register <my tools> on an McpServer and expose it over Streamable HTTP.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The README says the middleware packages are intentionally thin adapters and add no MCP features or business logic of their own.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js with npm, or Bun or Deno as the README shows",
  "The server package from `npm install @modelcontextprotocol/server`, or the client package from `npm install @modelcontextprotocol/client`",
  "zod for tool input schemas, as in the README example"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "security",
   "notice": "An HTTP MCP endpoint is reachable by anyone who can reach the server, so put authentication in front of it before exposing it publicly."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/modelcontextprotocol-typescript-sdk/serve-mcp-over-http-with-express-and-the-typescript-sdk/",
 "md": "https://dedupedai.com/use-cases/modelcontextprotocol-typescript-sdk/serve-mcp-over-http-with-express-and-the-typescript-sdk/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/modelcontextprotocol-typescript-sdk--serve-mcp-over-http-with-express-and-the-typescript-sdk.json",
 "api_version": "v1"
}
