
alaeddinemessadi/opencode-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
alaeddinemessadi/opencode-mcp — это кандидат на сервер MCP, импортированный из https://github.com/alaeddinemessadi/opencode-mcp.
Обзор
alaeddinemessadi/opencode-mcp — это кандидат на сервер MCP, импортированный из https://github.com/alaeddinemessadi/opencode-mcp.
Обзор (машинный перевод)
Делегировать работу по программированию OpenCode из вашего MCP-клиента.
opencode-mcp соединяет Claude, Cursor, VS Code и другие MCP-клиенты с безголовым API OpenCode. Задавайте вопросы, внедряйте функции, отслеживайте фоновую работу, отвечайте на вопросы и права на права, а также проверяйте изменения между проектами.
Версия 3.0.0 требует Node.js 22 или новее. Обновление с 2.x? См. заметки по миграции.
Быстрый старт
Установите OpenCode и запустите его сервер с вашего проекта:
Если используете TUI, начните с opencode --port 4096 и делитесь этим сервером. Устанавливайте OPENCODE_BASE_URL для другой конечной точки.
Для Клода Кода:
Для клиентов, использующих конфигурацию mcpServers:
Перезагрузите клиент и вызовите opencode_setup. Выберите провайдера из его настроенных провайдеров, затем используйте opencode_provider_models для выбора модели. Установите вместе OPENCODE_DEFAULT_PROVIDER и OPENCODE_DEFAULT_MODEL или передайте выбранные идентификаторы в каждом вызове запроса.
Клиент-специфическая конфигурация включает VS Code, Windsurf, Continue, Zed и Amazon Q. Чтобы протестировать неопубликованные изменения, собрать из исходника и настроить клиента на node с абсолютным путём к dist/index.js.
Выберите рабочий процесс
| Нужно | Инструменты |
|---|
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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.
Установка
npx -y opencode-mcpКонфигурация
{
"mcpServers": {
"opencode": {
"command": "npx",
"args": ["-y", "opencode-mcp"]
}
}
}