OpenCode Advisor MCP
The OpenCode Advisor MCP server provides a single tool (ask_opencode_advisor) to request a read-only second-opinion code review of Git changes from a local OpenCode advisor agent.
What you can do:
Request a code review of current Git changes (diff and/or status)
Ask a specific question (
question) to focus the advisor on particular concerns (e.g., risks, missing tests, privacy issues)Provide a high-level goal (
goal) to give the advisor context about what the changes aim to achieveScope the review to a specific working directory (
cwd) or particular file paths (paths)Compare against a specific base ref (
base_ref) to control which Git diff is reviewedInclude or exclude the Git diff (
include_diff) or status (include_status) from the review contextLimit diff size (
max_diff_chars) to control how much diff content is sent to the advisorReceive structured JSON responses with stable error codes (e.g.,
invalid_cwd,git_failed,timeout) for predictable error handling
The advisor operates in read-only mode — the bundled template is designed to block writes and deny .env reads.
Allows Codex (OpenAI's coding assistant) to request a review of Git changes from an OpenCode advisor, focusing on risks, tests, privacy, and release readiness.
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., "@OpenCode Advisor MCPReview the current git diff for potential bugs and security issues."
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.
OpenCode Advisor MCP
OpenCode Advisor MCP is an unofficial local MCP server that lets Codex ask a read-only OpenCode advisor for a second review pass on Git changes.
This project is for people who already use Codex and OpenCode locally and want a second review tool in the loop without giving that reviewer write access.
Project Status
Latest tagged GitHub release:
v0.2.0mainincludes unreleased stabilization changes afterv0.2.0Current scope: one MCP tool,
ask_opencode_advisorSupported mode: source/GitHub install with a local OpenCode agent template
npm package publication is planned for a future release and is not available yet
Related MCP server: codex-claude-bridge
Unofficial Compatibility Notice
This is an unofficial community project. It is not affiliated with, endorsed by, or sponsored by OpenAI, Codex, OpenCode, or the maintainers of those products. "Codex" and "OpenCode" are referenced only for compatibility and integration context.
Responsible Use
Use this tool only on repositories and diffs you are authorized to inspect and disclose.
Important boundaries:
The tool sends Git status, Git diff context, your question, and working-directory context to your configured OpenCode runtime.
Depending on your OpenCode configuration, that runtime may use a remote model provider. Do not assume this means "nothing ever leaves the machine."
The included advisor template blocks writes and denies
.envreads, but that is not a complete confidentiality guarantee.Keep
OPENCODE_ADVISOR_ALLOWED_ROOTSnarrow. Do not point it at broad parent directories unless you deliberately want that scope.
Who It Is For
People already running Codex locally
People already running OpenCode locally
Repositories where a second review pass is useful
Teams that want a read-only reviewer template with explicit install steps
What It Is Not For
Reviewing code you are not allowed to disclose
Handling secrets or sensitive repositories by default
Acting as an autonomous coding agent
Replacing your normal review process or judgment
Install From Source
Clone the repository, then install and verify dependencies:
git clone https://github.com/henrydontbbai/opencode-advisor-mcp.git
cd opencode-advisor-mcp
npm install
npm run smoke
npm testCopy the bundled advisor template into your OpenCode agents directory:
New-Item -ItemType Directory -Force -Path <agent-dir>
Copy-Item -LiteralPath ".\agents\codex-advisor.md" -Destination "<agent-dir>\codex-advisor.md" -ForceAdd this MCP config to Codex:
[mcp_servers.opencode_advisor]
command = "node"
args = ["<repo-root>\\src\\server.mjs"]
startup_timeout_sec = 30
tool_timeout_sec = 180
[mcp_servers.opencode_advisor.env]
OPENCODE_ADVISOR_ALLOWED_ROOTS = "<allowed-root-or-semicolon-list>"
OPENCODE_ADVISOR_TIMEOUT_MS = "120000"
OPENCODE_ADVISOR_MAX_DIFF_CHARS = "60000"Replace <repo-root> with the absolute path to this source checkout.
npm Package Status
The package metadata and CLI entrypoints are present for packaging checks, but opencode-advisor-mcp has not been published to npm yet. Use the source install path above for now.
Usage
Codex gets one MCP tool:
ask_opencode_advisorTypical prompt:
Ask opencode_advisor to review the current changes.
Focus on risks, missing tests, privacy issues, and release readiness.The server returns structured JSON with stable error codes such as invalid_cwd, invalid_paths, git_failed, opencode_not_found, opencode_failed, and timeout.
Local Verification
From the repository:
npm install
npm run smoke
npm testRelease and acceptance steps live in:
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
- 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/henrydontbbai/opencode-advisor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server