Skip to content

Remove Duplicate MCP Implementations and Consolidate on mcp_tools.py #11

@Acuspeedster

Description

@Acuspeedster

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions