security. An HTTP MCP endpoint is reachable by anyone who can reach the server, so put authentication in front of it before exposing it publicly.
Who it is forA backend developer who already runs an Express or Fastify service.
The problemA stdio server only works locally; remote agents need an HTTP endpoint.
The outcomeYour existing web app answering MCP requests next to its normal routes.
What you need first
- 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
Steps
- Install the server package with
npm install @modelcontextprotocol/server - Add the adapter with
npm install @modelcontextprotocol/express express, ornpm install @modelcontextprotocol/fastify fastifyfor Fastify - For plain Node.js HTTP use
npm install @modelcontextprotocol/nodefor the Streamable HTTP transport - Register your tools on an McpServer and mount it through the adapter, following the middleware README
Prompt for your agent
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.
Caveat. The README says the middleware packages are intentionally thin adapters and add no MCP features or business logic of their own.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for modelcontextprotocol/typescript-sdk and "Serve MCP tools over HTTP from an Express app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer