Skip to main content
Glama

OMOS-MCP

MCPサーバーがAIエージェント(Claude、ChatGPT、Cursor など)に OMOS Shared Drive 内のプロジェクト文書を読み取り、質問に回答します。各回答は元のファイルとGoogle Driveリンクを参照します。

対応するDrive構造:

OMOS/
├── Project A/
│   ├── Project Overview/
│   ├── Timeline/
│   ├── Design/
│   │   ├── System Flow/
│   │   ├── DB/
│   │   └── API/
│   └── BRD/
└── Project B/ ...

ツール

ツール

説明

omos_index

Drive全体をインデックス化: 全プロジェクト + 全ファイル、IDとリンク付き(エージェントは常にこれを最初に呼び出す)

omos_search

Drive全体を全文検索し、プロジェクト/セクションでスコープを制限可能

omos_read

ファイルをテキストとして読み取り — Google Docs/Sheets/Slides、PDF、.docx、.xlsx、md/text、および画像(画像はエージェントに直接表示)

omos_refresh

即座にインデックスを再構築(通常のキャッシュは5分)

エージェントは以下の順序で検索します: プロジェクト名でフィルター → 見つからない場合はプロジェクト概要を確認し、ユーザーに確認 → 次に タイムライン | BRD | 設計(システムフロー / DB / API) についての質問かどうかを確認 → 質問が広範囲にわたる場合は、スコープを絞るために質問を返します(サーバー指示に組み込み済み)。

Related MCP server: brkt-gdrive-mcp

初回セットアップ: サービスアカウント

サーバーはサービスアカウントを使用してDriveにアクセスします(各ユーザーのログインは不要):

  1. console.cloud.google.com にアクセス → 新しいプロジェクトを作成(または既存のものを使用)

  2. APIs & Services → Library → Google Drive API を検索 → Enable をクリック

  3. IAM & Admin → Service Accounts → Create Service Account → 名前を入力(例: omos-mcp)→ Create をクリック(ロールの割り当てはスキップ可能、権限は付与しない)

  4. 作成したサービスアカウントに移動 → Keys タブ → Add Key → Create new key → JSON → キーファイルがダウンロードされる

  5. サービスアカウントのメールアドレス(omos-mcp@<project>.iam.gserviceaccount.com)をコピーし、共有Drive / OMOSフォルダに閲覧者として共有

  6. ルートOMOSのフォルダIDを取得: ブラウザでフォルダを開き、URL https://drive.google.com/drive/folders/<これがIDです> を確認

環境変数

変数

説明

OMOS_ROOT_FOLDER_ID

ルートOMOSのフォルダID(手順6より)— 必須

GOOGLE_SERVICE_ACCOUNT_JSON

キーJSONファイルの内容全体、またはファイルへのパス — 必須

OMOS_AUTH_TOKEN

(HTTPモード)クライアントが送信するbearerトークン

OMOS_INDEX_TTL

インデックスのキャッシュTTL(秒)(デフォルト300)

OAUTH_ISSUER / OAUTH_AUDIENCE / PUBLIC_URL

(HTTPモード)Claude.ai / ChatGPT Web向けOAuthモードを有効化

PORT

(HTTPモード)待受ポート(デフォルト8000)

ローカル実行

事前に uv をインストールしてください(curl -LsSf https://astral.sh/uv/install.sh | sh)

1) .env を設定(サーバーがリポジトリルートから自動的に読み込みます):

cp .env.example .env

.env を編集し、OMOS_ROOT_FOLDER_ID とキーファイルのパスを設定します(例: キーファイルを ./service-account.json に配置 — これはすでにgitignoreされています)

2) Claude Code(stdio)と接続:

claude mcp add omos -- uv run --directory "/path/to/OMOS-MCP" omos-mcp

Claude Desktop / Cursor / Windsurf — MCP設定に追加:

{
  "mcpServers": {
    "omos": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/OMOS-MCP", "omos-mcp"]
    }
  }
}

3) テスト: エージェントに "OMOSにはどんなプロジェクトがありますか?" と質問 — プロジェクト名とリンクのリストが返るはずです

