Skip to main content
Glama

opus-advisor-mcp

Claude Codeがタスクの途中でOpusを戦略アドバイザーとして活用できるようにするMCPサーバーです。SonnetやHaikuでセッションを実行し、必要に応じてOpusに複雑な意思決定をエスカレーションできます。既存のClaude Codeサブスクリプションを使用するため、追加のAPIキーは不要です。

AnthropicのAdvisor Strategyに触発されています。

仕組み

┌─────────────────────────────────────────────┐
│  Claude Code (Sonnet)                       │
│                                             │
│  "I need to decide on the DB schema..."     │
│        │                                    │
│        ▼                                    │
│  calls consult_opus MCP tool                │
│        │                                    │
└────────┼────────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────────────────┐
│  opus-advisor MCP server                    │
│                                             │
│  1. Reads prior consultation history        │
│  2. Reads requested files from disk         │
│  3. Pipes prompt to: claude -p --model opus │
│  4. Logs advice to advisor-log.md           │
│  5. Returns advice to Sonnet                │
└─────────────────────────────────────────────┘

APIキーは不要です。このサーバーは claude CLI を呼び出し、既存の認証情報を利用します。

Related MCP server: codex-bridge

インストール

npm install -g opus-advisor-mcp

または、クローンしてローカルでビルドします:

git clone https://github.com/Divinci-AI/opus-advisor-mcp.git
cd opus-advisor-mcp
npm install
npm run build

設定

プロジェクトの .mcp.json または ~/.claude/.mcp.json に追加します:

{
  "mcpServers": {
    "opus-advisor": {
      "command": "opus-advisor",
      "timeout": 180000
    }
  }
}

ローカルにインストールした場合(グローバルではない場合):

{
  "mcpServers": {
    "opus-advisor": {
      "command": "node",
      "args": ["/path/to/opus-advisor-mcp/dist/index.js"],
      "timeout": 180000
    }
  }
}

設定を追加した後、Claude Codeを再起動してください。

ツール

consult_opus

Opusに戦略的なアドバイスを求めます。

パラメータ

デフォルト

説明

question

string

必須

アドバイスが必要な質問や問題

context

string

オプション

追加のコンテキスト、制約、背景情報

files

string[]

オプション

コンテキストとして含めるファイルパス(プロジェクトルートからの相対パス)

effort

"low"

"medium"

"high"

"medium"

Opusの推論の努力レベル

include_history

boolean

true

継続性のために過去の相談履歴を含めるか

例:

{
  "question": "Is this database migration safe under concurrent writes?",
  "files": ["src/db/migration-042.ts", "src/db/schema.ts"],
  "effort": "high"
}

read_advisor_log

過去の呼び出しからの相談ログを読み取ります。

パラメータ

説明

last_n

number

返す最近の相談件数(省略した場合はすべて)

read_advisor_meta

構造化されたメタデータ(レイテンシ、トークン数、努力レベル)を読み取ります。

パラメータ

説明

last_n

number

返す最近のエントリ数(省略した場合はすべて)

clear_advisor_log

相談ログとメタデータをクリアして、新しく開始します。

機能

  • APIキー不要claude CLI経由で既存のClaude Codeサブスクリプションを使用

  • プロジェクトごとのログ — 相談履歴はプロジェクトごとに ~/.opus-advisor/<project>-<hash>/ に保存されます

  • コード認識コンテキスト — ファイルパスを直接渡すと、サーバーがそれを読み取り、ラベル付きコードブロックとして注入します

  • 相談の継続性 — 過去のアドバイスがコンテキストとしてフィードバックされるため、Opusは以前の決定に基づいて構築できます

  • トークン認識履歴 — 履歴はエントリ数(5件)とトークン予算(約6Kトークン)の両方で制限されます

  • メタデータ追跡 — レイテンシ、トークン見積もり、努力レベルを advisor-meta.jsonl で追跡

  • シグナル保護 — 終了したプロセスからの部分的な出力は破棄され、アドバイスとして返されません

  • パストラバーサルガード — ファイル読み取りはプロジェクトルート内に留まるよう検証されます

