opus-advisor-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opus-advisor-mcp review this database migration for potential race conditions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
opus-advisor-mcp
An MCP server that lets Claude Code consult Opus as a strategic advisor mid-task. Run your session on Sonnet or Haiku, and escalate complex decisions to Claude Opus 4.7 on demand — using your existing Claude Code subscription.
Inspired by Anthropic's Advisor Strategy.
How it works
┌─────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────┘No API keys needed. The server shells out to the claude CLI, which uses your existing authentication.
Related MCP server: codex-bridge
Install
npm install -g opus-advisor-mcpOr clone and build locally:
git clone https://github.com/Divinci-AI/opus-advisor-mcp.git
cd opus-advisor-mcp
npm install
npm run buildConfigure
Add to your project's .mcp.json or ~/.claude/.mcp.json:
{
"mcpServers": {
"opus-advisor": {
"command": "opus-advisor",
"timeout": 180000
}
}
}If installed locally (not globally):
{
"mcpServers": {
"opus-advisor": {
"command": "node",
"args": ["/path/to/opus-advisor-mcp/dist/index.js"],
"timeout": 180000
}
}
}Restart Claude Code after adding the config.
Tools
consult_opus
Consult Opus for strategic advice.
Parameter | Type | Default | Description |
| string | required | The question or problem you need advice on |
| string | optional | Additional context, constraints, or background |
| string[] | optional | File paths (relative to project root) to include as code context |
|
|
| Reasoning effort level for Opus |
| boolean |
| Include prior consultation history for continuity |
Example:
{
"question": "Is this database migration safe under concurrent writes?",
"files": ["src/db/migration-042.ts", "src/db/schema.ts"],
"effort": "high"
}read_advisor_log
Read the consultation log from prior calls.
Parameter | Type | Description |
| number | Number of recent consultations to return (omit for all) |
read_advisor_meta
Read structured metadata (latency, token counts, effort levels).
Parameter | Type | Description |
| number | Number of recent entries to return (omit for all) |
clear_advisor_log
Clear the consultation log and metadata to start fresh.
Features
No API key required — Uses your existing Claude Code subscription via the
claudeCLIPer-project logs — Consultation history is stored per project at
~/.opus-advisor/<project>-<hash>/Code-aware context — Pass file paths directly; the server reads and injects them as labeled code blocks
Consultation continuity — Prior advice is fed back as context so Opus can build on earlier decisions
Token-aware history — History is capped by both entry count (5) and token budget (~6K tokens)
Metadata tracking — Latency, token estimates, and effort levels tracked in
advisor-meta.jsonlSignal protection — Partial output from killed processes is discarded, not returned as advice
Path traversal guard — File reads are validated to stay within the project root
Security
Path traversal protection: The
filesparameter validates that all resolved paths remain within the project root directory. Paths like../../etc/passwdor absolute paths outside the project are rejected.Binary file filtering: Common binary extensions (images, executables, archives, etc.) are automatically skipped.
No shell execution: The server uses
spawnwith array arguments and pipes the prompt via stdin. No shell interpolation occurs.Local only: The MCP server runs locally via stdio. No network ports are opened.
Consultation logs: Stored at
~/.opus-advisor/in plaintext. These may contain code snippets and questions from your consultations. Do not commit or share these files if they contain sensitive code.
Environment Variables
Variable | Description |
| Override the log directory (default: |
How it compares to Anthropic's Advisor Tool
Anthropic's advisor_20260301 is a server-side API feature where the advisor sees the full conversation transcript within a single API request. This MCP server is a different approach:
Anthropic Advisor Tool | opus-advisor-mcp | |
Context sharing | Full transcript (server-side) | Question + files + history (client-side) |
Auth | API key required | Uses existing Claude Code subscription |
Integration | API-level ( | MCP tool (works in Claude Code today) |
Persistence | None | Markdown log + JSONL metadata |
Cost | Billed per-token at Opus rates | Included in subscription |
Requirements
Node.js >= 18
Claude Code CLI installed and authenticated
License
MIT
Available Tools
4 toolsclear_advisor_logClear Advisor LogADestructive
Clear the consultation log and metadata to start fresh for this project.
Inputs: no named parameters.
consult_opusConsult Opus AdvisorARead-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.
Inputs: question (required), context, effort, files, +1 more.
read_advisor_logRead Advisor LogARead-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.
Inputs: last_n.
read_advisor_metaRead Advisor MetadataARead-only
Read structured metadata (latency, token counts, effort levels) from all consultations. Useful for understanding cost and performance patterns.
Inputs: last_n.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for Serena — tasks, notes & projects from Claude, Codex, Cursor & ChatGPT.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Hosted X Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that lets Claude Code consult stronger AI models (o3, Gemini 2.5 Pro, DeepSeek Reasoner) when you need deeper analysis on complex problems.1151MIT
- AlicenseAqualityDmaintenanceMCP server that lets Claude Code ask GPT Codex for adversarial planning, code review, debugging, research, and risk triage without leaving your project workflow.919 npm2MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows Claude Code to interact with the OpenAI Codex CLI.44 npm20MIT
- AlicenseNot gradedqualityBmaintenanceMCP server enabling Claude to consult Codex (GPT-5.x) mid-task for second opinions, plan/diff review, brainstorming, and codebase exploration via structured debates and permission-controlled interactions.2MIT