(オプション)ローカルでHTTPサーバーとして実行: .env で OMOS_AUTH_TOKEN を有効にし、次のコマンドを実行:

uv run omos-mcp-http

エンドポイントは http://localhost:8000/mcp にあり、次の方法で接続:

claude mcp add --transport http omos http://localhost:8000/mcp -H "Authorization: Bearer <OMOS_AUTH_TOKEN>"

MCPリンクとしてデプロイ(Render)

  1. このリポジトリをGitHubにプッシュ(Dockerfile + render.yaml は既に含まれています)

  2. Render → New → Blueprint → このリポジトリを選択

  3. ダッシュボードで環境変数を設定:

    • OMOS_ROOT_FOLDER_ID = ルートOMOSのフォルダID

    • GOOGLE_SERVICE_ACCOUNT_JSON = キーJSONファイルの内容全体(直接貼り付け)

    • OMOS_AUTH_TOKEN Renderが自動生成 → コピーしてチームに配布

  4. デプロイ完了 → エンドポイントは https://<app>.onrender.com/mcp

ユーザーは接続:

claude mcp add --transport http omos https://<app>.onrender.com/mcp \
  -H "Authorization: Bearer <OMOS_AUTH_TOKEN>"

Cursor / VS Code: MCP設定にURL + ヘッダー Authorization: Bearer <token> を入力

Claude.ai / ChatGPT(Web)で使用する — OAuth

Webクライアントにはヘッダーを設定する場所がないため、WorkOS AuthKit などのプロバイダーを通じてOAuthを使用する必要があります(無料枠は100万ユーザーまで):

  1. workos.com にサインアップ → AuthKitを有効化 → ログイン方法を設定し、チームメンバーのみに制限

  2. ダッシュボード → Connect → Configuration → Client ID Metadata Document と Dynamic Client Registration を有効化

  3. Resource Indicator を追加 = https://<app>.onrender.com(/mcp は不要)

  4. Renderに3つの環境変数を追加: OAUTH_ISSUER = AuthKitドメイン、OAUTH_AUDIENCE = https://<app>.onrender.com、PUBLIC_URL = https://<app>.onrender.com

  5. ユーザー: Claude.ai → Settings → Connectors → Add custom connector → https://<app>.onrender.com/mcp を入力 → WorkOSでログイン

OAuthモードとbearerトークンは共存可能 — WebはOAuth、CLIはトークンを引き続き使用できます

コンバーターのテスト

uv run python test_convert.py

Available Tools

4 tools
omos_indexA

Get the full index of the OMOS drive: every project and its files (with file ids and links). Use this whenever the user asks about any internal project, BRD, timeline, design, system flow, DB, API, or เอกสารโปรเจค — ALWAYS call this first, then filter by Project Name before drilling into Timeline / BRD / Design (System Flow, DB, API).

Inputs: no named parameters. Returns: result

omos_readA

Read a file from the OMOS drive as text (Google Docs/Sheets/Slides, PDF, docx, xlsx, markdown/text) or as an image (png/jpg). The response starts with a citation block (file name, path, link) — always include that citation in your answer.

Args: file_id: the Drive file id from omos_index or omos_search

Inputs: file_id (required).

omos_refreshA

Rebuild the drive index so newly added projects/files show up immediately (the index is otherwise cached for a few minutes).

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: omos_index provides the full index, omos_search performs full-text search with optional filters, omos_refresh rebuilds the index, and omos_read reads file content. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All tools follow a consistent 'omos_<verb>' pattern (index, search, refresh, read). The naming is predictable and uniform, making it easy for an agent to understand the action each tool performs.

    Tool Count5/5

    With 4 tools, the set is well-scoped for a drive retrieval server. Each tool addresses a necessary function (listing, searching, refreshing, reading) without being too few or excessive. The count matches the domain's core operations.

    Completeness5/5

    The tool surface covers the full read lifecycle for the OMOS drive: obtaining the index, searching, refreshing for updates, and reading file content. No obvious gaps exist for a retrieval-focused server; all necessary operations are present.

    Related MCP Connectors

    Related MCP Servers