feat(conductor): Archive External MCP, Project-Specific Conductor, and GUI Path Config tracks

This commit is contained in:
2026-03-12 20:10:05 -04:00
parent 5a8a91ecf7
commit befb480285
13 changed files with 437 additions and 23 deletions

View File

@@ -0,0 +1,5 @@
# Track external_mcp_support_20260308 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -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."
}

View File

@@ -0,0 +1,42 @@
# Implementation Plan: External MCP Server Support
## Phase 1: Configuration & Data Modeling [checkpoint: 4ba1bd9]
- [x] Task: Define the schema for external MCP server configuration. [1c863f0]
- [x] Update `src/models.py` to include `MCPServerConfig` and `MCPConfiguration` classes.
- [x] Implement logic to load `mcp_config.json` from global and project-specific paths.
- [x] Task: Integrate configuration loading into `AppController`. [c09e0f5]
- [x] Ensure the MCP config path is correctly resolved from `config.toml` and `manual_slop.toml`.
- [x] Task: Write unit tests for configuration loading and validation. [c09e0f5]
- [x] Task: Conductor - User Manual Verification 'Phase 1: Configuration & Data Modeling' [4ba1bd9]
## Phase 2: MCP Client Extension [checkpoint: 828fadf]
- [x] Task: Implement `ExternalMCPManager` in `src/mcp_client.py`. [828fadf]
- [x] Add support for managing multiple MCP server sessions.
- [x] Implement the `StdioMCPClient` for local subprocess communication.
- [x] Implement the `RemoteMCPClient` for SSE/WebSocket communication (stub).
- [x] Task: Update Tool Discovery. [828fadf]
- [x] Implement `list_external_tools()` to aggregate tools from all active external servers.
- [x] Task: Update Tool Dispatch. [828fadf]
- [x] Modify `mcp_client.dispatch()` and `mcp_client.async_dispatch()` to route tool calls to either native tools or the appropriate external server.
- [x] Task: Write integration tests for stdio and remote MCP client communication (using mock servers). [828fadf]
- [x] Task: Conductor - User Manual Verification 'Phase 2: MCP Client Extension' [828fadf]
## Phase 3: GUI Integration & Lifecycle [checkpoint: 3b2588a]
- [x] Task: Update the **Operations** panel in `src/gui_2.py`. [3b2588a]
- [x] Create a new "External Tools" section.
- [x] List discovered tools from active external servers.
- [x] Add a "Refresh External MCPs" button to reload configuration and rediscover tools.
- [x] Task: Implement Lifecycle Management. [3b2588a]
- [x] Add the "Auto-start on Project Load" logic to start servers when a project is initialized.
- [x] Add status indicators (e.g., color-coded dots) for each external server in the GUI.
- [x] Task: Write visual regression tests or simulation scripts to verify the updated Operations panel. [3b2588a]
- [x] Task: Conductor - User Manual Verification 'Phase 3: GUI Integration & Lifecycle' [3b2588a]
## Phase 4: Agent Integration & HITL [checkpoint: f4c5a0b]
- [x] Task: Update AI tool declarations. [f4c5a0b]
- [x] Ensure `ai_client.py` includes external tools in the tool definitions sent to Gemini/Anthropic.
- [x] Task: Verify HITL Approval Flow. [f4c5a0b]
- [x] Ensure that calling an external tool correctly triggers the `ConfirmDialog` modal.
- [x] Verify that approved external tool results are correctly returned to the AI.
- [x] Task: Perform a final end-to-end verification with a real external MCP server. [f4c5a0b]
- [x] Task: Conductor - User Manual Verification 'Phase 4: Agent Integration & HITL' [f4c5a0b]

View 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`).