opencode-mcp-server-setup
БесплатноБез исполняемых скриптовНе проверенAdd or configure an MCP server in opencode's config (~/.config/opencode/opencode.json or project .opencode/) — both server types: LOCAL/stdio {"type"…
от ericmjl★ 45 звёзд на GitHubОб этом скилле
Opencode Mcp Server Setup
Add or configure an MCP server in opencode's config (~/.config/opencode/opencode.json or project .opencode/) — covers BOTH server types: (1) LOCAL/stdio servers use {"type": "local", "command": ["npx", "pkg"], "enabled": true} (or "command": ["/abs/path/to/binary"]) where opencode spawns the process over stdin/stdout; (2) REMOTE/HTTP servers use {"type": "remote", "url": "https://host/mcp", "enabled": true} where opencode connects to a hosted endpoint. Use when the user says 'add the X MCP server', 'install/configure MCP', 'connect to
Instructions
TODO: Add specific instructions based on observed patterns.
Procedure
- Decide the server TYPE. Check the provider's docs for the connection model:
- LOCAL/stdio (opencode spawns a process): provider docs show a CLI command
like 'npx
' or a binary path. Use {"type": "local", "command": [...]}. - REMOTE/HTTP (opencode connects to a hosted URL): provider docs show an https endpoint. Use {"type": "remote", "url": "..."}.
- LOCAL/stdio (opencode spawns a process): provider docs show a CLI command
like 'npx
- Edit the config file:
- Global (all projects): ~/.config/opencode/opencode.json → "mcp" object.
- Project-scoped:
/.opencode/opencode.json (or opencode.jsonc). Add the entry as a key under "mcp" with "enabled": true.
- Start REMOTE servers on the FREE plan first — omit any headers/API-key block. Many providers (Exa, etc.) work without a key up to a rate limit. Add a key ONLY when the user hits a 429.
- Verify the JSON is still valid after the edit: python -m json.tool ~/.config/opencode/opencode.json (or: jq . ~/.config/opencode/opencode.json)
- TELL THE USER TO RESTART opencode. MCP servers load at process startup; the running session will NOT see the new server. This is the #1 reason a freshly-added server's tools appear missing.
When tools from a known MCP server are missing in a session
Before debugging the server itself, check (in order):
- Is the server registered under "mcp" in opencode.json with enabled: true? (grep the config — opencode does NOT auto-discover servers.)
- Was opencode RESTARTED after the config change? A server added mid-session is invisible until relaunch.
- For LOCAL servers: does the command binary exist and run standalone? (Run the command array directly; a missing npx package or wrong path fails silently at startup.)
- For REMOTE servers: does the URL resolve? (curl the endpoint.) If 429, add an API key via headers.
API key / auth for remote servers
Add a "headers" block inside the server entry. Header NAME varies by provider (Exa uses x-api-key; others use Authorization: Bearer). Check the provider docs. NEVER write a real key into a committed file — if the config is in a repo, use an env-var reference the harness supports, or keep keys in the global ~/.config/opencode/opencode.json which is outside the repo.
OAuth-based remote servers (Notion, Linear, GitHub, Google Drive)
Some remote MCP servers authenticate via OAuth, NOT an API key. For these, add an "oauth" key with an empty object:
"notion": {"type": "remote", "url": "https://mcp.notion.com/mcp", "enabled": true, "oauth": {}}
The empty "oauth": {} tells opencode to handle the OAuth flow automatically: it detects the 401,
Установить opencode-mcp-server-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл opencode-mcp-server-setup?
Add or configure an MCP server in opencode's config (~/.config/opencode/opencode.json or project .opencode/) — both server types: LOCAL/stdio {"type": "local", "command": ["npx", "pkg"], "enabled": true} and REMOTE/HTTP {"type": "remote", "url": "...", "enabled": true}. Use when the user says 'add the X MCP server', 'install/configure MCP', 'connect to <service> MCP', an MCP server appears in docs but isn't wired into opencode, tools from a known MCP server are missing in a session, or a server needs REINSTALLING/RESTORING after its entry was dropped. KEY GOTCHAS: servers load at STARTUP (restart to see new ones); many remote servers (Exa) work FREE without an API key — start with type+url+enabled only; API keys go in a headers block; OAuth servers (Notion, Linear) use "oauth": {} and the user must run 'opencode mcp auth <name>' (the agent cannot complete OAuth); verify JSON validity after editing. Verified examples for Exa/Notion/Jupyter live in the body.
Как установить скилл opencode-mcp-server-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл opencode-mcp-server-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic