Skip to main content
Glama
midnight480

Cacoo Remote MCP Server

by midnight480

Cacoo Remote MCP Server

Cacoo API 用のリモート MCP サーバーです。Cloudflare Workers、AWS Lambda、Google Cloud Run、Azure Container Apps にデプロイできます。

ローカルの stdio MCP サーバーとは異なり、ホスト型 HTTP エンドポイントとして動作します。ブラウザで一度 OAuth 認証を行うと、Cacoo API キーがサーバーの外に出ることはありません。

日本語版はこちら

機能

  • 14 の MCP ツール — 図、フォルダー、組織、アカウント情報をカバー

  • PKCE を使用した OAuth 2.1 — クライアントはブラウザで認証し、クライアント側に API キーは不要

  • メール許可リスト — アップストリーム IdP に重ねるアプリケーションレベルの認可

  • 複数の Cacoo アカウント — 呼び出しごとにルーティングし、アカウントごとの読み取り専用ガードを備える

  • 4 つのデプロイ先 — 同じツール実装を共有

Related MCP server: AccelMCP

デプロイ先の選択

Cloudflare

AWS

Google Cloud

Azure

ランタイム

Workers (エッジ)

Lambda + API Gateway

Cloud Run

Container Apps

MCP セッション

Durable Objects

ステートレス

ステートレス

ステートレス

OAuth 認可サーバー

@cloudflare/workers-oauth-provider

src/oauth

src/oauth

src/oauth

アップストリーム IdP

Cloudflare Access

Amazon Cognito

Google アカウント

Microsoft Entra ID

状態ストレージ

Workers KV

DynamoDB (TTL)

Firestore (TTL)

Cosmos DB (TTL)

シークレット

Workers Vaults Secrets

Secrets Manager

Secret Manager

Key Vault

IaC

wrangler

AWS SAM

Terraform

Bicep

設定ファイル

.dev.vars

infra/aws/params.yaml

infra/gcp/terraform.tfvars

infra/azure/params.json

ツールとその動作はすべてのプラットフォームで同じです。どのプラットフォームでも、アップストリーム IdP として Google または Microsoft Entra ID を使用できます。表に示されているのはデフォルトです。

アーキテクチャ

同じ MCP サーバーが 4 つのプラットフォームで動作します。各プラットフォームのサブグラフは、ゲートウェイ、ストレージ、アップストリーム IdP といった配線を独自に持ち、Node.js ベースのものは共有 src/oauth に合流しsrc/oauthはさらにsrc/core` を使用します。

flowchart TB
    subgraph clients["MCP clients"]
        direction LR
        CC["Claude Code<br/><i>native HTTP transport</i>"]
        CD["Claude Desktop / Kiro / Cursor<br/><i>mcp-remote proxy</i>"]
    end

    subgraph cf["Cloudflare &nbsp;&nbsp; src/platforms/cloudflare"]
        direction TB
        CFW["Workers &nbsp;&nbsp; <i>OAuthProvider</i>"]
        CFA["Cloudflare Access<br/><i>or Google / Entra ID</i>"]
        CFKV["KV &nbsp;&nbsp; <i>OAUTH_KV</i>"]
        CFDO["Durable Object<br/><i>CacooMCP session</i>"]
        CFW -. "OIDC" .-> CFA
        CFW --- CFKV
        CFW --> CFDO
    end

    subgraph aws["AWS &nbsp;&nbsp; src/platforms/aws"]
        direction TB
        APIGW["API Gateway<br/><i>HTTP API + ACM + Route 53</i>"]
        LAMBDA["Lambda &nbsp;&nbsp; <i>nodejs22 / arm64</i>"]
        COG["Amazon Cognito"]
        DDB["DynamoDB &nbsp;&nbsp; <i>OAuth state</i>"]
        SM["Secrets Manager<br/><i>Cacoo API keys</i>"]
        APIGW --> LAMBDA
        LAMBDA -. "OIDC" .-> COG
        LAMBDA --- DDB
        LAMBDA --- SM
    end

    subgraph gcp["Google Cloud &nbsp;&nbsp; src/platforms/gcp"]
        direction TB
        RUN["Cloud Run &nbsp;&nbsp; <i>container</i>"]
        GID["Google account"]
        FS["Firestore &nbsp;&nbsp; <i>OAuth state</i>"]
        GSM["Secret Manager"]
        RUN -. "OIDC" .-> GID
        RUN --- FS
        RUN --- GSM
    end

    subgraph azure["Azure &nbsp;&nbsp; src/platforms/azure"]
        direction TB
        ACA["Container Apps &nbsp;&nbsp; <i>container</i>"]
        ENT["Entra ID"]
        COS["Cosmos DB &nbsp;&nbsp; <i>OAuth state</i>"]
        AKV["Key Vault"]
        ACA -. "OIDC" .-> ENT
        ACA --- COS
        ACA --- AKV
    end

    subgraph oauth["src/oauth &nbsp;&nbsp; shared by Node runtimes"]
        OP["provider.ts &nbsp;&nbsp; <i>OAuth authorization server</i>"]
        OS["store.ts &nbsp;&nbsp; <i>AuthStore interface</i>"]
        OP --- OS
    end

    subgraph shared["src/core &nbsp;&nbsp; every runtime"]
        CS["create-server.ts<br/><i>tool registration + email allowlist</i>"]
        TOOLS["tools/ &nbsp;&nbsp; <i>14 MCP tools</i>"]
        BC["cacoo-client.ts<br/><i>account routing + readOnly guard</i>"]
        CS --> TOOLS --> BC
    end

    CACOO["Cacoo API &nbsp;&nbsp; <i>/api/v1</i>"]

    clients == "Streamable HTTP + OAuth" ==> CFW
    clients == "Streamable HTTP + OAuth" ==> APIGW
    clients == "Streamable HTTP + OAuth" ==> RUN
    clients == "Streamable HTTP + OAuth" ==> ACA

    CFDO --> CS
    LAMBDA --> OP
    RUN --> OP
    ACA --> OP
    OP --> CS

    DDB -. "implements AuthStore" .-> OS
    FS -. "implements AuthStore" .-> OS
    COS -. "implements AuthStore" .-> OS

    BC == "per-account API key" ==> CACOO

リクエストフロー

sequenceDiagram
    autonumber
    participant C as MCP client
    participant S as Worker / Lambda / Container
    participant I as Upstream IdP
    participant K as Cacoo

    C->>S: POST /mcp
    S-->>C: 401 + OAuth metadata
    C->>S: authorize
    S->>I: redirect to upstream OIDC
    I-->>S: callback with identity
    Note over S: email allowlist check<br/>reject -> access_denied tool only
    S-->>C: access token
    C->>S: tools/list, tools/call
    Note over S: resolve account -> pick API key<br/>readOnly guard blocks writes
    S->>K: Cacoo REST API v1
    K-->>S: JSON / PNG / XML
    S-->>C: MCP result

認証は2つのレイヤーで行われます。アップストリーム IdP が にサインインを許可し、メール許可リストが 誰にツールを与えるか を判定します。許可リストにないユーザーには access_denied だけを公開するサーバーが割り当てられます。アカウントの readOnly フラグは、API クライアント層で非 GET リクエストをすべて拒否するため、個々のツールからバイパスすることはできません。

ディレクトリ構成

再利用範囲に応じて3つのレイヤーに分けています:

src/
  core/                    Every runtime. Depends only on the MCP SDK and zod
    cacoo-client.ts        Cacoo API client (account routing + readOnly guard)
    tools/                 14 MCP tools
    create-server.ts       MCP server assembly and authorization
  oauth/                   Node runtimes. OAuth authorization server (Express)
    provider.ts            OAuthServerProvider implementation
    store.ts               AuthStore interface — the persistence port
    upstream.ts            Upstream OIDC client
    consent.ts             Consent screen
    app.ts                 Express app exposing /authorize, /token, /mcp, ...
  platforms/
    cloudflare/            Workers wiring (uses its own Workers OAuth provider)
    aws/                   Lambda wiring + DynamoDB / Secrets Manager adapters
    gcp/                   Cloud Run wiring + Firestore / Secret Manager adapters
    azure/                 Container Apps wiring + Cosmos DB / Key Vault adapters
infra/
  aws/                     SAM template and parameters
  gcp/                     Terraform configuration
  azure/                   Bicep template and parameters

src/platforms/<name> は、クラウド SDK が登場する唯一の場所です。新しいNode 基盤のプラットフォームを追加するには、AuthStore、シークレットの取得、そして Express アプリをランタイムに引き渡すエントリポイントを実装する必要があります。

設定

アカウントは単一の JSON 文字列 CACOO_ACCOUNTS_CONFIG で設定されます。キーを発行し、organizationKey を見つける方法は、Cacoo API キーとアカウント設定 を参照してください。

{
  "accounts": [
    { "name": "main", "apiKey": "xxx", "organizationKey": "your-org-key" },
    { "name": "shared", "apiKey": "yyy", "readOnly": true }
  ],
  "defaultAccount": "main"
}

フィールド

説明

name

すべてのツールの account 引数で使用される名前

apiKey

Cacoo API キー。 https://cacoo.com/profile/api で生成します

organizationKey

図・フォルダーツールで使う既定の組織。非レガシープランでは必須。ツールから呼び出しのたびに上書きできます

readOnly

true の場合、非 GET リクエストをすべて拒否します

baseUrl

デフォルトは https://cacoo.com です

MCP クライアントから接続

Claude Code

claude mcp add --transport http cacoo https://<your-domain>/mcp -s user

Claude Desktop / Kiro / Cursor

{
  "mcpServers": {
    "cacoo": {
      "command": "npx",
      "args": ["mcp-remote", "https://<your-domain>/mcp"]
    }
  }
}

初回接続時にブラウザが開き、認証を求められます。

Claude Desktop (.mcpb バンドル)

npm run mcpb:pack   # generate on its own
npm run aws:deploy  # generated as part of the deploy

エンドポイントURL は user_config フィールドで、デプロイ先のドメインがそのデフォルトとして埋め込まれます。これは --hostMCP_HOSTNAMEinfra/aws/params.yaml 内の ApiDomainName、または .dev.vars 内の MCP_HOSTNAME の順に解決されます。

このバンドル自体にはサーバーは含まれません。 MCPB はローカル実行形式であるため、デプロイ済みサーバーに接続する stdio プロキシとして mcp-remote同梱しています。Claude Code はこのバンドルを利用せず、claude mcp add --transport http` のままです。

利用可能なツール

Tool

Description

list_diagrams

フィルタリング、ソート、ページング付きの図一覧取得

get_diagram

シートやコメントを含む単一の図の詳細取得

create_diagram

新しい空の図を作成

copy_diagram

既存の図をコピー

move_diagram

図を別のフォルダーへ移動

delete_diagram

図を削除

get_diagram_image

図または 1 つのシートの PNG レンダリング

get_diagram_contents

構造化された内容(図形、テキスト、線)を XML で取得

ワークスペース

Tool

Description

list_accounts

設定済みアカウント、既定のアカウント、書き込み可能なアカウント

list_folders

アカウント内のフォルダー一覧

list_organizations

組織一覧。 organizationKey として使用される key も含む/含む

get_account

認証済みアカウントのプロフィール

get_license

ライセンス・プランの詳細

get_user

ユーザー名によるユーザーの公開プロフィール

セキュリティ

  • 認証: アップストリーム IdP に対する PKCE (S256) を使用した OAuth 2.1

  • 認可: ALLOWED_EMAILS は、アプリケーションレベルのメール許可リストを提供します。 空のままにすると許可リストが無効になり、アップストリーム IdP を通じてサインインできるすべてのユーザーにすべてのツールが提供されます

  • API キーの保護: Cacoo API キーはサーバー側にのみ残り、クライアントに送信されることはありません

  • クライアントの同意: Dynamic Client Registration /(動的クライアント登録)は誰でも利用できます。そのため、認可はクライアント名とリダイレクト先を示す同意画面の背後で行われ、CSRF 対策も施されています。承認は client_idredirect_uri の組み合わせでキー付けされます

  • 書き込みガード: readOnly: true とマークされたアカウントは、非 GET リクエストをすべて拒否します。このチェックは src/core/cacoo-client.ts にあるため、個々のツールに依存しません

  • 依存関係のクールダウン: .npmrcmin-release-age=3 を設定し、依存関係の解決では公開から 3 日以上経過したバッケージ バージョンのみを対象とします

ローカル開発

npm install
npm run type-check   # all four platforms
npm test             # 108 assertions

テスト

カバー範囲

npm run test:cacoo-client

URL 構築、 organizationKey の解決、 readOnly ガード、エラーフォーマット、 4MB イメージ上限

npm run test:tools

14 ツールの登録、許可リストのゲート制御

npm run test:oauth

DCR、PKCE、使い捨てトークン、スコープ、失効

npm run test:oauth-consent

HTML エスケープ、署名済み Cookie、 CSRF、承認ゲート

npm run test:oauth-upstream

Cognito / Google / Entra ID のエンドポイント解決

IaC はクラウド認証情報なしで検証できます:

npm run aws:validate     # sam validate --lint
npm run gcp:validate     # terraform validate
npm run azure:validate   # az bicep build

クレジット

ツール定義は cacoo-mcp-server(ローカル stdio)から移植されています。 リモートサーバーのアーキテクチャは backlog-remote-mcp-server と共有しています。

ライセンス

MIT

A
license - permissive license
Not graded
quality - not tested
B
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

View all related MCP servers

Related MCP Connectors

  • 34 production API tools over one hosted MCP endpoint.

  • Search, document and execute authenticated API calls across 700+ apps via one MCP server

  • Access Kernel's cloud-based browsers and app actions via MCP (remote HTTP + OAuth).

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/midnight480/cacoo-remote-mcp-server'

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