OpenCode MCP 서버를 통해 모든 MCP 클라이언트에게 OpenCode의 힘을 부여하세요.
요약
OpenCode MCP 서버(opencode-mcp)는 다양한 AI 도구(Claude, Cursor, VS Code Copilot 등)가 OpenCode의 강력한 기능을 활용할 수 있도록 연결하는 핵심 브릿지 역할을 합니다. 이 서버를 통해 AI 에이전트는 프로젝트 내에서 코드를 읽고, 쓰고, 실행하며 자율적으로 복잡한 코딩 작업을 위임받아 수행할 수 있습니다. 사용자는 별도의 설정 없이 자동 시작되는 이 서버를 통해 병렬 작업 처리 및 다양한 워크플로우 도구(79개)를 활용하여 AI의 개발 역량을 극대화할 수 있습니다.
핵심 포인트
- **AI 코딩 작업 위임:** Claude 같은 주요 AI 모델에게 'REST API 생성'과 같은 작업을 지시하면, OpenCode가 파일 생성, 패키지 설치, 테스트 작성까지 자율적으로 처리합니다.
- **광범위한 호환성:** Claude Desktop, Cursor, VS Code Copilot 등 모든 MCP(Multi-Client Protocol) 호환 도구와 쉽게 통합됩니다.
- **자동화된 워크플로우:** 서버는 자동으로 시작되며, 79개의 전문적인 도구를 통해 복잡한 개발 패턴을 단일 호출로 처리할 수 있습니다.
- **병렬 및 비동기 작업 지원:** 여러 작업을 동시에 실행하거나(opencode_fire), 장시간이 필요한 작업을 백그라운드에서 폴링하며 관리할 수 있습니다.
OpenCode의 힘을 모든 MCP 클라이언트에 부여하세요.
opencode-mcp 는 AI 도구 (Claude, Cursor, Windsurf, VS Code 등) 를 OpenCode 의 headless API 로 연결하는 MCP 서버입니다. 이를 통해 AI 가 프로젝트 내에서 코드를 읽기, 쓰기, 실행하며 자율적으로 작업을 수행하는 OpenCode 세션에 실제 코딩 작업을 위임할 수 있습니다.
79 tools | 10 resources | 6 prompts | Multi-project | Auto-start
코딩 작업 위임— Claude 에 "REST API 를 만들어주세요"라고 지시하면 OpenCode 로 위임되며, 파일 생성, 패키지 설치, 테스트 작성 및 보고를 수행합니다.병렬 작업— 주요 AI 가 다른 작업을 수행하는 동안 여러 작업을 OpenCode 에 동시에 실행합니다.어떤 MCP 클라이언트든— Claude Desktop, Claude Code, Cursor, Windsurf, VS Code Copilot, Cline, Continue, Zed, Amazon Q 및 기타 모든 MCP 호환 도구와 호환됩니다.설정 없음— 서버는 opencode serve를 자동으로 시작합니다.
이미 실행 중이 아닌 경우에만 자동 시작됩니다. 수동 단계가 없습니다.
필수 조건: OpenCode 가 설치되어 있어야 합니다.curl -fsSL https://opencode.ai/install | bash
또는 npm i -g opencode-ai
또는 brew install sst/tap/opencode
Claude Code:
claude mcp add opencode -- npx -y opencode-mcp
Claude Desktop / Cursor / Windsurf / Cline / Continue (MCP 설정에 추가):
{
"mcpServers": {
"opencode": {
...
그만습니다. 클라이언트를 재시작하면 OpenCode 의 도구가 사용 가능합니다.
모든 클라이언트 설정 (VS Code Copilot, Zed, Amazon Q 등) 및 환경 변수에 대한 자세한 내용은 Configuration 을 참조하세요.
MCP Client <--stdio--> opencode-mcp <--HTTP--> OpenCode Server
(Claude, Cursor, etc.) (this package) (opencode serve)
MCP 클라이언트는 stdio 를 통해 도구를 호출합니다. 이 서버는 이를 OpenCode headless API 의 HTTP 요청으로 변환합니다. OpenCode 서버가 실행 중이 아니더라도 자동으로 시작됩니다.
79 개의 도구는 티어로 분류되어 있습니다. 워크플로우 도구부터 시작하세요. 하나의 호출로 일반적인 패턴을 처리합니다.
| Tool | What it does |
|---|---|
opencode_setup | |
| 서버 건강, 제공자 및 프로젝트 상태를 확인합니다. 먼저 사용하세요. | |
opencode_ask | |
| 세션 생성 + 프롬프트 전송 + 답변 받기. 하나의 호출로 완료됩니다. | |
opencode_reply | |
| 기존 세션의 후속 메시지 | |
opencode_run | |
| 작업을 보내고 완료까지 대기 (세션 + 비동기 전송 + 폴링) | |
opencode_fire | |
| 발급 및 잊어버리기: 작업을 분배하고 즉시 반환 | |
opencode_check | |
| 실행 중인 세션의 간결한 진행 보고서 (상태, 할 일, 변경된 파일) | |
opencode_conversation | |
| 포맷팅된 대화 기록을 받기 | |
opencode_sessions_overview | |
| 모든 세션에 대한 빠른 개요 | |
opencode_context | |
| 프로젝트 + VCS + 설정 + 에이전트를 하나의 호출로 받기 | |
opencode_review_changes | |
| 세션의 포맷팅된 차이점 요약 | |
opencode_wait | |
| 비동기 세션을 완료까지 폴링하기 | |
opencode_provider_test | |
| 제공자가 작동하는지 빠르게 테스트하기 | |
opencode_status | |
| 건강 + 제공자 + 세션 + VCS 대시보드 |
빠른 질문:
opencode_ask({ prompt: "Explain the auth flow in this project" })
무언가를 만들고 대기:
opencode_run({ prompt: "Add input validation to POST /api/users", maxDurationSeconds: 300 })
병렬 백그라운드 작업:
opencode_fire({ prompt: "Refactor the auth module to use JWT" })
→ sessionId 를 즉시 반환합니다
opencode_check({ sessionId: "..." })
...
| Category | Count | Description |
|---|---|---|
| Workflow | 13 | High-level composite operations |
| ... | ||
| Browseable data endpoints — your client can read these without tool calls: |
| URI | Description |
|---|---|
opencode://project/current | |
| Current active project | |
opencode://config | |
| Current configuration | |
opencode://providers | |
| Providers with models | |
opencode://agents | |
| Available agents | |
opencode://commands | |
| Available commands | |
opencode://health | |
| Server health and version | |
opencode://vcs | |
| Version control info | |
opencode://sessions | |
| All sessions | |
opencode://mcp-servers | |
| MCP server status | |
opencode://file-status | |
| VCS file status |
Guided workflow templates your client can offer as selectable actions:
| Prompt | Description |
|---|---|
opencode-code-review | |
| Review diffs from a session | |
opencode-debug | |
| Step-by-step debugging workflow | |
opencode-project-setup | |
| Get oriented in a new project | |
opencode-implement | |
| Have OpenCode build a feature | |
opencode-best-practices | |
| Setup, tool selection, monitoring, and pitfalls | |
opencode-session-summary | |
| Summarize what happened in a session |
Every tool accepts an optional directory
parameter to target a different project. No restarts needed.
opencode_ask({ directory: "/home/user/mobile-app", prompt: "Add navigation" })
opencode_ask({ directory: "/home/user/web-app", prompt: "Add auth" })
All optional. Only needed if you've changed defaults on the OpenCode server.
| Variable | Default | Description |
|---|---|
OPENCODE_BASE_URL |
http://127.0.0.1:4096 |
OpenCode server URL |
OPENCODE_SERVER_USERNAME |
opencode |
HTTP basic auth username |
OPENCODE_SERVER_PASSWORD |
(none) |
HTTP basic auth password (enables auth when set) |
OPENCODE_AUTO_SERVE |
true |
Auto-start opencode serve if not running |
OPENCODE_DEFAULT_PROVIDER |
(none) |
Default provider ID when not specified per-tool (e.g. anthropic ) |
OPENCODE_DEFAULT_MODEL |
(none) |
Default model ID when not specified per-tool (e.g. claude-sonnet-4-5 ) |
git clone https://github.com/AlaeddineMessadi/opencode-mcp.git
cd opencode-mcp
npm install
...
End-to-end test against a running OpenCode server:
npm run build && node scripts/mcp-smoke-test.mjs
- Getting Started — step-by-step setup
- Configuration — env vars and all client configs
- Tools Reference — all 79 tools in detail
- Resources — 10 MCP resources
- Prompts — 6 guided workflow templates
- Examples — real workflow examples
- Architecture — system design and data flow
AI 자동 생성 콘텐츠
본 콘텐츠는 GitHub Claude Ecosystem의 원문을 AI가 자동으로 요약·번역·분석한 것입니다. 원 저작권은 원저작자에게 있으며, 정확한 내용은 반드시 원문을 확인해 주세요.
원문 바로가기