Remote MCP Server
Удаленный сервер 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Вы должны иметь возможность открыть http://localhost:8787/ в своем браузере.
Related MCP server: Remote MCP Server
Подключите MCP-инспектор к вашему серверу
Для изучения нового API MCP вы можете использовать MCP Inspector .
Запустите его с помощью
npx @modelcontextprotocol/inspectorВ инспекторе измените тип транспорта на
SSEи введитеhttp://localhost:8787/sseв качестве URL-адреса сервера MCP для подключения, затем нажмите «Подключиться».Вы перейдете на экран входа в систему (фиктивный) пользователя/пароля. Введите любой адрес электронной почты и пароль для входа.
Вас перенаправят обратно в MCP Inspector, и теперь вы сможете просматривать и вызывать любые определенные инструменты!
Подключите Claude Desktop к локальному серверу MCP
Инспектор MCP великолепен, но мы действительно хотим подключить его к Claude! Следуйте краткому руководству Anthropic и в Claude Desktop перейдите в Настройки > Разработчик > Изменить конфигурацию, чтобы найти файл конфигурации.
Откройте файл в текстовом редакторе и замените его следующей конфигурацией:
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}Это запустит локальный прокси-сервер и позволит Клоду взаимодействовать с вашим сервером MCP по протоколу HTTP.
Когда вы открываете Claude, должно открыться окно браузера, позволяющее вам войти в систему. Вы должны увидеть доступные инструменты в правом нижнем углу. Получив правильный запрос, Claude должен попросить вызвать инструмент.
Развертывание в Cloudflare
npx wrangler kv namespace create OAUTH_KVСледуйте инструкциям, чтобы добавить идентификатор пространства имен kv в
wrangler.jsoncnpm 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 Desktop к удаленному серверу MCP
Обновите файл конфигурации Claude, чтобы он указывал на URL-адрес вашего workers.dev (например: worker-name.account-name.workers.dev/sse ), и перезапустите Claude.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}Отладка
Если что-то пойдет не так, может быть полезно перезапустить Claude или попробовать подключиться напрямую к вашему серверу MCP через командную строку с помощью следующей команды.
npx mcp-remote http://localhost:8787/sseВ некоторых редких случаях может помочь очистка файлов, добавленных в ~/.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
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that runs on Cloudflare Workers with OAuth login, allowing AI assistants like Claude to execute tools remotely through HTTP connections.
- FlicenseNot gradedqualityCmaintenanceA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server that enables AI assistants like Claude to access external tools and capabilities through a standardized interface with OAuth authentication.14
- FlicenseNot gradedqualityCmaintenanceA Cloudflare Workers-based server implementing the Model Context Protocol that enables AI assistants like Claude to securely access external tools through OAuth authentication.14
- FlicenseNot gradedqualityCmaintenanceA 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
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.
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Appeared in Searches
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/cyyzpanpan/remote-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server