chore(conductor): Add new track 'External MCP Server Support'
This commit is contained in:
5
conductor/tracks/external_mcp_support_20260308/index.md
Normal file
5
conductor/tracks/external_mcp_support_20260308/index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Track external_mcp_support_20260308 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "external_mcp_support_20260308",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-03-08T14:00:00Z",
|
||||
"updated_at": "2026-03-08T14:00:00Z",
|
||||
"description": "Add support for external MCP servers (Local Stdio and Remote SSE/WS) with flexible configuration and lifecycle management."
|
||||
}
|
||||
42
conductor/tracks/external_mcp_support_20260308/plan.md
Normal file
42
conductor/tracks/external_mcp_support_20260308/plan.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Implementation Plan: External MCP Server Support
|
||||
|
||||
## Phase 1: Configuration & Data Modeling
|
||||
- [ ] Task: Define the schema for external MCP server configuration.
|
||||
- [ ] Update `src/models.py` to include `MCPServerConfig` and `MCPConfiguration` classes.
|
||||
- [ ] Implement logic to load `mcp_config.json` from global and project-specific paths.
|
||||
- [ ] Task: Integrate configuration loading into `AppController`.
|
||||
- [ ] Ensure the MCP config path is correctly resolved from `config.toml` and `manual_slop.toml`.
|
||||
- [ ] Task: Write unit tests for configuration loading and validation.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Configuration & Data Modeling' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: MCP Client Extension
|
||||
- [ ] Task: Implement `ExternalMCPManager` in `src/mcp_client.py`.
|
||||
- [ ] Add support for managing multiple MCP server sessions.
|
||||
- [ ] Implement the `StdioMCPClient` for local subprocess communication.
|
||||
- [ ] Implement the `RemoteMCPClient` for SSE/WebSocket communication.
|
||||
- [ ] Task: Update Tool Discovery.
|
||||
- [ ] Implement `list_external_tools()` to aggregate tools from all active external servers.
|
||||
- [ ] Task: Update Tool Dispatch.
|
||||
- [ ] Modify `mcp_client.dispatch()` and `mcp_client.async_dispatch()` to route tool calls to either native tools or the appropriate external server.
|
||||
- [ ] Task: Write integration tests for stdio and remote MCP client communication (using mock servers).
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: MCP Client Extension' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: GUI Integration & Lifecycle
|
||||
- [ ] Task: Update the **Operations** panel in `src/gui_2.py`.
|
||||
- [ ] Create a new "External Tools" section.
|
||||
- [ ] List discovered tools from active external servers.
|
||||
- [ ] Add a "Refresh External MCPs" button to reload configuration and rediscover tools.
|
||||
- [ ] Task: Implement Lifecycle Management.
|
||||
- [ ] Add the "Auto-start on Project Load" logic to start servers when a project is initialized.
|
||||
- [ ] Add status indicators (e.g., color-coded dots) for each external server in the GUI.
|
||||
- [ ] Task: Write visual regression tests or simulation scripts to verify the updated Operations panel.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: GUI Integration & Lifecycle' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: Agent Integration & HITL
|
||||
- [ ] Task: Update AI tool declarations.
|
||||
- [ ] Ensure `ai_client.py` includes external tools in the tool definitions sent to Gemini/Anthropic.
|
||||
- [ ] Task: Verify HITL Approval Flow.
|
||||
- [ ] Ensure that calling an external tool correctly triggers the `ConfirmDialog` modal.
|
||||
- [ ] Verify that approved external tool results are correctly returned to the AI.
|
||||
- [ ] Task: Perform a final end-to-end verification with a real external MCP server.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Agent Integration & HITL' (Protocol in workflow.md)
|
||||
39
conductor/tracks/external_mcp_support_20260308/spec.md
Normal file
39
conductor/tracks/external_mcp_support_20260308/spec.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Specification: External MCP Server Support
|
||||
|
||||
## Overview
|
||||
This feature adds support for integrating external Model Context Protocol (MCP) servers into Manual Slop. This allows agents to utilize tools from a wide ecosystem of MCP servers (like those for databases, APIs, or specialized utilities) alongside the application's native tools.
|
||||
|
||||
## Functional Requirements
|
||||
- **Server Protocol Support:**
|
||||
- **Local Stdio:** Support for launching local subprocesses and communicating via JSON-RPC over stdio.
|
||||
- **Remote (SSE/WS):** Support for connecting to remote MCP servers via Server-Sent Events or WebSockets.
|
||||
- **Flexible Configuration:**
|
||||
- The path to the MCP configuration file (e.g., `mcp_config.json`) must be configurable globally in `config.toml`.
|
||||
- Support for per-project overrides in `manual_slop.toml` to specify a project-specific MCP configuration.
|
||||
- **Lifecycle Management:**
|
||||
- Provide a "Auto-start on Project Load" checkbox for each configured MCP server (or as a global/per-project default).
|
||||
- If enabled, the server starts automatically when the project is loaded.
|
||||
- If disabled, servers should be initialized on-demand or via a manual "Start" button in the GUI.
|
||||
- **Tool Discovery & UI Integration:**
|
||||
- Automatically discover tools from configured servers using the MCP `listTools` capability.
|
||||
- Display discovered tools in a unified "External Tools" section within the **Operations** panel.
|
||||
- Ensure external tools are correctly mapped to agent tool declarations (Gemini, Anthropic, etc.).
|
||||
- **Security & HITL:**
|
||||
- All tool calls from external MCP servers must adhere to the application's existing Human-in-the-Loop (HITL) approval mechanism.
|
||||
- Users must review and approve the parameters of any external tool call before execution.
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **Performance:** Asynchronous communication with MCP servers to avoid blocking the main GUI thread.
|
||||
- **Robustness:** Gracefully handle server connection failures, timeouts, and process crashes.
|
||||
- **Scalability:** Support for multiple external MCP servers simultaneously.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Users can specify an MCP config path in `config.toml` and `manual_slop.toml`.
|
||||
- [ ] The GUI lists tools from configured external servers in a unified section.
|
||||
- [ ] Selecting an external tool correctly generates a tool call for the AI.
|
||||
- [ ] Approving an external tool call successfully executes it via the MCP bridge and returns the output to the AI.
|
||||
- [ ] Local stdio servers and remote SSE/WS servers are both functional.
|
||||
|
||||
## Out of Scope
|
||||
- Support for MCP Resources or Prompts (focusing strictly on Tools for this track).
|
||||
- Managing installation of external MCP server dependencies (e.g., `npm install`, `pip install`).
|
||||
Reference in New Issue
Block a user