Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.13.0
ArchFlow MCP Server - Deployment Guide
π― MCP Protocol Compliance
Protocol Version: 2024-11-05 (Current)
Validation Status: β
Core functionality validated
Last Updated: 2025-12-01
π Top 3 MCP Server Issues - Resolution Status
β 1. Protocol Version Format
Issue: MCP requires string-based version identifiers in YYYY-MM-DD format
Status: RESOLVED
Implementation:
- Protocol version:
2024-11-05(current as of Dec 2025) - Version format validated in
mcp_validation.py - Version declaration added to server initialization
Validation:
python mcp_validation.py
# β
Protocol version format valid: 2024-11-05
# β
Using current protocol version (2024-11-05)
β 2. Required MCP Methods
Issue: Servers MUST implement tools/list, tools/call, resources/list, resources/read
Status: IMPLEMENTED
Implementation:
- β
@server.list_tools()- Lists 3 available tools - β
@server.call_tool()- Executes tool calls - β
@server.list_resources()- Lists 3 resources - β
@server.read_resource()- Reads resource content
Available Tools:
analyze_project- Detect over-engineering patternsget_pattern_advice- Get detailed pattern adviceestimate_costs- Estimate technology costs
Available Resources:
archflow://patterns/anti-patterns- Anti-pattern databasearchflow://patterns/good-practices- Good practices databasearchflow://knowledge/deep-dives- Knowledge base
Validation:
python test_mcp_server.py
# β
Server instance found
# β
App integration working
# β
Pattern detection working
β 3. Runtime Environment
Issue: MCP needs correct runtime (Python 3.10+, MCP SDK, dependencies)
Status: CONFIGURED
Requirements:
- β Python 3.11.9 (meets 3.10+ requirement)
- β MCP SDK installed
- β
mcp.servermodule available - β
stdio_servertransport available - β
ArchFlow
app.pyfunctions accessible
Installation:
# Install MCP SDK
pip install mcp
# Verify installation
python test_mcp_server.py
π Deployment Checklist
Pre-Deployment Validation
- Protocol version validated (2024-11-05)
- Required methods implemented (tools/list, tools/call, resources/*)
- Runtime environment configured (Python 3.11+, MCP SDK)
- App integration tested (pattern detection working)
- Manual tests passing (test_mcp_server.py)
Deployment Steps
1. Local Testing
# Run validation suite
python mcp_validation.py
# Run manual tests
python test_mcp_server.py
# Test server startup
python mcp_server.py
2. Configuration File
Create mcp_config.json for clients:
{
"mcpServers": {
"archflow": {
"type": "stdio",
"command": "python",
"args": ["mcp_server.py"],
"cwd": ".",
"env": {}
}
}
}
3. GitHub/Hugging Face Deployment
# Stage changes
git add mcp_server.py mcp_validation.py test_mcp_server.py MCP_DEPLOYMENT_GUIDE.md
# Commit
git commit -m "Add MCP server validation and deployment guide"
# Push to Hugging Face Space
git push
4. Client Integration Testing
Test with MCP-compatible clients:
- Claude Desktop - Configure in
claude_desktop_config.json - MCP Inspector - Use for interactive testing
- Custom clients - Use Python or TypeScript MCP SDK
π§ͺ Validation Scripts
mcp_validation.py
Comprehensive validation against MCP specification:
- β Protocol version format (YYYY-MM-DD)
- β Required methods implementation
- β Initialization options
- β Runtime environment
Usage:
python mcp_validation.py
# Generates: MCP_VALIDATION_REPORT.json
test_mcp_server.py
Manual functionality tests:
- Server import and initialization
- Handler registration
- App integration
- Pattern detection
Usage:
python test_mcp_server.py
π Validation Results
Current Status: β READY FOR DEPLOYMENT
| Check | Status | Details |
|---|---|---|
| Protocol Version | β PASS | 2024-11-05 (current) |
| Required Methods | β PASS | All 4 methods implemented |
| Initialization | β PASS | Proper InitializationOptions |
| Runtime Environment | β PASS | Python 3.11.9, MCP SDK installed |
| App Integration | β PASS | 27 patterns loaded, detection working |
π§ Troubleshooting
Issue: "MCP SDK not found"
Solution:
pip install mcp
Issue: "Cannot import from app.py"
Solution:
# Ensure you're in the correct directory
cd C:\Users\tuncl\Documents\ArchFlow-MCP-Hackathon\archflow-mcp-space
python test_mcp_server.py
Issue: "Server not responding"
Diagnosis:
- Check server logs (stderr)
- Verify protocol version compatibility
- Test with MCP Inspector
- Check client configuration
Common fixes:
- Use absolute paths in client config
- Ensure Python is in PATH
- Verify MCP SDK version compatibility
π References
- MCP Specification: https://spec.modelcontextprotocol.io/specification/2024-11-05/
- MCP GitHub: https://github.com/modelcontextprotocol/
- Python SDK: https://github.com/modelcontextprotocol/python-sdk
- Protocol Version: 2024-11-05 (current)
π Next Steps
- β Validation Complete - All checks passing
- β Documentation Complete - Deployment guide ready
- π Deploy to Hugging Face - Push validated changes
- π§ͺ Test with Clients - Claude Desktop, MCP Inspector
- π’ Share with Community - Publish to MCP registry
Status: π’ PRODUCTION READY
Protocol: β
2024-11-05 Compliant
Validation: β
All tests passing