Issue
The build script produced misleading errors indicating a missing MCP directory and non-existent Docker image (name/mcp:latest). This occurred because the script was designed for a standalone MCP microservice architecture, but the actual implementation integrates MCP as a subprocess within the API container, eliminating the need for a separate MCP service or directory.
Culprit
Architectural Mismatch
The script assumed:
- A separate MCP directory (
k3s/mcp/). - A standalone MCP Docker image (
name/mcp:latest). - Independent MCP service deployment.
In reality, the architecture:
- MCP runs as a subprocess via a dedicated server script (
name_mcp_server.py). - Uses JSON-RPC 2.0 over stdin/stdout for communication.
- No separate MCP directory or image exists.
Evidence of Integration
- MCP implementation located in
mcp_integration.pyandname_mcp_server.py. - Tools integrated directly into the API container, including:
find_horseget_user_contextcreate_booking
Solution
Updated Build Script
The build script was revised to:
- Remove MCP directory checks and separate build steps.
- Clarify messaging to reflect the integrated architecture:
echo "Building API server image (with integrated MCP server)..." - Eliminate references to non-existent MCP Docker images.
- Update push instructions to reference only the API image (
name/api:latest).
Architecture Verification
- Confirmed MCP implementation adheres to the FastMCP 1.14.1 specification.
- Verified stdio-based JSON-RPC 2.0 transport between API and MCP subprocess.
- Ensured proper lifecycle management for the MCP subprocess.
Files Modified
- Primary fix:
build-images.shscript to align with integrated architecture. - Documentation: Updated to reflect the current design.
Result: The build process now accurately represents the integrated architecture, eliminating developer confusion about MCP deployment and resolving misleading error messages.