Skip to main content
Glama
romeucampos

Cloudflare MCP Server — Code Mode

by romeucampos

Cloudflare MCP Server — Code Mode

Cloudflare Workers 上でリモートの Model Context Protocol (MCP) サーバーを構築するためのサーバーレススターターです。

このプロジェクトは code mode 向けに設計されています。クライアントは機能を発見し、構造化されたレスポンスを使ってツール呼び出しを組み立てることができます。スタータでは任意のコードの実行は有効化されていません。サンドボックス、認証、制限、監査を定義した後にのみ追加する必要があります。

目標

  • Cloudflare Workers を介してエッジで実行する。

  • /mcp で MCP エンドポイントを公開する。

  • ツールを小さく、型付けされ、組み合わせ可能な状態に保つ。

  • OAuth 認証と Cloudflare バインディングを準備する。

  • 分離されたサンドボックスでの安全なコード実行へと進化させる。

Related MCP server: Adi MCP

ローカル開発

前提条件: Node.js 18+ と、Workers が有効な Cloudflare アカウント。

npm install
npm run dev

ローカルサーバーは http://localhost:8788/mcp で利用できます。

MCP Inspector で検証するには:

npx @modelcontextprotocol/inspector@latest

デプロイ

npx wrangler login
npm run deploy

デプロイ後、エンドポイントは次のようになります:

https://<worker>.<account>.workers.dev/mcp

構造

  • src/index.ts: Worker の HTTP ルーティング。

  • src/mcp.ts: MCP サーバーとツール。

  • wrangler.jsonc: Worker の設定。

  • PLAN.md: 実装計画と受け入れ基準。

セキュリティ

evalnew Function、またはコードインタープリターを Worker 内に直接追加しないでください。実際の実行を伴う code mode を実装するには、適切なサンドボックス、強力な認証、API の許可リスト、CPU/メモリ/時間の制限、ユーザーごとの分離、そしてシークレットを含まないログを使用してください。

次のステップ

PLAN.md を参照してください。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    B
    maintenance
    A remote MCP server that exposes tools from many services (X, LinkedIn, GitHub, Gmail, Notion, etc.) through a single endpoint on Cloudflare Workers, enabling unified access to third-party APIs via natural language.
  • F
    license
    Not graded
    quality
    C
    maintenance
    A stateless remote MCP server on Cloudflare Workers without authentication, supporting custom tool registration and integration with MCP clients like Cloudflare AI Playground and Claude Desktop.

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage

  • Remote MCP for GenAI span mapping, provider normalization, dashboard schemas, and receipts.

View all MCP Connectors

Latest Blog Posts

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/romeucampos/cloudflare-mcp-server-code-mode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server