feat(mcp): .mcp.json config support and disconnect action in /mcp page#115
Merged
yishuiliunian merged 1 commit intomainfrom Apr 16, 2026
Merged
feat(mcp): .mcp.json config support and disconnect action in /mcp page#115yishuiliunian merged 1 commit intomainfrom
yishuiliunian merged 1 commit intomainfrom
Conversation
#112) Two features: 1. `.mcp.json` config file support — industry-standard camelCase format (`mcpServers`) in `.loopal/` and plugin directories. Stdio type is implicit (no `type` field needed). Within a layer, `.mcp.json` overrides `settings.json` same-name servers. 2. MCP sub-page action menu — Enter on a selected server opens a Disconnect/Reconnect menu instead of directly reconnecting. Full disconnect pipeline: TUI → ControlCommand::McpDisconnect → Runtime → McpManager::disconnect_connection → ToolRegistry cleanup.
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
.mcp.jsonconfig files in.loopal/and plugin directories (camelCasemcpServersformat, stdio implicit)/mcpsub-page (Enter opens menu instead of direct reconnect)Changes
Config layer (
loopal-config):mcp_json.rs: parser for standard.mcp.jsonformatloader.rs:load_layer_from_dirloads.mcp.jsonaftersettings.json, overrides by nameProtocol layer (
loopal-protocol):ControlCommand::McpDisconnectvariant + serde roundtrip testMCP layer (
loopal-mcp):disconnect_connection()onMcpManager— returns removed tool names for registry cleanupKernel layer (
loopal-kernel):unregister_tools()onKernelToolRegistry::unregister()methodRuntime layer (
loopal-runtime):handle_mcp_disconnect()handler: disconnect → unregister tools → emit statusTUI layer (
loopal-tui):ActionMenustate model with dynamic options (Disconnect shown only when connected)mcp_action_menu.rs: centered overlay renderingtool_approve/tool_denyextracted tokey_dispatch_ops.rs(line limit fix)Test plan
bazel build //... --config=clippyzero warningsbazel build //... --config=rustfmtzero diffs