Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 MCP', an MCP server appears in docs but isn't wired into opencode, or tools from a known MCP server are missing in a session, or an MCP server needs REINSTALLING/RESTORING after its entry was dropped from the config. KEY GOTCHAS: (a) MCP servers load at STARTUP — the running session will NOT see a newly added server until opencode is quit and relaunched; tell the user to restart. (b) Many remote servers (Exa, etc.) offer a FREE plan that works WITHOUT an API key — start with just type+url+enabled, no headers block; add a key only when you hit 429 rate limits. (c) API keys go in a headers block: {"headers": {"x-api-key": ""}} (header name varies by provider; Exa uses x-api-key, check the provider's docs). (d) Some remote servers expose advanced/agent tools behind a query param on the URL (e.g. "?tools=...") — opt in only if needed. (e) Verify JSON validity after editing (python -m json.tool or jq). (f) OAuth-based remote servers (Notion, Linear) use "oauth": {} instead of a headers block — opencode handles the browser OAuth flow automatically; the agent CANNOT complete OAuth itself, instruct the user to run "opencode mcp auth " after restart. Verified-working examples: REMOTE (Exa free plan) {"exa": {"type": "remote", "url": "https://mcp.exa.ai/mcp", "enabled": true}}; REMOTE (Notion OAuth) {"notion": {"type": "remote", "url": "https://mcp.notion.com/mcp", "enabled": true, "oauth": {}}}; LOCAL (stdio) {"jupyter": {"command": ["npx", "jupyterlab-collab-mcp"], "enabled": true, "type": "local"}}. Distinct from jupyterlab-collab-mcp-setup (Jupyter-specific 3-layer architecture) and customize-opencode (built-in, general opencode config but doesn't enumerate the local-vs-remote type distinction).

Instructions

TODO: Add specific instructions based on observed patterns.

  • Procedure

  1. 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": "..."}.
  2. 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.
  3. 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.
  4. Verify the JSON is still valid after the edit: python -m json.tool ~/.config/opencode/opencode.json (or: jq . ~/.config/opencode/opencode.json)
  5. 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):

  1. Is the server registered under "mcp" in opencode.json with enabled: true? (grep the config — opencode does NOT auto-discover servers.)
  2. Was opencode RESTARTED after the config change? A server added mid-session is invisible until relaunch.
  3. 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.)
  4. 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,

Полный SKILL.md на GitHub

Установить opencode-mcp-server-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

PURPOSE.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить opencode-mcp-server-setup с