Skip to content

Split off MCP server configuration from config.json #1998

Closed

Description

@segoon

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.

Activity

  1. rekram1-node commented on Aug 16, 2025

    @rekram1-node
    Contributor

    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.

  2. segoon commented on Aug 16, 2025

    @segoon
    ContributorAuthor

    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/
  3. segoon commented on Aug 23, 2025

    @segoon
    ContributorAuthor

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

  4. rekram1-node commented on Aug 23, 2025

    @rekram1-node
    Contributor

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

  5. rekram1-node commented on Aug 23, 2025

    @rekram1-node
    Contributor

    assigned him

  6. clouatre commented on Sep 14, 2025

    @clouatre

    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.

  7. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

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

  8. segoon commented on Mar 25, 2026

    @segoon
    ContributorAuthor

    Hi, still actual, commented in the PR #2001 (comment)
    @rekram1-node @thdxr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions