codex-advisor
Click on "Install 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., "@codex-advisoradvisor, can you review my latest commit?"
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.
codex-advisor
OpenAI Codex CLI に Claude Code の advisor 相当の「セカンドオピニオン」を追加する 個人用 MCP サーバー。既定では、ChatGPT でログイン済みの Codex CLI を介して GPT を利用する。Codex CLI の ChatGPT認証またはAPIキー認証、OpenAI API・Claude・Gemini、および OpenAI 互換エンドポイントの任意モデルにも切り替えられる。
公開範囲と利用条件
このリポジトリは公開準備中の実験的な個人用ツールです。公開しても、現時点で マルチユーザー対応、互換性の保証、運用サポート SLA は提供しません。
ライセンス: この個人開発ではライセンスを付与していません。リポジトリには
LICENSE ファイルを含めていません。
Related MCP server: LLM Council MCP
セットアップ
前提: Python 3.12以上、uv、Codex CLI 0.144.1以上。codex/ providerは
既定でChatGPTログインを使う。
bash install.sh # advisor.toml / advisor.env 作成 + MCP 登録 + AGENTS.md 誘導
codex login status # ChatGPT認証を使う場合に確認
vi ~/.codex/advisor.env # API provider または Codex API認証で使うキーを記入install.sh は既存の advisor.toml を上書きしない。旧版から移行する場合は、
下記の model を手動で変更する。
使い方
Codex が計画前・エラー反復時・完了宣言前に自動で
consult_advisorを呼ぶ手動相談: 「advisor に相談して」
ChatGPT認証のGPT:
model = "codex/gpt-5.6-sol"(既定)Codex APIキーのGPT:
model = "codex/gpt-5.6-sol"に加えて、下記の[providers.codex]を設定OpenAI API:
model = "openai/<Chat Completions 対応モデル ID>"モデル切替: 「advisor を codex/gpt-5.6-sol にして」(または
~/.codex/advisor.tomlのmodel =を編集)無効化: 「advisor を off にして」または
advisor.tomlでenabled = false
codex/ と openai/ は同居できる。codex/ は隔離した Codex CLI 経由で、認証方式を
chatgpt(既定)または api から明示的に選ぶ。openai/ は直接HTTP呼び出しで
OPENAI_API_KEY を使う。1回の相談では model が示す一方だけを使い、認証失敗時に
別の認証方式や openai/ へ自動フォールバックしない。
設定 (~/.codex/advisor.toml)
enabled = true
model = "codex/gpt-5.6-sol" # "<provider>/<model>"。モデル名は無検証
max_context_chars = 400000 # advisor に渡す会話の上限(古い方から切り詰め)
max_consults_per_session = 20 # セッションあたり相談回数上限
reasoning = "medium" # 任意: low/medium/high/xhigh。デフォルトは medium。reasoning = "" でプロバイダ既定に戻せる
# Codex CLI のAPIキー認証を使う場合だけ指定(ChatGPT認証が既定)
[providers.codex]
auth_method = "api" # chatgpt または api
api_key_env = "OPENAI_API_KEY" # 省略時はCodex CLI保存済み認証を使う
# OpenAI 互換エンドポイントの追加例(OpenRouter / ollama など)
[providers.openrouter]
kind = "openai"
base_url = "https://openrouter.ai/api/v1"
api_key_env = "OPENROUTER_API_KEY"advisor.toml は相談ごとに読み直すため、モデル切替にMCP再起動は不要。
advisor.env はMCP起動時にだけ読むため、APIキーの追加・変更後はCodexセッションを
再起動する。
xhigh は codex/ と openai/ providerで利用できる。選択モデルが非対応の場合は
下流のCodex CLIまたはAPIがエラーを返し、値を自動変更しない。Anthropic/Geminiでは
意味の異なる値へ推測変換せず、相談実行前に明示的な非対応エラーを返す。
セキュリティ
API キーは ~/.codex/advisor.env のみに置く。ChatGPT認証の codex/ 子プロセスには
advisor用credentialを渡さない。API認証の codex/ では、設定した api_key_env の
値だけを子プロセス用の CODEX_API_KEY として渡し、それ以外のcredentialは除去する。
環境変数を指定しない場合は、Codex CLIの codex login --with-api-key で保存した認証を使う。
api_key_env を指定した場合、その変数が未設定なら保存済み認証へ切り替えずエラーにする。
子Codexは
一時directory、read-only sandbox、ephemeral sessionで実行し、shell・Web・MCP・
app・subagent等を無効化する。APIエラーに含まれる選択providerのキー値は伏せ字化する。
データ送信: consult_advisor は、現在のセッションから復元した user/assistant メッセージ、
tool call、tool result を、設定された advisor provider に送信します。codex/ では
ログイン中のChatGPT workspace、API providerでは各APIアカウントのデータ処理条件が
適用されます。transcript の秘密情報は自動除去されません。
開発
uv run pytest -q # テスト
uv run ruff check src tests && uv run pyright # lint+型Available Tools
2 toolsadvisor_configA
Get or change advisor settings. Use when the user asks.
action='get' shows current settings. action='set' changes the advisor model; pass model as '/', e.g. 'codex/gpt-5.6-sol', 'openai/gpt-5.2', 'anthropic/claude-opus-4-8', 'gemini/gemini-2.5-pro'. Any model name is accepted (no allowlist). action='off' disables consultations.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| action | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It clearly discloses the three supported actions, the exact model format with examples, and the notable fact that any model is accepted with no allowlist. It does not detail persistence or side effects of 'set'/'off', but the core behavior is transparent and useful.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded, but the sentence 'Use when the user asks' is vague filler that doesn't earn its place. The inline examples, while long, are valuable for establishing the model format. Overall it remains appropriately concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (multiple actions, a model parameter with format requirements) and the presence of an output schema, the description covers the essential usage points well. It could be more complete by explicitly referencing the sibling tool's role, but nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description fully compensates. It explains the valid values for 'action', the required model format for 'set', and that the model parameter is needed only in that case, plus examples of acceptable formats. This adds substantial meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: 'Get or change advisor settings,' which clearly identifies the tool's domain. It further details distinct actions ('get', 'set', 'off') and confirms this is about configuration, which distinguishes it from the sibling 'consult_advisor' without being explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Use when the user asks' is generic and provides no concrete decision guidance. The action descriptions imply usage (get vs. set vs. off), but the tool never explicitly contrasts itself with the sibling 'consult_advisor' or states when not to use it, leaving the comparison to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
consult_advisorA
Consult the configured advisor model for strategic guidance.
Call this at decision points: before committing to a non-trivial plan,
when the same error persists after two fix attempts, or before declaring
a complex task complete. The current session transcript is attached
automatically; put the specific decision to evaluate in question.
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | ||
| context_hint | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavior. It adds a key behavioral detail: 'The current session transcript is attached automatically,' which clarifies input handling. However, it does not disclose the output format, potential side effects, or any restrictions, leaving the safety profile somewhat opaque.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, with the core purpose in the first sentence. The subsequent usage guidance adds valuable, non-redundant detail without wasting words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple, has an output schema to cover return values, and the description provides purpose, usage triggers, and a key behavioral trait. It is slightly incomplete due to the undocumented 'context_hint' parameter, but overall it is sufficiently complete for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains the 'question' parameter well ('put the specific decision to evaluate in question'), but the optional 'context_hint' parameter is not mentioned at all, leaving a gap for the second parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Consult the configured advisor model for strategic guidance.' It uses a specific verb and resource, and distinguishes itself from the sibling 'advisor_config' by focusing on querying the advisor rather than configuring it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly lists when to call the tool: at decision points, after repeated errors, or before declaring a complex task complete. It provides clear context but does not mention when not to use it or name alternative tools, so it stops short of a full 5.
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.
2 tool updates
v0.2.0- First observed
advisor_config - First observed
consult_advisor
TDQS
The two tools are completely distinct: one performs a consultation, the other manages configuration. No overlap or ambiguity exists between them.
Tool names use different patterns: 'consult_advisor' follows verb_noun, while 'advisor_config' is noun_noun. The inconsistency is noticeable but both names are clear and self-explanatory.
With only 2 tools, the set feels thin but is appropriate for the narrow scope of advisor consultation and configuration. It covers the essential actions without unnecessary bloat.
The domain of consulting and configuring an advisor is well-covered. A minor gap is the lack of consultation history or logging, but for the stated purpose (strategic guidance and settings) the surface is essentially complete.
Maintenance
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
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Related MCP Servers
- AlicenseAqualityCmaintenanceBridges Claude and OpenAI's Codex CLI for AI-powered code analysis, generation, and review, with support for session management, web search, and structured output.6765628ISC

LLM Council MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables Claude Code to consult external LLMs (GPT, Gemini) through multi-turn sessions for second opinions, parallel consultations, and web-grounded research.MIT- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to query ChatGPT for second opinions and compare responses between models.17MIT
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/tonny-lec/codex-advisor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server