opencode-cli-mcp
CLAUDE.md3 starsChanged 2 months agoMITView on GitHub
MCP server that wraps opencode's opencode serve HTTP API into MCP tools, with a SOTA fleet webapp dashboard. Dashboard, Sessions, Projects, Tools Hub, OC Tools, Apps Hub, Chat, Help, Settings, Status Audit, API Docs
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms-full.txtllms.txt
- llms.txtllms.txt
- session-startSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Run MCP server: uv run -m opencode_cli_mcp.server
- Very specific: line 9
Run webapp backend: uv run python -m api.main
- Very specific: line 10
Run webapp frontend: cd web_sota && npm run dev
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
opencode-cli-mcp
MCP server that wraps opencode's opencode serve HTTP API into MCP tools, with a SOTA fleet webapp dashboard.
Build & Test
- Install:
uv sync - Run MCP server:
uv run -m opencode_cli_mcp.server - Run webapp backend:
uv run python -m api.main - Run webapp frontend:
cd web_sota && npm run dev - Start all:
.\start.ps1 - Lint:
uv run ruff check . - Test:
uv run pytest - TypeScript check:
cd web_sota && npx tsc --noEmit
Architecture
- MCP server talks to
opencode serveHTTP API (default http://127.0.0.1:4097) - Webapp backend (FastAPI, port 10951) bridges MCP tools to REST
- Webapp frontend (Vite, port 10950) proxies /api to backend
- Tools in
src/opencode_cli_mcp/tools/: sessions, runs, agent, status - Shared tool registry in
src/opencode_cli_mcp/registry.py ensure_server()is wired into all session/status tools- OpenCode custom tools in
.opencode/tools/- TS definitions calling backend API - Docs served via
GET /api/docs, tool source viaGET /api/opencode-tools - Ports: 10950 frontend / 10951 backend / 4097 opencode
Key Patterns
opencode_run_agent(prompt, wait=false)launches background agentopencode_get_run_status(job_id)polls for completionopencode_session_diff(session_id)reviews changesopencode_cancel_run(job_id)kills stuck agent
API Routes
| Prefix | Purpose |
/api/capabilities | Health + runtime introspection |
/api/opencode/* | Proxy to opencode serve |
/api/runs/* | Agent run tracking |
/api/tools | Tool definitions |
/api/fleet | Fleet app status |
/api/system | OS/GPU/memory info |
/api/docs/* | Documentation serving |
/api/opencode-tools/* | OpenCode custom tool definitions |
/api/settings | App settings CRUD |
Webapp Pages (11)
Dashboard, Sessions, Projects, Tools Hub, OC Tools, Apps Hub, Chat, Help, Settings, Status Audit, API Docs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

