Split off MCP server configuration from config.json #1335

Closed
opened 2026-02-16 17:30:29 -05:00 by yindo · 7 comments
Owner

Originally created by @segoon on GitHub (Aug 16, 2025).

Originally assigned to: @thdxr on GitHub.

There is a possibility to define custom MCP server configurations in global config file. However, for multiple MCP servers it can become unpractical to define all of them in a single file. The file starts being too large and non-modifyable. Also it is quite uncomfortable to exchange with MCP server locations between people - manual config file edit is required.

It is proposed that "mcp" section in config.json can be split off into multiple files in ~/.config/opencode/mcp/*.json. Each file references a single MCP server configuration. It allows just adding new files instead of modifying a single big config file. Also it enables to exchange with MCP server configurations with e.g. just symlinking mcp/*.json from shared filesystem with MCP configs.

Originally created by @segoon on GitHub (Aug 16, 2025). Originally assigned to: @thdxr on GitHub. There is a possibility to define custom MCP server configurations in global config file. However, for multiple MCP servers it can become unpractical to define all of them in a single file. The file starts being too large and non-modifyable. Also it is quite uncomfortable to exchange with MCP server locations between people - manual config file edit is required. It is proposed that `"mcp"` section in `config.json` can be split off into multiple files in `~/.config/opencode/mcp/*.json`. Each file references a single MCP server configuration. It allows just adding new files instead of modifying a single big config file. Also it enables to exchange with MCP server configurations with e.g. just symlinking mcp/*.json from shared filesystem with MCP configs.
yindo closed this issue 2026-02-16 17:30:29 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 16, 2025):

to clarify: you want mcp configuration to not be limited to a single file?

also what did you mean here:

just symlinking mcp/*.json from shared filesystem with MCP configs.

@rekram1-node commented on GitHub (Aug 16, 2025): to clarify: you want mcp configuration to not be limited to a single file? also what did you mean here: > just symlinking mcp/*.json from shared filesystem with MCP configs.
Author
Owner

@segoon commented on GitHub (Aug 16, 2025):

to clarify: you want mcp configuration to not be limited to a single file?

Right.

also what did you mean here:

  1. write down MCP configs in some shared filesystem (e.g. NFS)
  2. mount filesystem in /mount
  3. ln -s /mount/dotfiles/.config/opencode/mcp/*.json ~/.config/opencode/mcp/
@segoon commented on GitHub (Aug 16, 2025): > to clarify: you want mcp configuration to not be limited to a single file? Right. > also what did you mean here: 1) write down MCP configs in some shared filesystem (e.g. NFS) 2) mount filesystem in /mount 3) `ln -s /mount/dotfiles/.config/opencode/mcp/*.json ~/.config/opencode/mcp/`
Author
Owner

@segoon commented on GitHub (Aug 22, 2025):

@rekram1-node can you please look at the PR?

@segoon commented on GitHub (Aug 22, 2025): @rekram1-node can you please look at the PR?
Author
Owner

@rekram1-node commented on GitHub (Aug 22, 2025):

@segoon that's up to @thdxr to review, but I will assign him to your PR

@rekram1-node commented on GitHub (Aug 22, 2025): @segoon that's up to @thdxr to review, but I will assign him to your PR
Author
Owner

@rekram1-node commented on GitHub (Aug 23, 2025):

assigned him

@rekram1-node commented on GitHub (Aug 23, 2025): assigned him
Author
Owner

@clouatre commented on GitHub (Sep 14, 2025):

Multi-Instance Testing: Configuration Split Won't Solve Core Issue

We've tested extensive multi-instance MCP configurations and can provide insights on this proposal.

Testing Scenario: 3 Atlassian MCP instances (separate tenants) + multiple other MCP servers

Configuration Management: Splitting into separate files would help organize complex setups, but doesn't address the underlying authentication coordination problem.

Root Issue Discovered: Third-party proxy solutions use shared OAuth sessions that prevent true instance isolation regardless of configuration structure.

Evidence:

Comparison: Claude Code's native SSE implementation handles per-instance authentication without configuration complexity.

Recommendation: While configuration splitting would improve usability, the priority should be native OAuth implementation (issue #988) to eliminate proxy dependency.

Configuration management improvements would be valuable once authentication isolation is solved.

@clouatre commented on GitHub (Sep 14, 2025): ## Multi-Instance Testing: Configuration Split Won't Solve Core Issue We've tested extensive multi-instance MCP configurations and can provide insights on this proposal. **Testing Scenario**: 3 Atlassian MCP instances (separate tenants) + multiple other MCP servers **Configuration Management**: Splitting into separate files would help organize complex setups, but doesn't address the underlying authentication coordination problem. **Root Issue Discovered**: Third-party proxy solutions use shared OAuth sessions that prevent true instance isolation regardless of configuration structure. **Evidence**: - [mcp-remote](https://github.com/geelen/mcp-remote): Shared lockfiles coordinate all processes → same OAuth session (geelen/mcp-remote#25) - [mcp-proxy](https://github.com/sparfenyuk/mcp-proxy): Multiple server aggregation marked as open request (sparfenyuk/mcp-proxy#82) **Comparison**: Claude Code's native SSE implementation handles per-instance authentication without configuration complexity. **Recommendation**: While configuration splitting would improve usability, the priority should be native OAuth implementation (issue #988) to eliminate proxy dependency. Configuration management improvements would be valuable once authentication isolation is solved.
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1335