Fix: Correct MCPServerConfig import to resolve Docker container crash#20
Fix: Correct MCPServerConfig import to resolve Docker container crash#20RichardAtCT merged 3 commits intomainfrom
Conversation
Fixes #19 The application was attempting to import MCPServerConfig from src.models, but it's actually defined in src.mcp_client as a dataclass. Updated the import statement to import from the correct module. Changes: - Remove MCPServerConfig from src.models import - Add MCPServerConfig to src.mcp_client import
|
Claude finished @RichardAtCT's task —— View job PR Review: Fix MCPServerConfig Import Error ✅Import fix successfully resolves Docker container crash Todo List:
✅ Review Summary: APPROVEDThis PR correctly fixes the ImportError that was causing Docker container crashes. The changes are minimal, focused, and address the root cause without introducing any side effects. 📋 Code Quality Assessment✅ Import Fix is Correct
✅ Changes Are Minimal and Safe
✅ No Additional Issues Found
🔒 Security Review
⚡ Performance Considerations
🧪 Test Coverage
📝 Additional Recommendations
🎯 ConclusionThis is an excellent, focused fix that:
Recommendation: APPROVE and MERGE - This fix is ready for production deployment. |
Also fixes import issue that would cause container to crash after the MCPServerConfig fix. The import was missing the src. prefix.
|
Claude finished @RichardAtCT's task —— View job Claude Code is analyzing the PR... PR Review: Import Fix AnalysisTodo List:
✅ PR Review Complete: Import Fixes ApprovedThis PR contains two critical import fixes that resolve Docker container startup crashes. Both changes are minimal, correct, and necessary. 📋 Summary of ChangesFile 1: src/main.py (
|
Fixes incorrect parameter usage in rate_limit_endpoint decorators.
The decorator expects an endpoint category string (e.g., "general",
"chat") but was being called with numeric limit= parameters.
Changes:
- Replace @rate_limit_endpoint(limit=X) with @rate_limit_endpoint("general")
- Affects 9 endpoints: /v1/tools/* and /v1/mcp/* endpoints
- Also includes the tool_manager.py constants import fix
All import and decorator issues are now resolved. Docker container
starts successfully and all endpoints are properly configured.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |

Summary
MCPServerConfigfromsrc.mcp_clientinstead ofsrc.modelsProblem
The application was attempting to import
MCPServerConfigfromsrc.models, but it's actually defined insrc.mcp_client.pyas a dataclass (lines 28-37). This caused the Docker container to crash on startup with:Solution
Updated
src/main.pyto:MCPServerConfigfrom thesrc.modelsimport statement (line 35)MCPServerConfigto thesrc.mcp_clientimport (line 42)Changes
src/main.pyimports onlyTest plan