Skip to main content
Glama

opus-advisor-mcp

Claude Code가 작업 도중 전략적 조언자로 Opus를 참조할 수 있게 해주는 MCP 서버입니다. Sonnet이나 Haiku로 세션을 실행하고, 필요할 때마다 기존 Claude Code 구독을 사용하여 복잡한 의사 결정을 Opus에게 위임하세요.

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을 통해 프롬프트를 파이프합니다. 쉘 보간(interpolation)은 발생하지 않습니다.

  • 로컬 전용: 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에서 작동)

지속성

없음

마크다운 로그 + JSONL 메타데이터

비용

Opus 요금으로 토큰당 청구

구독에 포함

요구 사항

라이선스

MIT

Available Tools

4 tools
clear_advisor_logClear Advisor LogA
Destructive

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

Inputs: no named parameters.

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.

Inputs: question (required), context, effort, files, +1 more.

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.

Inputs: last_n.

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.

Inputs: last_n.

Tool Schema Changelog

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

Loading tool schema changelog…

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers