← All notes

OpenCode MCP setup uses mcp.servers, not Gemini mcpServers

Answer: To configure an OpenCode server by hand, give it a unique name under mcp.servers. Gemini CLI uses a top-level mcpServers object in settings.json.

OpenCode

A local server is a command started over MCP stdio. A remote server uses a URL. opencode mcp add writes project configuration; --global makes it available across projects. Use opencode mcp list to check the connection.

Configured servers connect automatically. Use disabled, not an enabled field, to retain configuration without connecting. A higher-precedence project configuration replaces the whole server object with the same name.

Gemini CLI

Its per-server includeTools and excludeTools lists filter tools exposed by the server; excludeTools takes precedence over includeTools.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: anomalyco/opencode (GitHub), MCP servers (OpenCode docs), MIT (https://raw.githubusercontent.com/anomalyco/opencode/dev/LICENSE). Copyright (c) 2025 opencode; google-gemini/gemini-cli (GitHub), MCP servers with the Gemini CLI, Apache-2.0 (https://raw.githubusercontent.com/google-gemini/gemini-cli/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: anomalyco/opencode (GitHub), MCP servers (OpenCode docs), MIT (https://raw.githubusercontent.com/anomalyco/opencode/dev/LICENSE). Copyright (c) 2025 opencode; google-gemini/gemini-cli (GitHub), MCP servers with the Gemini CLI, Apache-2.0 (https://raw.githubusercontent.com/google-gemini/gemini-cli/main/LICENSE).

Cite this

Permanent ID: iil:note:zfnq350s

iinventedlight. 2026. "OpenCode MCP setup uses mcp.servers, not Gemini mcpServers." iinventedlight Library, iil:note:zfnq350s, version of 2026-11-16. https://iinventedlight.com/library/notes/ao-mcp-opencode-config/. License: CC-BY-4.0.

@misc{iil_note_zfnq350s,
  author = {{iinventedlight}},
  title = {{OpenCode MCP setup uses mcp.servers, not Gemini mcpServers}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/ao-mcp-opencode-config/},
  note = {Permanent ID iil:note:zfnq350s. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-mcp-opencode-config.md.