Phase 1 & 2 Complete: The Wildeditor MCP Server is fully functional and ready for production deployment.
- Full MCP protocol implementation (JSON-RPC 2.0)
- Production-grade FastAPI application
- Multi-key authentication system
- Environment configuration management
- Comprehensive error handling
- analyze_region: Deep analysis of wilderness regions
- find_path: Pathfinding between regions
- search_regions: Advanced region search with filters
- create_region: New region creation with validation
- validate_connections: Connection consistency checking
- terrain-types: Complete reference of available terrains
- environment-types: Climate and environmental conditions
- region-stats: Real-time system statistics
- schema: Database structure documentation
- capabilities: System feature overview
- map-overview: Wilderness structure information
- create_region: Rich, atmospheric region descriptions
- connect_regions: Logical path and transition generation
- design_area: Multi-region wilderness area planning
- analyze_region: Expert analysis and improvement suggestions
- describe_path: Detailed travel descriptions
Deploy MCP server alongside backend using Docker Compose:
# docker-compose.yml
version: '3.8'
services:
backend:
build: ./apps/backend
ports:
- "8000:8000"
environment:
- WILDEDITOR_API_KEY=${WILDEDITOR_API_KEY}
- WILDEDITOR_MCP_BACKEND_KEY=${WILDEDITOR_MCP_BACKEND_KEY}
mcp-server:
build: ./apps/mcp
ports:
- "8001:8001"
environment:
- WILDEDITOR_MCP_KEY=${WILDEDITOR_MCP_KEY}
- WILDEDITOR_MCP_BACKEND_KEY=${WILDEDITOR_MCP_BACKEND_KEY}
- WILDEDITOR_BACKEND_URL=http://backend:8000
depends_on:
- backend
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- backend
- mcp-serverRun MCP server locally while connecting to remote backend:
# Set environment variables
export WILDEDITOR_MCP_KEY="your-mcp-key"
export WILDEDITOR_MCP_BACKEND_KEY="your-backend-access-key"
export WILDEDITOR_BACKEND_URL="https://your-backend-server.com"
# Start MCP server
cd apps/mcp
python run_dev.py# Backend API access (for direct backend operations)
WILDEDITOR_API_KEY="backend-api-key-here"
# MCP operations (for AI agents using MCP server)
WILDEDITOR_MCP_KEY="mcp-operations-key-here"
# MCP-to-Backend access (for MCP server calling backend)
WILDEDITOR_MCP_BACKEND_KEY="mcp-backend-access-key-here"- Generate unique, strong keys for each type
- Rotate keys regularly
- Use different keys for development/staging/production
- Store keys securely (environment variables, secrets management)
GET /health- Server health check
GET /mcp/status- Server status and capabilitiesPOST /mcp/initialize- Initialize MCP sessionPOST /mcp/request- Raw MCP JSON-RPC requestsGET /mcp/tools- List available toolsGET /mcp/resources- List available resourcesGET /mcp/prompts- List available prompts
POST /mcp/tools/{tool_name}- Call specific toolGET /mcp/resources/{resource_uri}- Read specific resourcePOST /mcp/prompts/{prompt_name}- Get specific prompt
// Analyze a region
POST /mcp/tools/analyze_region
{
"region_id": 123,
"include_paths": true
}
// Search for forest regions
POST /mcp/tools/search_regions
{
"terrain_type": "forest",
"environment": "temperate",
"limit": 10
}
// Create new region
POST /mcp/tools/create_region
{
"name": "Whispering Woods",
"description": "A mysterious forest...",
"terrain_type": "forest",
"environment": "temperate"
}// Get terrain types reference
GET /mcp/resources/terrain-types
// Get system capabilities
GET /mcp/resources/capabilities
// Get current statistics
GET /mcp/resources/region-stats// Generate region creation prompt
POST /mcp/prompts/create_region
{
"terrain_type": "mountain",
"environment": "arctic",
"theme": "mysterious",
"size": "large"
}
// Generate area design prompt
POST /mcp/prompts/design_area
{
"area_theme": "haunted forest",
"size": 8,
"difficulty": "hard"
}# Public health check
curl http://localhost:8001/health
# Authenticated health check
curl -H "X-API-Key: your-mcp-key" http://localhost:8001/health/detailed# Test tool availability
curl -H "X-API-Key: your-mcp-key" http://localhost:8001/mcp/tools
# Test resource access
curl -H "X-API-Key: your-mcp-key" http://localhost:8001/mcp/resources
# Test backend connectivity (will show errors if backend not available)
curl -H "X-API-Key: your-mcp-key" -H "Content-Type: application/json" \
-d '{"region_id": 1}' http://localhost:8001/mcp/tools/analyze_regionThe MCP server expects these backend endpoints to exist:
GET /api/regions/{id} - Get region by ID
GET /api/regions/{id}/paths - Get region paths
GET /api/paths/find - Find paths between regions
GET /api/regions/search - Search regions
POST /api/regions - Create new region
GET /api/regions/{id}/validate - Validate region connections
GET /api/stats/regions - Get region statistics
GET /api/regions/recent - Get recently modified regions
GET /api/map/overview - Get map overview
The MCP server uses WILDEDITOR_MCP_BACKEND_KEY in the X-API-Key header when calling backend endpoints.
-
Authentication Failures
- Verify environment variables are set correctly
- Check API key format and validity
- Ensure correct key type for endpoint
-
Backend Connection Issues
- Check WILDEDITOR_BACKEND_URL setting
- Verify backend is running and accessible
- Check backend authentication key
-
Import Errors
- Ensure virtual environment is activated
- Install packages:
pip install -r requirements.txt - Install auth package:
pip install -e packages/auth
# Start with debug logging
export WILDEDITOR_LOG_LEVEL=DEBUG
python apps/mcp/run_dev.pyThe MCP server is ready for:
- Production Deployment: Deploy alongside existing backend
- AI Agent Integration: Connect Claude, GPT, or other AI systems
- Backend Integration: Connect to live Wildeditor backend API
- Content Generation: Use prompts to generate wilderness content
- Automated Workflows: Build AI-powered wilderness management tools
The Wildeditor MCP Server is production-ready and provides a full suite of AI-powered wilderness management capabilities! 🎉