Repository navigation
fix: handle non-stdio MCP server configs in config mcp - #784
Conversation
`config mcp` fails when the existing config file has servers that don't use the stdio format (e.g. HTTP-based servers with `url` instead of `command`/`args`). Use z.unknown() for the record values so other servers are preserved without being validated. Refs jsrepojs#783
🦋 Changeset detectedLatest commit: e009b94 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@guillevc is attempting to deploy a commit to the jsrepo Team on Vercel. A member of the Team first needs to authorize it. |
|
The premise works but we should probably use an actual type here instead of unknown. Not sure if there is a standard that can be followed |
|
I looked into this and there isn't really a standard to follow. The MCP spec covers the transport protocols (stdio and streamable HTTP) but doesn't define a config file schema, and each client has their own convention. The spec also allows custom transports, so new shapes could show up anytime. Since jsrepo doesn't care about the format of existing servers' configs and just needs to preserve them while writing its own entry, I think Happy to update either way. |
|
I think for now we can just have a type that says that it could have those stdio properties or http properties instead of having no typing at all. That way if we need to access them in the future they are already there. |
jsrepo
@jsrepo/mcp
@jsrepo/migrate
@jsrepo/transform-biome
@jsrepo/transform-filecasing
@jsrepo/transform-javascript
@jsrepo/transform-oxfmt
@jsrepo/transform-prettier
commit: |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
McpServerConfigSchemaandVSCodeServerConfigSchemavalidated every MCP server entry againstServerConfigSchema, which requirescommandandargs. This breaks when the config already contains non-stdio servers (e.g. HTTP-based withurl).ServerConfigSchematoz.unknown()so existing entries are preserved as-is.Fixes #783