Remote MCP Server on Cloudflare
Удаленный сервер MCP на Cloudflare
Давайте запустим удаленный сервер MCP на Cloudflare Workers с возможностью входа по протоколу OAuth!
Развивайтесь локально
# 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-authВы должны иметь возможность открыть http://localhost:8787/ в своем браузере.
Related MCP server: Remote MCP Server on Cloudflare
Подключите MCP-инспектор к вашему серверу
Для изучения нового API MCP вы можете использовать MCP Inspector .
Запустите его с помощью
npx @modelcontextprotocol/inspectorВ инспекторе измените тип транспорта на
SSEи введитеhttp://localhost:8787/sseв качестве URL-адреса сервера MCP для подключения.Добавьте токен на предъявителя и нажмите «Подключиться».
Нажмите «Список инструментов».
Запустите инструмент «getToken», который должен вернуть заголовок Authorization, который вы установили в инспекторе.
Подключите Claude Desktop к локальному серверу MCP
{
"mcpServers": {
"remote-mcp-server-bearer-auth": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse",
"--header",
"Authorization: Bearer ${AUTH_TOKEN}"
]
},
"env": {
"AUTH_TOKEN": "..."
}
}
}Развертывание в Cloudflare
npm run deploy
Вызовите недавно развернутый удаленный сервер MCP с удаленного клиента MCP
Так же, как вы делали выше в разделе «Локальная разработка», запустите инспектор MCP:
npx @modelcontextprotocol/inspector@latest
Затем введите URL-адрес workers.dev (например: worker-name.account-name.workers.dev/sse ) вашего Worker в инспекторе в качестве URL-адреса сервера MCP для подключения и нажмите «Подключиться».
Теперь вы подключились к вашему серверу MCP с удаленного клиента MCP. Вы можете передать токен носителя, как указано выше
Отладка
Если что-то пойдет не так, может быть полезно перезапустить Claude или попробовать подключиться напрямую к вашему серверу MCP через командную строку с помощью следующей команды.
npx mcp-remote http://localhost:8787/sseВ некоторых редких случаях может помочь очистка файлов, добавленных в ~/.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