AO

alaeddinemessadi/opencode-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

161 stars 28 forks 品質 84 トレンド 31MIT

alaeddinemessadi/opencode-mcpは、https://github.com/alaeddinemessadi/opencode-mcp.からインポートされたMCPサーバー候補です。

概要

alaeddinemessadi/opencode-mcpは、https://github.com/alaeddinemessadi/opencode-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

コーディング作業はMCPクライアントからOpenCodeに委ねてください。

OpenCode-MCPは、Claude、Cursor、VS Code、その他のMCPクライアントをOpenCodeのヘッドレスAPIに接続します。質問をしたり、機能を実装したり、バックグラウンド作業を監視したり、質問や権限に応答したり、プロジェクト間での変更を確認したりできます。

バージョン3.0.0はNode.js 22以降が必要です。2.xからのアップグレードですか?移行ノートをご覧ください。

クイックスタート

OpenCodeをインストールし、プロジェクトからそのサーバーを起動します:

TUIを使う場合は、opencode --port 4096で始めて、そのサーバーを共有してください。別のエンドポイントにOPENCODE_BASE_URLを設定してください。

Claudeコードの場合:

mcpServers構成を使用しているクライアントの場合:

クライアントを再起動し、opencode_setupを呼び出します。設定済みのプロバイダーからプロバイダーを選択し、opencode_provider_modelsでモデルを選択します。OPENCODE_DEFAULT_PROVIDERとOPENCODE_DEFAULT_MODELを一緒に設定するか、各プロンプトコールで選択したIDを渡します。

クライアント固有の構成にはVS Code、Windsurf、Continue、Zed、Amazon Qが含まれます。未リリースの変更をテストするには、ソースからビルドし、クライアントをnodeでdist/index.jsへの絶対パスで実行するように設定してください。

ワークフローを選択してください

必要 ツール

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

opencode-mcp

Delegate coding work to OpenCode from your MCP client.

opencode-mcp connects Claude, Cursor, VS Code, and other MCP clients to OpenCode’s headless API. Ask questions, implement features, monitor background work, respond to questions and permissions, and review changes across projects.

Version 3.x requires Node.js 22 or newer and works with OpenCode 1.x (tested with 1.18.31 and 1.19.3). Support for OpenCode 2.x is planned for 4.0. Upgrading from 2.x? See the migration notes.

Quick Start

Install OpenCode and start its server from your project:

opencode serve --hostname 127.0.0.1 --port 4096

If you use the TUI, start it with opencode --port 4096 and share that server. Set OPENCODE_BASE_URL for another endpoint.

For Claude Code:

claude mcp add opencode -- npx -y opencode-mcp

For clients using an mcpServers configuration:

{
  "mcpServers": {
    "opencode": {
      "command": "npx",
      "args": ["-y", "opencode-mcp"]
    }
  }
}

Restart the client and call opencode_setup. Choose a provider from its configured providers, then use opencode_provider_models to select a model. Set OPENCODE_DEFAULT_PROVIDER and OPENCODE_DEFAULT_MODEL together or pass the selected IDs in each prompt call.

Client-specific configuration includes VS Code, Windsurf, Continue, Zed, and Amazon Q. To test unreleased changes, build from source and configure your client to run node with the absolute path to dist/index.js.

Choose a Workflow

Need Tools
Setup and orientation opencode_setup, opencode_context, opencode_provider_models
Quick question or follow-up opencode_ask, opencode_reply
Start work and wait opencode_run
Work in the background opencode_fire, then opencode_check or opencode_wait
Recover or control a recorded job opencode_job_list, opencode_job_get, opencode_job_cancel
Resolve required input opencode_job_input, permission and question tools
Review the result opencode_review_changes, opencode_conversation
opencode_fire({
  directory: "/absolute/path/to/project",
  prompt: "Add input validation to POST /api/users and run the relevant tests",
  providerID: "",
  modelID: ""
})
// Save the returned job and session IDs; use them to monitor or resume observation.
GitHub で README 全文を見る

インストール

npx -y opencode-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "opencode": { "command": "npx", "args": ["-y", "opencode-mcp"] } } }