Skip to content

Conversation

@delafthi
Copy link
Contributor

@delafthi delafthi commented Oct 27, 2025

This PR adds a new mcp module that provides unified configuration management for Model Context
Protocol (MCP) servers. Instead of duplicating server definitions across multiple tools, users can define MCP servers once in programs.mcp.servers and optionally enable tool-specific integrations.

The module currently generates the standard ~/.config/mcp/mcp.json configuration file and includes an enableOpencodeIntegration option that automatically translates the MCP server definitions into OpenCode's configuration format.

Future Integrations

The design allows for additional tool integrations to be added following the same pattern:

• enableVscodeIntegration - for Visual Studio Code
• Any other tools that support MCP servers

Each integration would translate programs.mcp.servers into the respective tool's configuration format, maintaining a single source of truth for MCP server definitions.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@delafthi delafthi marked this pull request as draft October 30, 2025 09:16
@delafthi delafthi marked this pull request as ready for review November 1, 2025 19:22
@delafthi delafthi requested a review from khaneliman November 1, 2025 19:38
@khaneliman
Copy link
Collaborator

Thanks, brief glance looks good. I'll take a detailed look a little bit later.

Copy link
Collaborator

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, could you move the vscode and opencode changes to their own respective commits. So, we have a commit that introduced the mcp module and then commits for vscode/opencode adding their integrations with it.

Would also be nice to have a news entry for the new module and functionality

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants