feat(config): add support for loading MCP configuration from mcp.json#1170
Closed
delafthi wants to merge 1 commit into
Closed
feat(config): add support for loading MCP configuration from mcp.json#1170delafthi wants to merge 1 commit into
mcp.json#1170delafthi wants to merge 1 commit into
Conversation
delafthi
marked this pull request as ready for review
July 20, 2025 14:21
- Load MCP configuration from global (`~/.config/opencode/mcp.json`) and local (`.mcp.json`) files
- Introduce `McpConfig` namespace to manage MCP server configurations
- Support both typed and legacy MCP server formats with validation using Zod schemas
- Implement variable and file expansion supporting `{VAR}` and `{VAR:-default}` syntax
- Note: Variable expansion logic is duplicated in `mcp.ts` and `config.ts` and could be refactored
- Merge global and local MCP configs into main config state, converting legacy formats for backward compatibility
This commit was primarily generated by Claude Sonnet4 using opencode 😉
github-actions
Bot
force-pushed
the
dev
branch
from
September 29, 2025 05:53
f16de3d to
cc0d460
Compare
delafthi
marked this pull request as draft
October 11, 2025 19:19
github-actions
Bot
force-pushed
the
dev
branch
from
November 10, 2025 05:43
772b621 to
eb855e1
Compare
github-actions
Bot
force-pushed
the
dev
branch
3 times, most recently
from
November 22, 2025 18:07
f1dc981 to
3e15a39
Compare
github-actions
Bot
force-pushed
the
dev
branch
3 times, most recently
from
November 27, 2025 01:29
f8ee907 to
6a9856d
Compare
Contributor
Author
|
Closing this exploratory PR—it's fallen significantly behind the current codebase and is no longer applicable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for loading MCP configuration from
mcp.jsonfiles, enabling more flexible and backward-compatible configuration management.Changes
~/.config/opencode/mcp.json) and local (.mcp.json) files.McpConfignamespace dedicated to managing MCP server configurations.{VAR}and{VAR:-default}syntax for enhanced configuration flexibility.mcp.tsandconfig.tsand could be refactored to reduce duplication.Additional Notes
This PR was primarily generated by Claude Sonnet 4.
What do you guys think?