Remote MCP Server
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-serverDeberías poder abrir http://localhost:8787/ en tu navegador
Related MCP server: Remote MCP Server
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 y haga clic en "Conectar".Accederá a una pantalla de inicio de sesión (simulada) con usuario y contraseña. Ingrese su correo electrónico y contraseña para iniciar sesión.
Deberías ser redirigido nuevamente al Inspector MCP y ahora podrás enumerar y llamar a cualquier herramienta definida.
Conecte Claude Desktop a su servidor MCP local
El inspector MCP es genial, pero queremos conectarlo con Claude. Sigue la guía de inicio rápido de Anthropic y, en Claude Desktop, ve a Configuración > Desarrollador > Editar configuración para encontrar tu archivo de configuración.
Abra el archivo en su editor de texto y reemplácelo con esta configuración:
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}Esto ejecutará un proxy local y permitirá que Claude se comunique con su servidor MCP a través de HTTP
Al abrir Claude, debería abrirse una ventana del navegador que te permitirá iniciar sesión. Verás las herramientas disponibles en la esquina inferior derecha. Si se le da la indicación correcta, Claude debería solicitar que se ejecute la herramienta.
Implementar en Cloudflare
npx wrangler kv namespace create OAUTH_KVSiga las instrucciones para agregar el ID del espacio de nombres kv a
wrangler.jsoncnpm 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".
Ahora se ha conectado a su servidor MCP desde un cliente MCP remoto.
Conecte Claude Desktop a su servidor MCP remoto
Actualice el archivo de configuración de Claude para que apunte a la URL de workers.dev (por ejemplo: worker-name.account-name.workers.dev/sse ) y reinicie Claude
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}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-authThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceA Cloudflare Workers implementation of Model Context Protocol (MCP) server that enables AI tools to be exposed to Claude and other assistants through OAuth authentication.14
- Flicense-qualityCmaintenanceA Cloudflare Workers-based implementation of the Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with external tools through OAuth login.14
- Flicense-qualityCmaintenanceA Cloudflare Workers-based implementation of the Model Context Protocol (MCP) server that enables tool usage in Claude through OAuth authentication.
- Flicense-qualityDmaintenanceA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server with OAuth login that allows tools like Claude to access external capabilities.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted remote MCP server for YNAB on Cloudflare Workers with OAuth
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
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/anandkumarpatel/remote-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server