セキュリティ

  • パストラバーサル保護: files パラメータは、解決されたすべてのパスがプロジェクトルートディレクトリ内に留まることを検証します。../../etc/passwd のようなパスや、プロジェクト外の絶対パスは拒否されます。

  • バイナリファイルフィルタリング: 一般的なバイナリ拡張子(画像、実行ファイル、アーカイブなど)は自動的にスキップされます。

  • シェル実行なし: サーバーは配列引数で spawn を使用し、stdin経由でプロンプトをパイプします。シェル補間は発生しません。

  • ローカルのみ: MCPサーバーはstdio経由でローカルで実行されます。ネットワークポートは開かれません。

  • 相談ログ: ~/.opus-advisor/ にプレーンテキストで保存されます。これらには、相談内容のコードスニペットや質問が含まれる場合があります。機密コードが含まれている場合は、これらのファイルをコミットしたり共有したりしないでください。

環境変数

変数

説明

ADVISOR_LOG_DIR

ログディレクトリを上書きします(デフォルト: ~/.opus-advisor/<project>-<hash>/

AnthropicのAdvisorツールとの比較

Anthropicの advisor_20260301 は、サーバーサイドのAPI機能であり、アドバイザーは単一のAPIリクエスト内で会話の全記録を参照します。このMCPサーバーは異なるアプローチをとっています:

Anthropic Advisorツール

opus-advisor-mcp

コンテキスト共有

全会話記録(サーバーサイド)

質問 + ファイル + 履歴(クライアントサイド)

認証

APIキーが必要

既存のClaude Codeサブスクリプションを使用

統合

APIレベル (tools 配列)

MCPツール(現在のClaude Codeで動作)

永続性

なし

Markdownログ + JSONLメタデータ

コスト

Opus料金でトークンごとに課金

サブスクリプションに含まれる

要件

  • Node.js >= 18

  • Claude Code CLIがインストールされ、認証されていること

ライセンス

MIT

Available Tools

4 tools
clear_advisor_logClear Advisor LogA
Destructive

Clear the consultation log and metadata to start fresh for this project.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds context beyond the destructiveHint annotation by specifying what gets cleared (log and metadata). It is consistent with the annotation and gives agents understanding of the tool's impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly conveys the purpose. No superfluous words, front-loaded with action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, no output schema, clear annotations), the description is complete. It tells an agent exactly what the tool does and when to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters; the schema coverage is 100%. The description does not need to elaborate on parameters, and it provides no irrelevant information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'clear' and the resources 'consultation log and metadata'. It distinguishes this tool from the read-only siblings (read_advisor_log, read_advisor_meta).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'to start fresh for this project' implies appropriate usage context. However, it lacks explicit guidance on when not to use or mention of alternatives, though the sibling tool names provide implicit contrast.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

consult_opusConsult Opus AdvisorA
Read-only

Consult Claude Opus 4.7 for strategic advice. Opus runs via the Claude Code CLI with your existing subscription — no API key needed. The advisor maintains a per-project consultation log for continuity across calls. History is capped by both entry count (5) and token budget (~6K tokens) to prevent context bloat. Use this for architecture decisions, complex debugging, code review, or any problem that benefits from deeper reasoning.

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYesThe question or problem you need advice on. Be specific about what decision you're facing or what you're stuck on.
contextNoAdditional context: relevant code snippets, error messages, constraints, or background. Include enough that the advisor can give specific guidance without needing to read files.
effortNoReasoning effort level for Opus. 'low' for quick opinions, 'medium' (default) for thorough advice, 'high' for deep analysis.medium
filesNoFile paths (relative to project root) to include as code context. Each file is read and prepended as a labeled code block. Max 50KB per file, 200KB total. Example: ['src/index.ts', 'lib/utils.ts']
include_historyNoWhether to include prior consultation history for continuity. Defaults to true. Set to false for standalone questions unrelated to prior advice.

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals multiple behavioral traits beyond annotations: it maintains a per-project consultation log with entry (5) and token (~6K) caps, and explains the subscription model ('no API key needed'). Annotations already mark it as read-only and open-world, and the description adds valuable context without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is approximately 100 words and front-loaded with the main purpose. Every sentence adds value: subscription details, history management, limits, and explicit use cases. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and moderate complexity, the description covers the essential aspects: purpose, mechanism, context management, and suitable use cases. It could be slightly improved by mentioning the response format or an example, but overall it is sufficient for an agent to understand the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage for 5 parameters. The description adds value by explaining the history cap (entry count and token budget) that directly informs the include_history parameter. It does not repeat schema descriptions, and the effort parameter's enum is not elaborated, but the overall context aids parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Consult Claude Opus 4.7 for strategic advice', providing a clear verb and resource. It distinguishes the tool from its siblings (log management) and lists specific use cases like architecture decisions and complex debugging.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear guidance on when to use the tool ('Use this for architecture decisions, complex debugging, code review'), but does not explicitly mention when not to use it or compare it to alternatives. The siblings are for log management, so no direct competition, but exclusion criteria are missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_advisor_logRead Advisor LogA
Read-only

Read the consultation log from prior Opus advisor calls for this project. Useful for reviewing past advice or getting context on decisions already made.

ParametersJSON Schema
NameRequiredDescriptionDefault
last_nNoNumber of recent consultations to return. Omit for the full log.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description adds context about the log's content ('consultation log from prior Opus advisor calls'). There is no contradiction and additional detail is provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, both adding value: first states action, second states usefulness. No extraneous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional param, no output schema), the description adequately explains what data is returned and when to use it. Minor lack of detail on format, but sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the only parameter 'last_n', which already explains its meaning. The description does not add further semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Read' and the resource 'consultation log from prior Opus advisor calls', and it distinguishes from sibling tools like clear_advisor_log and consult_opus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides context for when to use ('reviewing past advice', 'getting context on decisions'), but does not explicitly mention when not to use or name alternatives like read_advisor_meta.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_advisor_metaRead Advisor MetadataA
Read-only

Read structured metadata (latency, token counts, effort levels) from all consultations. Useful for understanding cost and performance patterns.

ParametersJSON Schema
NameRequiredDescriptionDefault
last_nNoNumber of recent entries to return. Omit for all.

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds value by specifying the fields read (latency, token counts, effort levels), but does not disclose additional behaviors like behavior on empty results or error handling. For a read-only tool, this is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with only two sentences, front-loading the core action and then stating the use case. Every sentence is meaningful with no superfluous wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description gives a high-level overview but omits details like return format, data structure, or scope limitations (e.g., 'all consultations' implies no filtering). While siblings provide context, the description alone is moderately complete but could be more thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description of the sole parameter 'last_n'. The tool description does not add any extra meaning or context about the parameter beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads structured metadata (latency, token counts, effort levels) from consultations, with a specific verb and resource. It distinguishes from siblings like 'read_advisor_log' and 'clear_advisor_log' by focusing on metadata vs logs, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions it is 'useful for understanding cost and performance patterns,' implying a use case, but fails to provide explicit when-to-use or when-not-to-use guidance. No alternatives are mentioned, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.1.0
    • First observedclear_advisor_log
    • First observedconsult_opus
    • First observedread_advisor_log
    • First observedread_advisor_meta

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a uniquely defined purpose: clearing the log, consulting Opus, reading the log, and reading metadata. No two tools overlap in functionality, so an agent can easily distinguish them.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern using snake_case (e.g., consult_opus, read_advisor_log). The naming convention is uniform across the entire set.

Tool Count5/5

Four tools is a well-scoped count for an advisor MCP server. Each tool addresses a distinct need (consultation, log management, metadata access) without unnecessary extras.

Completeness4/5

The tool set covers the core operations: consultation, log reading/clearing, and metadata inspection. A minor gap is the lack of a configuration tool to adjust Opus parameters, but the current surface is sufficient for most workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/Divinci-AI/opus-advisor-mcp'

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