Get updates
Setup

MCP servers, harness by harness

Every harness speaks MCP, and every harness configures it differently. Here's one server, Context7 (developer docs), added to each, using the syntax from each tool's own docs.

Checked against official docs on Oct 18, 20267 sourcesNo affiliate links

Claude Code

Remote (HTTP) or local (stdio)
claude mcp add --transport http context7 https://mcp.context7.com/mcp
claude mcp add --transport stdio context7 -- npx -y @upstash/context7-mcp
# share with the team: writes .mcp.json at the repo root
claude mcp add --transport http context7 --scope project https://mcp.context7.com/mcp
.mcp.json (project scope, commit it)
{
  "mcpServers": {
    "context7": { "type": "http", "url": "https://mcp.context7.com/mcp" }
  }
}

Commands write to local scope unless you pass --scope project or --scope user. In JSON, streamable-http is accepted as an alias for http.

Codex CLI

Add with the CLI
codex mcp add context7 -- npx -y @upstash/context7-mcp
codex mcp list
~/.codex/config.toml (or .codex/config.toml in the project)
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]

# a remote server uses url instead
# [mcp_servers.docs]
# url = "https://mcp.example.com/mcp"

Inside the TUI, /mcp lists active servers; codex mcp login <name> handles OAuth.

OpenCode

opencode.json (OpenCode 1)
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "context7": { "type": "remote", "url": "https://mcp.context7.com/mcp", "enabled": true }
  }
}
OpenCode 2: add from the CLI
opencode mcp add context7 --url https://mcp.context7.com/mcp
opencode mcp list

goose

~/.config/goose/config.yaml
extensions:
  context7:
    name: Context7
    type: stdio
    cmd: npx
    args: [-y, "@upstash/context7-mcp"]
    enabled: true
    timeout: 300

Or run goose configure → Add Extension. Remote servers use type: streamable_http with a uri. The YAML above follows the shape of goose's documented GitHub example.

Gemini CLI

~/.gemini/settings.json
{
  "mcpServers": {
    "context7": { "httpUrl": "https://mcp.context7.com/mcp" }
  }
}

Use command + args for stdio, httpUrl for streamable HTTP, or url for SSE. Requests time out after 10 minutes by default (timeout, in milliseconds).

Aider

We found no MCP setup in Aider's docs on Oct 18, 2026. If a job needs MCP tools, pair Aider with one of the harnesses above.

Cheat sheet

HarnessConfig fileKeyCLI
Claude Code.mcp.json / ~/.claude.jsonmcpServersclaude mcp add
Codex CLIconfig.toml[mcp_servers.<name>]codex mcp add
OpenCode 1opencode.jsonmcp.<name>opencode mcp add
OpenCode 2opencode.json(c)mcp.servers.<name>opencode mcp add
goose~/.config/goose/config.yamlextensionsgoose configure
Gemini CLIsettings.jsonmcpServers—

FAQ

Can I share one MCP config across harnesses?

Not directly. Each tool uses its own file and key names (mcpServers, mcp_servers, mcp, extensions). Keep a short list of servers in your README and add each one per harness.

Where do project-level MCP servers go in Claude Code?

In .mcp.json at the repo root, created with --scope project. Claude Code asks for approval in interactive sessions before using them, but in claude -p runs it loads them without asking. Use --strict-mcp-config with --mcp-config to control exactly which servers a headless run gets.

Does Aider support MCP?

Not in the docs we checked on Oct 18, 2026.

Sources

  1. Claude Code docs: MCP · checked Oct 18, 2026
  2. Codex docs: MCP · checked Oct 18, 2026
  3. OpenCode 1 docs: MCP servers · checked Oct 18, 2026
  4. OpenCode 2 docs: MCP servers · checked Oct 18, 2026
  5. OpenCode 1 docs: CLI · checked Oct 18, 2026
  6. goose docs: extensions (MCP) · checked Oct 18, 2026
  7. Gemini CLI docs: MCP servers · checked Oct 18, 2026

Spotted something out of date? Email sternberg@mail.grokbot.com.

Related