Issue Description
We currently have multiple implementations of MCP (Model-Compiler-Processor) functionality spread across several files in the codebase, causing confusion, maintenance overhead, and potential inconsistencies. The main MCP implementation should be consolidated in mcp_tools.py, which already contains the most up-to-date implementation.
Problem
mcp_server.py is marked as deprecated but still remains in the codebase, providing redundant functionality
mcp_service.py contains business logic that could be refactored to work with the unified MCP implementation
- Several example files are using different MCP implementations, leading to inconsistent usage patterns
- The MCP server is configured in multiple places, making configuration changes error-prone
Proposed Solution
- Remove
mcp_server.pycompletely, as noted in its own header comment: "DEPRECATED: This file is deprecated. All MCP functionality has been moved to app/mcp_tools.py."
- Update
docker-compose.ymland other configuration files to use only the MCP implementation from mcp_tools.py
- Refactor
mcp_service.py to be used by mcp_tools.py without duplicating the MCP server setup
- Update all examples to use the consistent MCP implementation
- Ensure the standalone MCP tools from
mcp_tools.py work with both the CLI and the API endpoints
Benefits
- Simplified codebase with a single source of truth for MCP implementation
- Easier maintenance and updates to MCP functionality
- Consistent MCP experience across all integration points
- Reduced code duplication and potential for bugs
- Clearer implementation path for new MCP tools
- Implementation Details
Implementation Details
Key files that need updates:
mcp_tools.py - Ensure it fully supports all required functionality
mcp_service.py - Refactor business logic to work with the new structure
run_mcp_server.py - Update to use the mcp_tools implementation
mcp_client_example.py- Ensure it works with the consolidated implementation
mcp-proxy-config.json- Update to reference the correct endpoints
Related Components
This change affects:
- MCP server initialization
- MCP tool registration
- MCP client examples
- Docker configuration
- Continuous integration tests
Acceptance Criteria
- All MCP functionality works correctly through
mcp_tools.py
- No references to the deprecated MCP server implementation remain
- All tests pass with the consolidated implementation
- Documentation is updated to reflect the changes
- Docker builds and runs correctly with the updated implementation
Tasks
- Remove
mcp_server.py
- Update MCP configuration in Docker setup
- Refactor
mcp_service.py
- Update example files
- Fix any broken tests
- Update documentation
Issue Description
We currently have multiple implementations of MCP (Model-Compiler-Processor) functionality spread across several files in the codebase, causing confusion, maintenance overhead, and potential inconsistencies. The main MCP implementation should be consolidated in mcp_tools.py, which already contains the most up-to-date implementation.
Problem
mcp_server.pyis marked as deprecated but still remains in the codebase, providing redundant functionalitymcp_service.pycontains business logic that could be refactored to work with the unified MCP implementationProposed Solution
mcp_server.pycompletely, as noted in its own header comment: "DEPRECATED: This file is deprecated. All MCP functionality has been moved toapp/mcp_tools.py."docker-compose.ymland other configuration files to use only the MCP implementation frommcp_tools.pymcp_service.pyto be used bymcp_tools.pywithout duplicating the MCP server setupmcp_tools.pywork with both the CLI and the API endpointsBenefits
Implementation Details
Key files that need updates:
mcp_tools.py- Ensure it fully supports all required functionalitymcp_service.py- Refactor business logic to work with the new structurerun_mcp_server.py- Update to use the mcp_tools implementationmcp_client_example.py- Ensure it works with the consolidated implementationmcp-proxy-config.json- Update to reference the correct endpointsRelated Components
This change affects:
Acceptance Criteria
mcp_tools.pyTasks
mcp_server.pymcp_service.py