feat(mcp): import servers from .mcp.json, .claude.json, .cursor/mcp.json - #47
Merged
Merged
Conversation
Fixes KlaatAI#36 - Add external MCP config import with precedence merge - Expand ${VAR}, ${env:VAR}, ${workspaceFolder}, ${userHome} - Gate behind compat.importMcpConfigs (default on) - Show source in /mcp; fix disable for non-home configs - Add fixture-based unit tests
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.
Summary
Import MCP server definitions from existing tool configs so users can try KlaatCode without reconfiguring servers.
Motivation
Fixes #36
Many developers already maintain MCP configs for Claude Code or Cursor. Reading those files makes onboarding zero-setup.
Changes
src/mcp/import.tsto parse externalmcpServersentries (stdio + HTTP/SSE)${VAR},${VAR:-default},${env:VAR},${workspaceFolder},${userHome}.klaatai/mcp.json>~/.klaatai/mcp.json>.mcp.json>.claude.json>.cursor/mcp.jsoncompat.importMcpConfigs(default on)/mcpshows source file/mcp disableto respectsource(don't edit home config when server came from project/import)compat.importMcpConfigsTests
Notes
auth,envFile) are ignored (no native equivalent yet).klaatai/mcp.jsonentries are not env-expanded (existing behavior)