MCP Hub
Back to servers

opencode-cli-mcp

Wraps opencode CLI's HTTP API into MCP tools for agent run, session management, and server status, plus a fleet webapp dashboard.

glama
Updated
May 1, 2026

opencode-cli-mcp

MCP server that wraps opencode CLI's HTTP API (opencode serve) into MCP tools, plus a SOTA fleet webapp dashboard.

Architecture

Clients (MCP hosts)  →  opencode-cli-mcp (FastMCP 3.2)
                             ↕ HTTP
                         opencode serve (port 4096)
  • MCP Server (stdio): Exposes 9 tools for agent run, session management, and server status
  • FastAPI Bridge (port 10951): REST API for the webapp + capability introspection
  • Vite Webapp (port 10950): SOTA fleet-standard dashboard

Prerequisites

  • opencodenpm i -g opencode-ai
  • Python 3.12+ with uv
  • Node.js 18+ with npm

Quick Start

.\start.ps1

This starts opencode serve, the API backend, and the webapp frontend.

Or run individually:

uv run -m opencode_cli_mcp.server    # MCP server (stdio)
uv run -m api.main                   # API backend (port 10951)
cd web_sota && npm run dev           # Frontend (port 10950)

MCP Tools

ToolDescription
opencode_run_agentRun an agent non-interactively with a prompt
opencode_list_sessionsList all active/recent sessions
opencode_get_sessionGet detailed session info
opencode_export_sessionExport session as JSON
opencode_send_messageSend message to a running session
opencode_get_messagesRetrieve session transcript
opencode_server_statusCheck server health and status
opencode_list_providersList configured LLM providers
opencode_get_projectGet current project context

Ports

PortService
10950Frontend (Vite)
10951Backend (FastAPI)
4096opencode serve

License

MIT

Reviews

No reviews yet

Sign in to write a review