Remote MCP Server on Cloudflare
Servidor MCP remoto en Cloudflare
¡Pongamos en funcionamiento un servidor MCP remoto en Cloudflare Workers con inicio de sesión OAuth incluido!
Desarrollar localmente
# clone the repository
git clone git@github.com:cloudflare/ai.git
# install dependencies
cd ai
npm install
# run locally
npx nx dev remote-mcp-server-bearer-authDeberías poder abrir http://localhost:8787/ en tu navegador
Related MCP server: Remote MCP Server on Cloudflare
Conecte el inspector MCP a su servidor
Para explorar su nueva API de MCP, puede utilizar el Inspector de MCP .
Inícielo con
npx @modelcontextprotocol/inspectorDentro del inspector , cambie el Tipo de transporte a
SSEe ingresehttp://localhost:8787/ssecomo la URL del servidor MCP al que conectarse.Agregue un token portador y haga clic en "Conectar"
Haga clic en "Herramientas de lista"
Ejecute la herramienta "getToken", que debería devolver el encabezado de autorización que configuró en el inspector
Conecte Claude Desktop a su servidor MCP local
{
"mcpServers": {
"remote-mcp-server-bearer-auth": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse",
"--header",
"Authorization: Bearer ${AUTH_TOKEN}"
]
},
"env": {
"AUTH_TOKEN": "..."
}
}
}Implementar en Cloudflare
npm run deploy
Llame a su servidor MCP remoto recién implementado desde un cliente MCP remoto
Tal como lo hizo anteriormente en "Desarrollar localmente", ejecute el inspector MCP:
npx @modelcontextprotocol/inspector@latest
Luego ingrese la URL de workers.dev (ej: worker-name.account-name.workers.dev/sse ) de su Worker en el inspector como la URL del servidor MCP al cual conectarse y haga clic en "Conectar".
Ya te has conectado a tu servidor MCP desde un cliente MCP remoto. Puedes pasar un token de portador como se mencionó anteriormente.
Depuración
Si algo sale mal, puede ser útil reiniciar Claude o intentar conectarse directamente a su servidor MCP en la línea de comando con el siguiente comando.
npx mcp-remote http://localhost:8787/sseEn algunos casos excepcionales puede ser útil borrar los archivos agregados a ~/.mcp-auth
rm -rf ~/.mcp-authMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server that runs on Cloudflare Workers with OAuth login, allowing AI assistants like Claude to execute tools remotely through HTTP connections.
- Flicense-qualityCmaintenanceA Model Context Protocol server implementation that runs on Cloudflare Workers with OAuth login, allowing Claude and other AI models to access tools via the MCP standard.
- AlicenseBqualityCmaintenanceA server that enables Model Context Protocol (MCP) functionality on Cloudflare Workers with OAuth login, allowing applications like Claude Desktop to access custom tools through a standardized interface.213MIT
- Flicense-qualityCmaintenanceA Model Context Protocol server that runs on Cloudflare Workers, enabling tools integration with Claude AI through OAuth login.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yripper/x-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server