Deploying Claude Connectors to Production: Host Your MCP Server on Cloudflare, Vercel, or Any Platform
Deploy your Claude Connector MCP server to production.
TL;DR: Your Claude Connector needs HTTPS and a public URL. Cloudflare Workers, Vercel, Railway, and plain VPS all work. Use Streamable HTTP transport (not SSE). Allowlist both claude.ai and claude.com OAuth callback URLs. Test locally with sunpeak first, deploy to your platform, then add the URL in Claude Settings.
You built a Claude Connector. It runs on localhost, and you have tested it with sunpeak’s inspector or through ngrok. Now you want to put it somewhere permanent so Claude can reach it without a tunnel running on your laptop. This post covers the hosting options, requirements, and gotchas for deploying a Claude Connector MCP server to production.
What Claude Needs From Your Server
Claude connects to your MCP server over HTTPS using the Streamable HTTP transport. Your server must:
- Accept POST requests at a
/mcpendpoint. This is the standard MCP path. Claude sends JSON-RPC 2.0 messages to this endpoint. - Respond over HTTPS. No exceptions. Claude will not connect to HTTP endpoints.
- Stay available. Claude makes tool calls during conversations. If your server is down or takes too long to respond, the tool call fails and Claude tells the user.
- Handle concurrent requests. Multiple Claude users can trigger tool calls at the same time if your connector is shared or in the Connectors Directory.
If your connector uses OAuth, your server also needs to handle the authorization flow and token exchange. More on that below.
Choosing a Hosting Platform
Any platform that serves HTTPS traffic works. Here are the options developers use most, with trade-offs for each.
Cloudflare Workers
Cloudflare Workers run JavaScript/TypeScript at the edge across 300+ data centers. Cold starts are near zero because Workers use V8 isolates instead of containers.
Good for: Connectors that call external APIs, do light computation, or serve as a proxy to your backend. The free tier covers 100,000 requests per day, which handles most connectors easily.
Watch out for: Workers have a 10ms CPU time limit on the free plan (50ms on paid). If your tool handler does heavy computation, like parsing large files or running complex transformations, you will hit this. Offload heavy work to a separate service and have the Worker call it.
Deploy with:
npx wrangler deploy
Your connector URL will look like https://your-connector.your-account.workers.dev/mcp.
Vercel
Vercel’s edge and serverless functions work for MCP servers, especially if your connector is part of a Next.js project. Vercel handles HTTPS and domain configuration automatically.
Good for: Teams already using Vercel for their web app. You can colocate your connector with your frontend.
Watch out for: Serverless functions have cold starts that can add 200-500ms on the first request after idle. For connectors that users call frequently, this is fine. For rarely-used connectors, cold starts can feel slow. Vercel’s Fluid Compute mode helps with this on Pro plans.
Deploy with:
vercel deploy --prod
Railway
Railway gives you a persistent server that runs continuously. No cold starts, no CPU time limits, no edge function constraints. You push code and Railway runs it.
Good for: Connectors that need persistent connections, background jobs, or in-memory caching. Also good if your connector is written in Python, Go, or another language that does not run on edge platforms.
Watch out for: Railway’s free tier gives $5 of credit per month. A lightweight Node.js server uses about $2-3/month, so you might need a paid plan for higher traffic. Railway does not have edge distribution, so your server runs in one region.
Deploy with:
railway up
Render
Similar to Railway. Push code or a Dockerfile, get a running server with HTTPS. Render has a free tier for web services (with a spin-down after 15 minutes of inactivity).
Good for: Simple connectors where you want managed hosting without thinking about infrastructure.
Watch out for: Free-tier services spin down after inactivity, which means the first request after idle takes 30-50 seconds while the service restarts. This is too slow for a Claude Connector in practice. Use a paid instance ($7/month) to keep the service running.
VPS (Hetzner, DigitalOcean, Linode)
A virtual private server gives you full control. Run whatever runtime you want, keep state in memory, and manage the server yourself.
Good for: Connectors with special requirements. Database access, GPU workloads, or compliance constraints that rule out shared hosting.
Watch out for: You handle HTTPS yourself (use Caddy or nginx with Let’s Encrypt), uptime monitoring, and restarts. More operational work than managed platforms.
A basic setup with Caddy as a reverse proxy:
your-connector.example.com {
reverse_proxy localhost:3000
}
Caddy provisions Let’s Encrypt certificates automatically. Your Claude Connector URL is then https://your-connector.example.com/mcp.
Setting Up OAuth for Production
If your connector accesses user data, you need OAuth. The development flow with ngrok and the production flow are mostly the same, but there are two things to get right.
Callback URLs
Claude uses two domains. Allowlist both as redirect URIs in your OAuth provider:
https://claude.ai/api/mcp/auth_callbackhttps://claude.com/api/mcp/auth_callback
Missing one of these is the second most common reason Directory submissions get rejected.
Token Storage and Refresh
Claude sends the user’s access token with each tool call. Your server needs to handle token expiry gracefully. If the token is expired, use the refresh token to get a new one. If the refresh token is also expired, Claude will prompt the user to re-authenticate.
Store OAuth client secrets in environment variables, not in code. Every hosting platform has a way to set secrets:
# Cloudflare Workers
wrangler secret put OAUTH_CLIENT_SECRET
# Vercel
vercel env add OAUTH_CLIENT_SECRET
# Railway
railway variables set OAUTH_CLIENT_SECRET=your-secret
For a deeper walkthrough of the OAuth flow and grant types, see the dedicated auth post.
Streamable HTTP vs SSE
Claude supports two MCP transports: Streamable HTTP and SSE (Server-Sent Events). Use Streamable HTTP.
Streamable HTTP works with standard POST requests to your /mcp endpoint. Every hosting platform supports this, including serverless platforms where persistent connections are unreliable. Your server receives a POST, processes the tool call, and returns the response.
SSE requires a persistent connection between Claude and your server. This works on traditional servers but can cause problems on serverless platforms that terminate idle connections. Anthropic has indicated that SSE support may be deprecated in favor of Streamable HTTP.
If you are using the MCP TypeScript SDK, Streamable HTTP is the default transport for remote servers.
Production Checklist
Before you point Claude at your deployed server, run through this list:
Server basics:
- Server responds to POST requests at
/mcp - HTTPS is working (test with
curl https://your-url/mcp) - Server handles the MCP
initializehandshake - All tools return responses within 5 minutes (Claude’s timeout)
- Server handles concurrent requests
Auth (if applicable):
- Both
claude.aiandclaude.comcallback URLs are allowlisted - OAuth client secret is in environment variables, not hardcoded
- Token refresh works when access tokens expire
- Authorization code grant with PKCE is configured (Claude does not support client credentials flow)
For Directory submission:
- Every tool has
readOnlyHintordestructiveHintannotations - Privacy policy is published and linked
- Documentation includes at least three usage examples
- Test account with sample data is ready for reviewers
Monitoring:
- Error logging is enabled so you can see failed tool calls
- You have a way to check uptime (even a simple health check endpoint)
- You know how to check server logs on your hosting platform
Testing Before and After Deployment
Test locally first. Run sunpeak dev to start your connector in the sunpeak inspector, which replicates the Claude runtime at localhost:3000. You can test every tool, verify UI rendering, and use simulation files for deterministic test cases, all without a Claude account.
After deploying, add your production URL as a custom connector in Claude Settings > Connectors. Make sure to include the /mcp path. Then open a new Claude conversation, enable the connector, and test each tool. Compare the behavior against what you saw locally.
If something works locally but fails in production, check:
- The URL is correct. The most common mistake is forgetting
/mcpat the end. - Environment variables are set. API keys and secrets that work locally might not be configured on the hosting platform.
- Cold starts are within limits. If your first tool call after deploy takes 30+ seconds, your hosting platform might need a keep-alive or a paid tier.
- Tool result size is under 25,000 tokens. Claude truncates results that exceed this limit. See the debugging guide for details.
Example: Deploying to Cloudflare Workers
Here is a minimal example of deploying a Claude Connector to Cloudflare Workers using the MCP TypeScript SDK.
Your wrangler.toml:
name = "my-connector"
main = "src/index.ts"
compatibility_date = "2026-03-01"
Your src/index.ts:
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { createMcpHandler } from '@anthropic-ai/mcp-cloudflare';
import { z } from 'zod';
const server = new McpServer({
name: 'my-connector',
version: '1.0.0',
});
server.tool(
'get-status',
'Get the current status of the service',
{ service: z.string().describe('Service name to check') },
async ({ service }) => ({
content: [{ type: 'text', text: `${service} is operational` }],
})
);
export default createMcpHandler(server);
Deploy:
npx wrangler deploy
Add https://my-connector.your-account.workers.dev/mcp in Claude Settings > Connectors. That is it. Your connector is live.
What Comes After Deployment
Once your connector is deployed and working:
- Share with your team. On Team and Enterprise plans, an org admin can add the connector URL in Organization Settings > Connectors so everyone on the team can use it.
- Submit to the Directory. If your connector is useful to the broader Claude community, submit it to the Connectors Directory. Review takes about two weeks.
- Monitor usage. Most hosting platforms have built-in request logging and metrics. Watch for error rates, slow tool calls, and token limit issues.
- Update without downtime. Cloudflare Workers, Vercel, and Railway all support zero-downtime deployments. Push new code and the platform rolls it out automatically.
Get Started
pnpm add -g sunpeak && sunpeak new
Further Reading
- Claude Connectors tutorial - build a connector from scratch before deploying
- Claude Connector Directory submission - requirements for getting listed publicly
- Claude Connector OAuth authentication - callback URLs and token lifecycle
- Debugging Claude Connectors - fix connection failures and tool errors
- Designing Claude Connector tools - schemas and descriptions for reliable tool calls
- What are Claude Connectors - overview and data access
- Claude Connector Framework - sunpeak overview
- sunpeak documentation - quickstart and API reference
Frequently Asked Questions
Where should I host my Claude Connector MCP server?
Any platform that can serve HTTPS traffic works. Cloudflare Workers is a good default because it has a generous free tier (100K requests/day), near-zero cold starts, and edge deployment across 300+ locations. Vercel works well if you already use Next.js. Railway and Render are straightforward if you want a traditional server. A VPS on Hetzner or DigitalOcean gives you full control. The main requirements are HTTPS, a public URL, and support for the Streamable HTTP transport that Claude uses.
Does my Claude Connector need HTTPS?
Yes. Claude only connects to MCP servers over HTTPS. There are no exceptions for production deployments. During local development you can use ngrok or a similar tunnel to get an HTTPS URL for your localhost server, but in production your hosting platform must terminate TLS. Every major hosting platform (Cloudflare Workers, Vercel, Railway, Render, Fly.io) handles this automatically.
What OAuth callback URLs do I need for a deployed Claude Connector?
Allowlist both https://claude.ai/api/mcp/auth_callback and https://claude.com/api/mcp/auth_callback as redirect URIs in your OAuth provider. Claude operates under both domains. Missing one causes authentication failures for some users. This is the second most common reason Claude Connector Directory submissions get rejected.
How do I deploy a Claude Connector to Cloudflare Workers?
Build your MCP server as a Cloudflare Worker that handles POST requests to /mcp using the Streamable HTTP transport. Use wrangler deploy to push your code. Cloudflare handles HTTPS automatically. For secrets like API keys and OAuth credentials, use wrangler secret put. Your deployed URL will be something like your-connector.your-account.workers.dev/mcp, which you can add directly in Claude Settings > Connectors.
Can I deploy a Claude Connector for free?
Yes. Cloudflare Workers offers 100,000 requests per day on the free tier, which is enough for most connectors. Vercel has a hobby tier. Railway gives $5 of free credit per month. For personal or small-team connectors, you can run in production at zero cost. If your connector handles high traffic or heavy computation, paid tiers start at $5-20/month depending on the platform.
How do I go from local development to a live Claude Connector?
First, build and test your connector locally with sunpeak or the MCP Inspector. Then deploy your MCP server to a hosting platform with HTTPS. Add the deployed URL (with /mcp path) as a custom connector in Claude Settings > Connectors. Test the live connection in a Claude conversation. If you want public distribution, submit to the Connectors Directory after verifying tool annotations, OAuth setup, and documentation.
Why does my deployed Claude Connector fail to connect?
The most common causes are: the URL is missing the /mcp path suffix, your server is not responding to POST requests on the /mcp endpoint, HTTPS is not configured correctly, your server has a cold start timeout that exceeds Claude expectations, or CORS headers are blocking the connection. Check your server logs for incoming requests. If you see no requests at all, the URL in Claude Settings is wrong.
Should I use SSE or Streamable HTTP for my Claude Connector?
Use Streamable HTTP. Claude supports both SSE and Streamable HTTP transports, but Anthropic has indicated that SSE support may be deprecated. Streamable HTTP uses standard POST requests to a /mcp endpoint, which works on every hosting platform including serverless ones like Cloudflare Workers and Vercel Edge Functions. SSE requires persistent connections, which some serverless platforms handle poorly.