Deployment + distribution, from local to installable
npm, Cloud Run, MCPize. The three paths to ship your MCP server.
Three deployment modes
1. Stdio + npm package (for local servers)
You package your TypeScript server as an npm package. Users install npm install -g my-mcp-server and configure Claude Code. The server runs locally on the user's machine.
2. HTTP + Cloud Run / Fly / Railway (for central services) Your server runs as an HTTP service in the cloud. Users only provide the URL and do OAuth. Central updates, multi-user.
3. MCPize (the marketplace path) A service specialized for MCP deploys. Same code base, MCPize packages, hosts, manages the HTTP route. Good for quickly trying things out, less control.
Stdio + npm (the most common case)
Step 1: compile TypeScript to JavaScript.
// package.json
{
"main": "dist/index.js",
"bin": {
"my-mcp-server": "dist/index.js"
},
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
}
}
The tsconfig.json must have "outDir": "dist". The bin entry makes the package executable.
Step 2: README.md with install instructions.
# my-mcp-server
## Install
claude mcp add my-server -s user -- npx -y my-mcp-server
## Config
Set env var `MY_API_KEY`.
Step 3: npm publish.
npm login # one-time
npm publish --access public
Done. Anyone running npx -y my-mcp-server pulls your package automatically.
HTTP server + Cloud Run
If users should access a central service (multi-tenant, SaaS), you need HTTP. That's significantly more effort.
In addition to the SDK you need:
- Express / Hono / Fastify for HTTP transport.
- OAuth 2.1 flow if multi-user (Magic Link, Authorization Code).
- Database for user storage.
- Rate limiting because the server is public.
- Logging + monitoring.
Deployment then: Dockerfile, push to Google Cloud Run, Fly.io, Railway, AWS Runner. Small compute packages usually suffice (512 MB RAM, 1 CPU). Cost: 5-20 EUR/month for small services.
MCPize (the fast path)
MCPize is a specialized MCP deploy service. You push your code, MCPize builds and hosts. Ideal for:
- Quick prototyping in production
- Not wanting to host yourself
- Marketplace presence (users find your server on mcpize.com)
Limitation: less control. If your server has special build steps, MCPize must support them (not all are).
The decision matrix
| Use case | Choice | |---|---| | Personal tool, only you | stdio + local | | Team, no user data sharing | stdio + npm, internal via git | | Open source for dev community | stdio + npm + GitHub | | SaaS with login and customer data | HTTP + Cloud Run + OAuth | | Test if anyone wants it | MCPize |
Monetization when you go HTTP
If you have an HTTP server with user accounts:
- Stripe integration for Pro tiers
- Feature flag check per request: is this user on the Pro tier?
- Rate limit different per tier (Free: 100 calls/day, Pro: unlimited)
The StudioMeyer MCP SaaS servers (memory, crm, geo) use exactly this pattern.
Last lesson
The last lesson shows how to make your MCP server findable: MCP marketplaces, discovery standards, community channels. Distribution is another half-week of work after the deploy.