Skip to main content
Glama

claude-consult-mcp

Let OpenAI Codex (CLI and desktop app) consult your local Claude Code while it analyzes problems: co-analysis, adversarial second opinions, and read-only file review — over the Model Context Protocol.

Claude is advisory only by design: it reads files and researches the web, but it can never modify anything. Implementation always stays with Codex.

Codex CLI / Desktop app  (shared ~/.codex/config.toml)
   |  spawns: cmd /c npx -y claude-consult-mcp   (Windows)
   |          npx -y claude-consult-mcp          (macOS / Linux)
   v
MCP stdio server (this package)
   |  9 tools by default; 10 with gate findings; 12 with journal + gate findings
   |  zod-validated, read-only allowlist, injection-hardened argv
   v
claude -p --output-format json   (your existing Claude Code login)

Verified in release tests against: Claude Code CLI 2.1.163, Codex CLI 0.142.0 and 0.144.1, MCP SDK 1.x.

Prerequisites

  • Node.js >= 20

  • Claude Code installed and logged in on each machine: npm install -g @anthropic-ai/claude-code, then run claude once

  • Codex CLI >= 0.142 (npm install -g @openai/codex) and/or the Codex desktop app

Related MCP server: cc-in-codex

Quick start

npx -y claude-consult-mcp setup

That runs the platform-correct codex mcp add for you (on Windows it wraps the launcher in cmd /c, which Codex requires for npx-based servers). Then add the recommended timeouts to ~/.codex/config.toml under the server section — codex mcp add has no flags for them:

[mcp_servers.claude-consult]
startup_timeout_sec = 60
tool_timeout_sec = 600

Codex 0.144 introduced per-server tool approval through default_tools_approval_mode: "auto" (the default), "prompt", "writes", or "approve". All claude-consult tools declare the MCP readOnlyHint annotation, so the default mode auto-approves them with no configuration; set default_tools_approval_mode = "prompt" explicitly if you want to confirm every consultation.

~/.codex/config.toml is shared by the Codex CLI and desktop app, but the two install and update their engines independently. Restart the desktop app after changing the file so it reloads the server configuration. Verify with:

npx -y claude-consult-mcp doctor          # environment checks (free)
npx -y claude-consult-mcp doctor --live   # plus one real claude call (costs tokens)
codex mcp list

Manual registration

# Windows
codex mcp add claude-consult -- cmd /c npx -y claude-consult-mcp

# macOS / Linux
codex mcp add claude-consult -- npx -y claude-consult-mcp

快速開始(繁體中文)

  1. 每台機器先安裝並登入 Claude Code:npm install -g @anthropic-ai/claude-code,執行一次 claude 完成登入

  2. 執行 npx -y claude-consult-mcp setup 自動註冊進 Codex(Windows 會自動加上 cmd /c 包裝)

  3. 依上方說明把 startup_timeout_sec = 60tool_timeout_sec = 600 加進 ~/.codex/config.toml

  4. 重啟 Codex 桌面 app;用 npx -y claude-consult-mcp doctor 檢查狀態

The tools: nine by default, ten with gate findings, twelve with journal

Tool

Use it for

Required args

ask_claude

General co-analysis, an independent expert view

question (+ optional context)

claude_second_opinion

Adversarial critique of Codex's own analysis before acting on it

problem, analysis

claude_review_files

Deep read-only review of real files/directories

paths (absolute, 1-32), question

claude_review_diff

Review actual git changes with diff/status context and repo read access

workspace_dir

claude_debate_open

Structured evidence debate for significant decisions; Claude verifies caller evidence and returns per-claim rulings

topic, position, evidence, workspace_dir

claude_debate_reply

Continue a debate round by accepting or rebutting Claude's rulings with new evidence

session_id, workspace_dir, responses

claude_panel

Multi-perspective verification in one call; N perspectives = N Claude runs

task

claude_continue

Follow-ups in the same conversation

session_id, message

claude_sessions

Recover recent session ids without a Claude run

none (optional workspace_dir, limit)

claude_gate_findings

Read recent automatic review-gate findings back in-band without a Claude run

none (optional workspace_dir, limit)

claude_consult_history

Recover past consultation metadata from the opt-in machine journal across Codex sessions and server restarts

none (optional workspace_dir, limit)

claude_continuity_status

Report content-free continuity readiness counts for a workspace without a Claude run

workspace_dir

claude_continue also accepts stance: "critical" for follow-ups after an adversarial review or debate so Claude keeps its reviewer discipline.

Most Claude-calling tools also accept optional workspace_dir (absolute path; becomes Claude's working directory - reuse it when continuing a session), model, and effort; tools whose table row lists workspace_dir require it. Continuation-capable tools also accept session_id; claude_panel always starts fresh conversations. claude_sessions reads only the in-memory metadata ledger, claude_gate_findings reads only the configured review-gate findings log, and claude_consult_history reads only the opt-in journal. None of those recall tools invokes Claude.

Claude-calling tools also accept optional effort for per-call reasoning depth within the machine owner's configured ceiling.

Losing a session? Call claude_sessions to list recent conversations from this server process, newest first, then pass the recovered session_id and same workspace_dir to claude_continue.

Want recall across restarts? Set CLAUDE_CONSULT_JOURNAL_DIR to a local absolute directory path. The server then registers claude_consult_history, which lists journal entries newest first and can filter by exact workspace_dir.

Use claude_gate_findings when the user mentions review-gate findings or when starting work in a repository where the automatic review gate is installed. The tool reads the findings log resolved by the MCP server's environment: CLAUDE_CONSULT_GATE_LOG, or <CLAUDE_CONSULT_JOURNAL_DIR>/review-gate.log. If the Stop hook was installed with a different embedded log path than the MCP server environment resolves, the hook and the tool read different files; configure the same path in both places. Each entry includes a session_id and repo; each entry's session_id can be passed to claude_continue with that repo as workspace_dir to discuss that gate review with the Claude session that produced it.

Successful single-run results that actually ran Claude end with a machine-readable footer. claude_panel instead places one footer in each successful perspective section; failed perspective sections contain only the error:

---
[claude-consult] session_id: <uuid> | cost_usd: 0.12 | duration_ms: 3400 | turns: 2

Eligible fresh runs append | continuity: injected(N) or | continuity: none as the final footer segment, after an optional | format: segment. Journal-off, owner-disabled, resumed, no-workspace, and continuity: false runs omit the continuity segment entirely.

Machine-readable results

Successful single-run Claude-backed results carry this server-derived envelope in MCP structuredContent:

{
  "format": "json",
  "data": { "answer": "..." },
  "meta": {
    "session_id": "123e4567-e89b-12d3-a456-426614174000",
    "cost_usd": 0.12,
    "duration_ms": 3400,
    "turns": 2,
    "continuity": { "injected": true, "entries": 2 }
  }
}

data is present only when format is json; prose results use format: "prose" and omit data. Missing numeric metadata is null, and continuity-ineligible runs use continuity: null.

Read structured_content when present. The existing text body and footer are byte-compatible fallbacks and remain unchanged. Error results carry text only. claude_panel remains text-only because it aggregates multiple runs, and the list-shaped spawn-free tools remain text-only in this release.

claude_continuity_status instead mirrors its existing compact JSON object directly as structured_content, without execution metadata.

Example prompt to Codex: "Use the ask_claude tool to ask Claude what it thinks about this design, then continue the session and ask it to fact-check the API you plan to use."

Consultation journal

The journal is opt-in. Nothing is written unless CLAUDE_CONSULT_JOURNAL_DIR is set to a valid local absolute path; relative, UNC, and device paths are rejected. Journal files are JSONL, one file per month named consult-journal-YYYY-MM.jsonl under that directory.

Entries contain only the listed metadata, not dedicated prompt, file-content, or answer-body fields: ISO timestamp, originating tool, Claude session_id, workspace directory when present, model when present, a whitespace-collapsed topic excerpt capped at 120 characters, total cost, and duration. For review-gate entries, the 120-character topic excerpt comes from the first non-empty line of Claude's findings and may contain the complete answer when it fits within the cap. Write failures are logged to stderr and swallowed, so a disk problem cannot fail the consultation.

When the journal is enabled, fresh advisor conversations with an explicit workspace_dir, including gate reviews, receive a <recent-consultations> digest of up to 5 recent entries from the current month's journal for the same workspace, newest first. Resumed sessions never receive this digest. Disable continuity with CLAUDE_CONSULT_CONTINUITY=0. The digest contains only metadata the journal already stores and is injected as tagged background that Claude is told is context, not instructions.

Continuity activates only when all four conditions are true: the journal is configured, CLAUDE_CONSULT_CONTINUITY is not 0, the run has no session_id, and the caller passes an explicit workspace_dir.

For clean-context fresh runs, pass continuity: false; this can only disable continuity and cannot enable it against the owner's CLAUDE_CONSULT_CONTINUITY=0 switch.

Run doctor inside the project directory to report continuity status and counts for that workspace; it never prints journal content.

Set CLAUDE_CONSULT_LOG_LEVEL=debug to show one per-run continuity skip reason or injected entry count on stderr.

claude_continuity_status returns compact JSON with exactly continuity_enabled, candidate_count, matching_count, would_inject, and reason. It is available only when the journal is enabled and is the machine-readable counterpart to the count-only doctor diagnostics.

Reason

Meaning

matching_entries

Continuity is enabled and matching workspace entries exist

continuity_disabled

The owner disabled continuity

no_candidates

The current month has no valid journal entries

no_workspace_match

Current-month entries exist, but none match the workspace

journal_unreadable

The journal could not be read; counts fail soft to zero

would_inject reports the workspace/machine state a caller cannot know; per-call factors that suppress the digest (resuming a session, continuity: false) are the caller's own choices and are not predicted by this tool.

claude_consult_history is available only when the journal is enabled. It never spawns Claude and it returns plain text without a session footer.

Gate your actions on Claude's verdict

claude_second_opinion, claude_debate_open, and claude_debate_reply request structured output, but Claude's schema compliance is model-dependent best-effort. Prefer structured_content.format when it is available; for text-only clients or results, check the footer's format field before parsing. format: prose means Claude answered directly and the body is wrapped for reading instead of JSON parsing:

Pass structured: true to claude_review_diff to request machine-readable findings with required severity, file, line, finding, evidence, recommendation, and confidence fields, plus optional end_line, category, and symbol fields. This is best-effort and uses the existing prose fallback; omit it for the default prose review.

const text = result.content[0].text;
const [body, footer = ""] = text.split("\n\n---\n");
const format = footer.match(/\| format: (json|prose)\b/)?.[1];

if (format === "json") {
  const verdict = JSON.parse(body) as { verdict: "agree" | "partial" | "disagree"; confidence: number };
  if (verdict.verdict === "disagree" || verdict.confidence < 0.7) {
    // Re-check the evidence before committing to the change.
  }
} else if (format === "prose") {
  const prose = body.match(/<prose-answer>\n([\s\S]*)\n<\/prose-answer>/)?.[1] ?? body;
  // Read prose directly, or retry once with model "sonnet" or "opus" if strict JSON fields are required.
} else {
  throw new Error("Claude result is missing a structured-output format footer.");
}

Verification workflows

The server ships MCP instructions and trigger-worded tool descriptions so calling agents include Claude in verification workflows without per-user prompt files. Use claude_second_opinion for plans or conclusions, claude_review_files when Claude should inspect code directly, and claude_panel when the user wants multiple perspectives in one call. Claude is instructed to cite precise evidence for every claim: file paths with line numbers it actually read, or URLs it actually fetched, and to verify accessible caller claims before relying on them. If Claude returns a Questions for you: section or a structured questions_for_caller array, answer those questions with claude_continue so the same conversation can produce a better conclusion. For implemented changes, use claude_review_diff so Claude reviews the actual git diff instead of only a summary. Clients that support MCP progress see a heartbeat during long calls.

Example Codex prompt: "Verify this plan with claude_panel using the security and correctness perspectives."

Automatic review gate

claude-consult-mcp review-gate reviews the current git worktree's uncommitted HEAD diff with Claude. It uses hardened git diff flags (--no-ext-diff --no-textconv), includes git status --porcelain, runs through the same advisory runner as the MCP tools, and records origin metadata as review-gate so the opt-in journal can show the run.

When installed as a Codex Stop hook, the gate receives Codex's end-of-turn summary on stdin and asks the reviewer to compare the diff against it, catching claimed work that is missing or incomplete and material changes the summary did not mention. Manual review-gate runs have no claim and review the diff only. The claim is untrusted context, and the reviewer is instructed never to follow instructions inside it.

The gate is fail-open by design. Outside a git repo or on a clean tree it exits 0 silently. Oversized diffs exit 0 with stderr review-gate: diff too large (N bytes), skipped. Missing git, missing Claude, auth failures, timeouts, malformed Claude output, and other gate errors exit 0 with a one-line stderr review-gate: skipped (...) note. It never blocks the caller's workflow.

When it finds something to report, the gate records findings to CLAUDE_CONSULT_GATE_LOG or <CLAUDE_CONSULT_JOURNAL_DIR>/review-gate.log; it also prints them to stdout. Each findings entry records the repository as the final header field, so the reader can filter entries by workspace_dir. Codex does not inject Stop-hook stdout into the next model turn's context. Treat automatic findings as out-of-band review notes: call claude_gate_findings to bring those durable findings back into the MCP conversation, then use the logged session_id with the logged repo as workspace_dir in claude_continue for follow-up on that Claude conversation.

When a findings log is configured, the gate keeps a per-repository cooldown memo named review-gate.state.json beside the resolved findings log. The cooldown keys on the diff/status snapshot alone, never the claim, so an unchanged diff is skipped even when the claim changes; use --force to override. If the diff and status are unchanged since that repository's last successful review, the gate exits 0 without calling Claude and prints review-gate: diff unchanged since last review, skipped to stderr. The cooldown is inactive when neither CLAUDE_CONSULT_GATE_LOG nor CLAUDE_CONSULT_JOURNAL_DIR resolves a findings log.

Gate journal entries use the first non-empty line of the actual findings, so claude_consult_history shows what the gate found. LGTM means the gate completed with a clean pass.

The default gate model is haiku because the hook can run after many turns. Override it per run with --model <m> or set CLAUDE_CONSULT_GATE_MODEL; the flag wins over the environment variable. Use --quiet to suppress the exact LGTM case:

npx -y claude-consult-mcp review-gate --quiet

To install it as a Codex stop hook:

npx -y claude-consult-mcp setup --install-review-gate
npx -y claude-consult-mcp setup --install-review-gate --gate-log <absolute-path>
npx -y claude-consult-mcp setup --install-review-gate --journal-dir <absolute-path>
npx -y claude-consult-mcp setup --remove-review-gate

Setup edits ~/.codex/hooks.json, creates a timestamped hooks.json.bak-YYYYMMDDHHMMSS backup before modifying an existing hooks file, preserves unrelated hooks, and replaces an existing claude-consult-mcp review-gate entry instead of duplicating it. Passing --gate-log or --journal-dir embeds the matching environment variable into the hook command; both paths must be local absolute paths. If neither flag is supplied, durable findings require Codex to already pass CLAUDE_CONSULT_GATE_LOG or CLAUDE_CONSULT_JOURNAL_DIR to hooks.

One-time trust: after setup --install-review-gate, Codex will not run the hook until you approve it once in an interactive Codex session. The trust prompt cannot be granted in headless codex exec. Review and approve the hook through Codex's hook trust flow when prompted. doctor reports [warn] review-gate hook installed but not trusted - run codex interactively once and approve the hook, or it will not fire when it finds the hook installed without a nearby trusted_hash record in ~/.codex/config.toml; it only detects the trust record and does not verify Codex's trust hash.

Evidence debate workflow

Use claude_debate_open for high-impact architecture, migration, or security decisions where a simple second opinion would collapse too much nuance into agree/disagree. Bring a position plus evidence items: file refs such as src/cache.ts:40-60, URLs, captured command output, or reasoning. For file refs, the server extracts neutral snippets from inside workspace_dir and embeds them in the user prompt so both sides argue over the same bytes; out-of-tree, UNC, device, or oversized exhibit reads become unavailable exhibits rather than expanding file access.

Typical two-round sketch:

  1. Open: Codex calls claude_debate_open with the decision, current position, and supporting evidence. Claude returns JSON with claim_verifications, counter_claims, concessions, remaining_disputes, verdict, confidence, and summary_markdown.

  2. Reply: Codex verifies Claude's cited evidence, then calls claude_debate_reply with accept for persuasive rulings and rebut plus new evidence for contested claims. Stop when remaining_disputes is empty or after three rounds; report the per-claim outcome to the user.

Debate tools are deliberately slow and expensive compared with ask_claude; use them for decisions where convergence and claim-by-claim evidence matter.

Deep research depth

claude_review_files and claude_review_diff accept depth: "deep" when the machine owner has set CLAUDE_CONSULT_CAPABILITY=deep-research. Deep mode allows Claude to delegate read-only exploration to sub-agents for large scopes, then synthesize the result itself. It is slower and can use several times the turns of a standard review, so reserve it for broad audits, large directories, and risky changes.

Safety probe statement: before enabling this release, the Agent sub-agent token was verified with real haiku probes on Claude Code CLI 2.1.163 (2026-07-09). Under the previously assumed Task token no sub-agent tool exists at all; under Agent a sub-agent spawned, and every write attempt it made (Write, Bash, PowerShell) was denied by the default permission flow - probe.txt was never created. If your local Claude Code behavior differs, keep CLAUDE_CONSULT_CAPABILITY at the default research.

Model and capability policy

The machine owner sets policy ceilings via environment variables; Codex chooses the model per call within those ceilings and can never exceed them.

Who decides

What

How

Owner only

Capability tier (readonly / research / deep-research)

CLAUDE_CONSULT_CAPABILITY — not exposed as a tool argument, so Codex cannot self-escalate

Owner

Default model (opus out of the box)

CLAUDE_CONSULT_MODEL

Owner

Model ceiling

CLAUDE_CONSULT_ALLOWED_MODELS (a single value locks the model completely)

Codex (within the whitelist)

Per-call model

model tool argument

Owner

Effort ceiling

CLAUDE_CONSULT_MAX_EFFORT (low, medium, high, xhigh, max)

Codex (within the ceiling)

Per-call reasoning depth

effort tool argument

Owner only

Optional budget cap

CLAUDE_CONSULT_MAX_BUDGET_USD

There is no write tier. The default child allowlist is Read, Glob, Grep for readonly; it adds WebSearch and WebFetch for research. By default, Agent is added for deep-research calls that request depth: "deep". The owner-only CLAUDE_CONSULT_ALLOWED_TOOLS can replace the non-deep default with any valid non-forbidden tool tokens. Write, Edit, NotebookEdit, and Bash can never appear in the allowlist, and permission mode is always default. Fable models still default to --effort max, but that default is silently clamped to CLAUDE_CONSULT_MAX_EFFORT when the owner sets a ceiling. An explicit per-call effort above the ceiling is rejected with the allowed levels.

No budget cap is set by default because this package assumes a Claude subscription login with no marginal cost per run. Machines billed through an API key can opt into a spending guard by setting CLAUDE_CONSULT_MAX_BUDGET_USD or running setup --max-budget-usd <n>.

Environment variables (all optional)

Variable

Default

Meaning

CLAUDE_CONSULT_CLAUDE_BIN

auto-detect on PATH

Full path to the claude binary

CLAUDE_CONSULT_TIMEOUT_MS

600000

Per-call timeout (5000..1200000)

CLAUDE_CONSULT_MODEL

opus

Default model; empty string = follow the claude CLI default

CLAUDE_CONSULT_ALLOWED_MODELS

unlimited

Comma-separated model whitelist ceiling

CLAUDE_CONSULT_CAPABILITY

research

readonly, research, or deep-research

CLAUDE_CONSULT_ALLOWED_TOOLS

per tier

Fine-grained tool list override; exact Write, Edit, NotebookEdit, and Bash tokens are rejected

CLAUDE_CONSULT_MAX_BUDGET_USD

unlimited

Owner-level spending guard passed as --max-budget-usd

CLAUDE_CONSULT_MAX_THINKING_TOKENS

unlimited

Injects MAX_THINKING_TOKENS to reduce thinking depth

CLAUDE_CONSULT_MAX_EFFORT

unlimited

Owner-level ceiling for per-call effort; unset means no ceiling

CLAUDE_CONSULT_JOURNAL_DIR

disabled

Local absolute directory for opt-in metadata-only JSONL journal files

CLAUDE_CONSULT_CONTINUITY

enabled when the journal is on

Set to 0 to disable recent-consultation context for fresh advisor runs

CLAUDE_CONSULT_GATE_LOG

disabled

Local absolute file path for durable automatic review-gate findings

CLAUDE_CONSULT_GATE_MODEL

haiku for review-gate

Default model for the review-gate CLI; --model overrides it

CLAUDE_CONSULT_MAX_CONCURRENCY

2

Max parallel claude processes (1..4)

CLAUDE_CONSULT_LOG_LEVEL

info

silent / error / info / debug (stderr only)

setup can persist only --model, --capability, --allowed-models, and --max-budget-usd in the registered server environment: npx -y claude-consult-mcp setup --model sonnet --capability readonly --allowed-models sonnet,haiku --max-budget-usd 1. Configure the other variables directly for the MCP server in ~/.codex/config.toml.

Security notes

  • Read-only by design: the exact Claude Code write/execute tool tokens Write, Edit, NotebookEdit, and Bash are always rejected before the child process is spawned; permission mode is never bypassed.

  • The deep-research tier's default adds only the verified Agent sub-agent token. It does not add Write, Edit, NotebookEdit, or Bash; the forbidden-token sweep remains unconditional.

  • The user prompt travels via stdin and never appears on the command line. System guidance, including the tagged continuity digest, is passed as the single value of --append-system-prompt; stored digest fields are output-encoded before insertion. Dynamic non-prompt argv values (session id, model, paths) are strictly validated.

  • --strict-mcp-config keeps your own MCP servers out of the consult child process.

  • No credentials are stored by this package. The child Claude process uses the machine's existing Claude Code login and inherits the server process environment like a normal child process.

  • The child Claude process inherits the machine's Claude Code user configuration. User-level hooks and plugins, including memory plugins that inject prior context at session start, run inside advisor sessions too and can carry earlier local context into a review. This package neither reads nor controls that plugin context; users who want plugin-free advisor runs should configure those plugins to exclude the relevant workspaces.

  • Diagnostics go to stderr only; stdout is reserved for the MCP protocol.

  • On timeout or shutdown the whole claude process tree is terminated (taskkill on Windows, process-group signals on POSIX) so no orphan processes are left behind.

  • UNC and device paths (\\host\share, \\?\..., //server/share) are rejected before any filesystem access, so a prompt-injected Codex cannot use claude_review_files to force NTLM authentication to a remote host.

File-read scope

claude_review_files grants Claude read access (Read/Glob/Grep) to the paths you pass, so it can read any file the OS user running Codex can read — this is the feature, but it is also its blast radius. Because a prompt-injected Codex could target sensitive paths (~/.ssh, ~/.aws, .env files, browser credential stores), treat the tool's reach as equal to that user account's read permissions. If that is a concern in your environment, run Codex (and therefore this server) under a least-privilege account, and only approve claude_review_files calls whose paths you recognize.

Troubleshooting

Cancelling a tool call in your client also terminates the underlying claude process; nothing keeps running in the background.

Symptom

Fix

[CLAUDE_NOT_FOUND]

Install Claude Code (npm install -g @anthropic-ai/claude-code) or set CLAUDE_CONSULT_CLAUDE_BIN

[CLAUDE_NOT_AUTHENTICATED]

Run claude interactively once on that machine to log in

[SESSION_NOT_FOUND] on claude_continue

Pass the same workspace_dir as the original call — sessions are keyed by working directory

Calls die around 60s

Raise tool_timeout_sec for this server in ~/.codex/config.toml (setup prints the snippet)

[CLAUDE_TIMEOUT]

Raise CLAUDE_CONSULT_TIMEOUT_MS (default 600000)

Server never starts on Windows

The registration must launch cmd /c npx ...; run doctor to detect this, or re-run setup

npx says the command is not recognized right after a release

Windows npx has a brief bin-shim race on freshly published versioned specs; use the bare package name (npx -y claude-consult-mcp) or retry after a minute

Desktop app does not show the tools

Restart the Codex desktop app after changing ~/.codex/config.toml

MCP tool calls fail with user cancelled MCP tool call

Codex 0.144+ requires approval for tools not marked read-only; upgrade claude-consult-mcp to >= 0.9.0 (all tools declare the read-only annotation), or set default_tools_approval_mode = "approve" under [mcp_servers.claude-consult] in ~/.codex/config.toml

claude_consult_history is not listed

Set CLAUDE_CONSULT_JOURNAL_DIR to a local absolute path in the MCP server environment and restart Codex

claude_continuity_status is not listed

Set CLAUDE_CONSULT_JOURNAL_DIR to a local absolute path in the MCP server environment and restart Codex

claude_gate_findings is not listed

Set CLAUDE_CONSULT_GATE_LOG or CLAUDE_CONSULT_JOURNAL_DIR to a local absolute path in the MCP server environment and restart Codex

Review gate findings are not visible in the next turn

Codex does not inject Stop-hook stdout into model context; install with --gate-log <absolute-path> or --journal-dir <absolute-path>, configure the same path for the MCP server, then call claude_gate_findings

Doctor says the review gate hook is not trusted

Run Codex interactively once and approve the hook; doctor detects the trust record but does not verify the hash

Continuity digest never appears

Run doctor inside that project directory - it reports whether the journal, kill switch, current-month entries, and workspace match line up; pass workspace_dir on the tool call and check CLAUDE_CONSULT_CONTINUITY

Remove review gate hook

npx -y claude-consult-mcp setup --remove-review-gate

Uninstall

codex mcp remove claude-consult

Development

npm ci
npm run typecheck
npm run build
npm test                 # unit + protocol + stdio E2E (needs a build)
npm run test:coverage    # 80% gate
CLAUDE_CONSULT_E2E=1 npx vitest run test/integration   # real claude round-trip (costs tokens)

License

MIT

Available Tools

9 tools
ask_claudeAsk ClaudeA

Ask Claude Code (Anthropic's coding agent) for co-analysis, a second perspective, or knowledge you are unsure about. Use it for architecture trade-offs, tricky bugs, unfamiliar APIs, or whenever an independent expert view would help. Claude is advisory only: it reads and researches but never modifies files; you implement any changes yourself. The result ends with a session_id line - pass it to claude_continue (or any other tool here) to keep the same conversation going. If your question is about specific files on disk, prefer claude_review_files. For a structured multi-perspective review in one call, prefer claude_panel.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
contextNoBackground: what you tried, constraints, relevant snippets.
questionYesThe question or problem to analyze. Be specific.
session_idNosession_id from a previous result footer to continue that conversation.
workspace_dirNoAbsolute path to the project this relates to; becomes Claude's working directory. Reuse the same value when continuing a session.

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description fully bears the burden. It clearly states Claude is advisory only (read-only, never modifies files), and that results include a session_id for continuation. This gives a complete behavioral picture.

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?

Single paragraph of 6 sentences, front-loaded with purpose and usage, then behavioral disclosure, then sibling references. Every sentence adds value; no wasted words.

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 5 parameters and no output schema, the description covers all essential aspects: purpose, usage, behavior, parameter hints, and continuation mechanism. It adequately references siblings for alternative scenarios.

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 coverage is 100% with descriptions for all 5 parameters. The description adds value by explaining the purpose of parameters in context (e.g., session_id continues conversation, workspace_dir should be reused). Slightly above baseline due to contextual hints.

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?

Description clearly states the verb ('ask') and resource ('Claude') with specific purposes: co-analysis, second perspective, or knowledge. It distinguishes from siblings by mentioning alternatives like claude_review_files for file-specific questions and claude_panel for structured multi-perspective reviews.

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

Usage Guidelines5/5

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

Explicitly describes when to use: architecture trade-offs, tricky bugs, unfamiliar APIs, or independent expert view. Provides clear exclusions: prefer claude_review_files for file-specific questions and claude_panel for structured multi-perspective reviews.

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

claude_continueContinue Claude SessionA

Continue an existing Claude conversation. Pass the session_id printed at the end of a previous result plus your follow-up message. Use the same workspace_dir as the original call, or the session will not be found. If Claude's answer ends with a 'Questions for you:' section or the JSON contains questions_for_caller, answer those questions with this tool to unblock a better conclusion.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
stanceNoSet to "critical" when continuing an adversarial review or debate so Claude keeps its reviewer discipline instead of drifting agreeable.
messageYesYour follow-up message for the same conversation.
session_idYesThe session_id printed at the end of a previous result.
workspace_dirNoAbsolute path to the project this relates to; becomes Claude's working directory. Reuse the same value when continuing a session.

TDQS

A4.2/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that incorrect workspace_dir causes session not found, and that answering questions unblocks better conclusions. However, does not mention side effects, session lifetime, or what the response looks like. Adequate but not rich.

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?

Three sentences, each provides necessary information without redundancy. Front-loaded with primary purpose, then key constraints, then special use case. No wasted 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?

Handles core usage well: how to continue session and handle questions. No output schema, so description could elaborate on expected return, but for a continuation tool the behavior is fairly straightforward. Misses guidance on session persistence or error cases beyond workspace mismatch.

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 coverage is 100% with descriptions, so baseline 3. Description adds context: explains the relationship between session_id and workspace_dir, and the purpose of answering questions. For model and stance, it doesn't elaborate beyond schema, but overall adds value.

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?

Clearly states it continues an existing Claude conversation, distinguishing it from siblings like ask_claude (starts new), claude_debate_* (debates), and claude_review_* (reviews). The verb 'continue' plus resource 'session' is specific.

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?

Provides explicit when-to-use: when you have a session_id and follow-up message. Mentions workspace_dir must match original, otherwise session not found. Also advises using this tool to answer questions from previous response. Lacks explicit 'do not use if' scenarios but is clear enough.

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

claude_debate_openClaude Debate OpenA

Open a structured, evidence-based debate with Claude about a significant decision. Bring your position and your evidence (file references, URLs, command outputs). Claude will independently verify every verifiable item - reading the files and fetching the URLs itself - then return per-claim rulings and counter-claims with its own evidence. Expensive and slow (an agentic verification run); use it for architecture decisions, risky changes, and security-sensitive work, not routine questions. Continue rounds with claude_debate_reply. Claude only advises; it never modifies anything. Check the result footer's format field before parsing: format: json means the body is the requested JSON document; format: prose means Claude answered in prose instead - read it directly or retry with a stronger model rather than calling JSON.parse blindly.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
topicYesThe decision or claim to debate.
evidenceYesEvidence items supporting your position.
positionYesYour current position or recommendation.
workspace_dirYesAbsolute path to the project this debate is about; becomes Claude's working directory.

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that Claude independently verifies verifiable items, returns per-claim rulings and counter-claims, never modifies anything, and includes a specific note about the result footer's format field. Minor omissions: no mention of authentication needs or rate limits, but overall transparent.

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

Conciseness4/5

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

The description is fairly long but information-dense. It front-loads the primary purpose and then provides necessary details. Every sentence adds value, though some minor trimming could be done. No wasted words.

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?

For a complex tool with no output schema and multiple parameters, the description is remarkably complete. It explains the debate flow, evidence submission, verification process, output parsing instructions, and cost considerations. It covers all essential aspects for an agent to use the tool correctly.

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 coverage is 100%, so baseline is 3. The description adds value by explaining the purpose of each parameter in context (e.g., 'workspace_dir' becomes Claude's working directory) and elaborates on the evidence items (types, claim, ref). It does not repeat schema details but augments them.

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's purpose: 'Open a structured, evidence-based debate with Claude about a significant decision.' It specifies the action (open a debate), the resource (Claude), and the context (evidence-based). It distinguishes from siblings by mentioning 'claude_debate_reply' for continuation.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'architecture decisions, risky changes, and security-sensitive work, not routine questions.' It also notes that it is 'Expensive and slow' and directs users to 'Continue rounds with claude_debate_reply.'

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

claude_debate_replyClaude Debate ReplyA

Continue an open evidence debate. For each of Claude's counter-claims or rulings, either accept it (name it) or rebut it with an argument and new evidence. You are expected to have verified Claude's cited evidence yourself before rebutting. Rounds should converge: stop when remaining_disputes is empty or after three rounds, and report the per-claim outcome to the user. Check the result footer's format field before parsing: format: json means the body is the requested JSON document; format: prose means Claude answered in prose instead - read it directly or retry with a stronger model rather than calling JSON.parse blindly.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
responsesYesAccept or rebut Claude's prior claims.
session_idYessession_id from claude_debate_open or the previous debate round.
workspace_dirYesAbsolute path to the same project used by the open debate call.

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: verification of evidence before rebutting, convergence criteria, and handling of result format (json vs prose). This goes beyond basic expectations and aids correct invocation.

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

Conciseness4/5

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

The description is well-structured, front-loading the core action and then providing step-by-step guidelines and a warning. Every sentence is informative without being verbose, earning its place.

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 complexity (multiple response actions, convergence logic, format handling) and no output schema, the description covers most necessary aspects. Minor gaps exist (e.g., error handling, structure of remaining_disputes), but overall it provides sufficient context for an agent to use the tool correctly.

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 coverage is 100%, providing descriptions for each parameter. The description adds workflow context (e.g., 'session_id from claude_debate_open or the previous debate round') and clarifies usage of the responses parameter ('Accept or rebut Claude's prior claims.'), enhancing understanding beyond the schema alone.

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 'Continue an open evidence debate' using a specific verb and resource. It distinguishes from siblings like claude_debate_open (which starts a debate) by focusing on continuation and accept/rebut actions.

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 provides explicit guidance on when to use the tool (to accept or rebut counter-claims) and includes convergence rules (stop when remaining_disputes empty or after three rounds). It does not list exclusions or alternative tools, but the context is clear given the sibling tools.

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

claude_panelClaude PanelA

Run a multi-perspective Claude review panel in ONE call: several independent Claude analyses of the same task, each through a different expert lens (correctness, security, performance, simplicity, architecture, testing), returned as one aggregated report. Use this when the user asks for verification or review from multiple perspectives or with sub-agents - Claude acts as an independent cross-model panel alongside your own work. Each perspective is a separate full Claude run, so usage and latency scale with the number of perspectives (they run concurrently). Provide absolute paths when the panel should read code from disk. Claude only advises; it never modifies files.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYesWhat the panel should analyze.
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
pathsNoAbsolute paths of files or directories every panelist should read (1-32).
contextNoBackground context for every panelist.
perspectivesNoFixed expert lenses to run, defaulting to correctness, security, and simplicity.
workspace_dirNoAbsolute path to the project this relates to; becomes Claude's working directory. Reuse the same value when continuing a session.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description effectively explains behavioral traits: each perspective is a separate full Claude run, concurrency, latency scaling, and non-modification guarantee. It could add error handling or edge cases but is sufficient for safe usage.

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, well-structured paragraph. It front-loads the main purpose, then adds essential behavioral and usage details without redundancy. Every sentence earns its place.

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 complexity (6 parameters, no output schema, no annotations), the description covers most critical aspects: operation, concurrency, file reading, non-modification. It lacks information about the returned report format, but this is minor.

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 each parameter having a clear description. The tool description reinforces the 'paths' instruction but does not add substantial new meaning beyond the schema. Baseline 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 explicitly states the tool's purpose: 'Run a multi-perspective Claude review panel in ONE call' detailing how it aggregates multiple expert analyses. It distinguishes from sibling tools like ask_claude and claude_second_opinion by emphasizing the multi-perspective aspect.

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 clearly specifies when to use: 'when the user asks for verification or review from multiple perspectives or with sub-agents'. It also notes that Claude 'only advises, never modifies files' and instructs to 'provide absolute paths when the panel should read code from disk'. However, it lacks explicit mention of when not to use or direct references to alternatives.

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

claude_review_diffClaude Review DiffA

Have Claude review your actual code changes: the server runs read-only git in the given repository and gives Claude the diff plus read access to the surrounding files. Pass the repository root as workspace_dir. By default it reviews uncommitted changes against HEAD; pass base (a branch, tag, or commit) to review everything since that ref (base...HEAD). Use it after implementing something to get an independent cross-model review of the change itself. Claude only advises; it never modifies anything. For reviewing files without git context, use claude_review_files.

ParametersJSON Schema
NameRequiredDescriptionDefault
baseNoBranch, tag, or commit to compare as base...HEAD. Omit to review uncommitted changes against HEAD.
depthNodeep lets Claude delegate read-only exploration to sub-agents for large scopes - slower and several times the usage; requires the machine to enable CLAUDE_CONSULT_CAPABILITY=deep-research.
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
questionNoOptional focus for the diff review.
session_idNosession_id from a previous result footer to continue that conversation.
workspace_dirYesRepository root to inspect with read-only git commands.

TDQS

A4.3/5.0
Behavior4/5

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

Given no annotations, the description carries full burden. It clearly states that the tool runs read-only git commands and that Claude never modifies anything. It also discloses behavioral traits such as the 'deep' depth mode being slower and higher usage. However, it does not mention error handling or performance limits.

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 concise and well-structured, front-loading the primary purpose and then elaborating on key parameters and usage context. Every sentence adds value, with no redundancy.

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?

While the description covers usage well and mentions the result footer for session continuation, it does not explicitly describe the output format (e.g., what the review looks like) since no output schema exists. A bit more detail on the output would improve completeness.

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%, so baseline is 3. The description adds context about default behavior and the purpose of the 'base' parameter, but does not significantly enhance understanding beyond what the schema already provides for each parameter.

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's purpose: reviewing actual code changes via read-only git operations. It specifies the verb 'review', the resource 'code changes', and distinguishes from the sibling tool 'claude_review_files' by noting that this tool requires git context.

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

Usage Guidelines5/5

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

Explicitly mentions when to use ('after implementing something'), explains default behavior (review uncommitted changes against HEAD), describes how to use the 'base' parameter for comparing against a ref, and recommends an alternative tool for non-git reviews. Also states that Claude only advises and never modifies anything.

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

claude_review_filesClaude Review FilesA

Have Claude read and analyze specific files or directories agentically (read-only: it can Read, Glob, and Grep within the granted paths, and research the web, but never modifies anything). Provide ABSOLUTE paths that exist on this machine and a focused question, e.g. 'find the race condition in this module' or 'review these files for injection vulnerabilities'. Better than pasting file contents into ask_claude for anything larger than a snippet. For verification workflows, this gives Claude an independent read of the code so its review does not depend on your summary.

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNodeep lets Claude delegate read-only exploration to sub-agents for large scopes - slower and several times the usage; requires the machine to enable CLAUDE_CONSULT_CAPABILITY=deep-research.
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
pathsYesAbsolute paths of files or directories to analyze (1-32). Every path must exist on this machine.
questionYesWhat to look for or evaluate in these paths.
session_idNosession_id from a previous result footer to continue that conversation.
workspace_dirNoAbsolute path to the project this relates to; becomes Claude's working directory. Reuse the same value when continuing a session.

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries full burden. It explicitly states read-only behavior: 'read-only: it can Read, Glob, and Grep within the granted paths, and research the web, but never modifies anything'. It also explains the depth parameter's delegation behavior. This fully discloses behavioral traits.

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 four sentences, each earning its place: first sentence states purpose and read-only nature, second gives requirements, third compares to sibling, fourth gives use case. Front-loaded with key information, no filler.

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 6 parameters (2 required), no output schema, and no annotations, the description covers purpose, usage, behavioral constraints, parameter details, and examples. It addresses the tool's complexity adequately, providing enough context for an AI agent to select and invoke correctly.

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

Parameters5/5

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

Schema description coverage is 100%, so baseline is 3. The description adds substantial meaning beyond the schema: explains 'depth' effect, 'model' override, requires 'absolute paths that exist', gives example question, and explains 'session_id' and 'workspace_dir' for continuing conversations. It enriches parameter understanding significantly.

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's purpose: 'Have Claude read and analyze specific files or directories agentically'. It specifies the verb (read and analyze) and resource (files/directories), and distinguishes from sibling tool ask_claude by noting it's better for larger scopes and verification workflows.

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 provides explicit context for when to use: 'Better than pasting file contents into ask_claude for anything larger than a snippet' and 'For verification workflows, this gives Claude an independent read'. It implies when not to use (small snippets) by contrasting with ask_claude. No explicit when-not list, but adequate guidance.

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

claude_second_opinionClaude Second OpinionA

Get an adversarial review of YOUR OWN analysis, plan, or conclusion before committing to it. Claude is explicitly instructed to hunt for flaws, wrong assumptions, missed edge cases, and simpler alternatives rather than agree. Use before risky changes, migrations, security-sensitive edits, or when your confidence is low. Provide the problem and your full reasoning - the more you show, the better the critique. Claude only critiques; it never modifies files. When you are asked to verify or review with sub-agents or multiple perspectives, include this tool as the independent cross-model reviewer alongside your own sub-agents; treat disagreements as high-signal. When the result footer reports format: json, the result body is a JSON document with fields verdict (agree|partial|disagree), confidence (0-1), claim_verifications (each caller claim labeled verified|refuted|cannot_verify with evidence), flaws, missed_considerations, suggested_changes, and summary_markdown. Check the result footer's format field before parsing: format: json means the body is the requested JSON document; format: prose means Claude answered in prose instead - read it directly or retry with a stronger model rather than calling JSON.parse blindly.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoClaude model override: opus, sonnet, haiku, or a full model id. Omit for the configured default.
problemYesNeutral statement of the problem or task being solved.
analysisYesYour analysis, conclusion, or plan to be critiqued - include the reasoning, not just the answer.
session_idNosession_id from a previous result footer to continue that conversation.
workspace_dirNoAbsolute path to the project this relates to; becomes Claude's working directory. Reuse the same value when continuing a session.

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: Claude is instructed to find flaws, assumptions, missed edge cases; it never modifies files; it explains the result format (JSON vs prose) and how to parse the footer. No contradictions.

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

Conciseness4/5

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

The description is comprehensive but slightly lengthy; however, every sentence provides essential information (purpose, usage, result format). It is well front-loaded with the core function and structured logically. Could be marginally trimmed but is effective.

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 complexity (5 parameters, no output schema), the description covers all necessary aspects: how to invoke, what to expect in return, how to handle different result formats, and even how to continue sessions. It prepares the agent for both JSON and prose responses, ensuring complete usability.

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 description coverage is 100%, so the schema already documents each parameter. The description adds value by explaining the adversarial purpose, the importance of providing full reasoning, and how session_id/workspace_dir are used for continuity. This extra context elevates it above baseline 3.

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 provides an adversarial review of the user's own analysis, explicitly distinguishing it from siblings like ask_claude and claude_debate_open by emphasizing it hunts for flaws rather than agrees. It also specifies it never modifies files, reinforcing its unique role.

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

Usage Guidelines5/5

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

Explicit guidance on when to use (risky changes, migrations, security-sensitive edits, low confidence) and how to integrate with sub-agents. It contrasts with other tools by positioning itself as an independent cross-model reviewer, and explains when to treat disagreements as high-signal.

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

claude_sessionsClaude SessionsA

List recent Claude conversations this server has run, newest first, with each conversation's session_id, originating tool, workspace_dir, and topic excerpt. Use it when you lost a session_id or want to continue earlier work: pick the session and resume it with claude_continue (same workspace_dir). The ledger is in-memory and resets when the MCP server restarts.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum sessions to list, defaulting to 10.
workspace_dirNoOptional exact workspace_dir filter.

TDQS

A4.7/5.0
Behavior5/5

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

Discloses a key behavioral trait: the ledger is in-memory and resets on server restart, which is critical for understanding session persistence. With no annotations provided, the description carries the full burden and delivers clear, honest behavior beyond the basic listing function.

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: first explains output and ordering, second provides usage guidance and a behavioral note. No wasted words, front-loaded with core functionality.

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 (2 optional params, no output schema, no annotations), the description covers purpose, output fields, usage context with sibling tools, and the transient in-memory nature. Complete for effective agent invocation.

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%, so baseline is 3. The description adds no new meaning to the parameters beyond what the schema already provides (e.g., limit defaults to 10, workspace_dir is an optional filter). No extra context on parameter usage or constraints.

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 lists recent Claude conversations with specific fields (session_id, originating tool, workspace_dir, topic excerpt) and orders them newest first. It distinguishes itself from sibling tools like claude_continue and ask_claude by focusing on listing existing sessions.

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

Usage Guidelines5/5

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

Explicitly tells when to use: when you lost a session_id or want to continue earlier work. Also provides guidance on next steps: pick the session and resume with claude_continue using the same workspace_dir. This contrasts with starting new sessions via ask_claude.

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.

  1. 9 tool updatesv0.6.0
    • First observedask_claude
    • First observedclaude_continue
    • First observedclaude_debate_open
    • First observedclaude_debate_reply
    • First observedclaude_panel
    • First observedclaude_review_diff
    • First observedclaude_review_files
    • First observedclaude_second_opinion
    • First observedclaude_sessions

TDQS

A4.6/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a distinct interaction mode with Claude: general questions, continuing conversations, structured debates, multi-perspective panels, diff and file reviews, adversarial opinions, and session management. Overlap is minimal and clearly delineated by descriptions.

Naming Consistency5/5

All tools follow a consistent 'claude_verb_noun' pattern in snake_case (e.g., ask_claude, claude_debate_open, claude_review_files). No mix of styles or ambiguous verbs.

Tool Count5/5

With 9 tools covering diverse consultation workflows (Q&A, debates, reviews, session management), the count is well-scoped for a consultant MCP. Each tool serves a clear purpose without redundancy.

Completeness5/5

The tool surface covers the full lifecycle of Claude interaction: starting conversations, continuing them, debating, requesting panel reviews, reviewing code changes or files, getting adversarial critiques, and managing sessions. No obvious gaps for the stated purpose.

Maintenance

ActivityStale
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