# MCP Server Configuration ## Running MCP Servers ### Option 1: Directly with Python ```bash cd mcp pip install -r requirements.txt python homelab.py ``` ### Option 2: Via Claude Desktop Config Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows): ```json { "mcpServers": { "homelab": { "command": "python", "args": ["/path/to/ai-skills-api/mcp/homelab.py"], "env": { "DOCKER_HOST": "unix:///var/run/docker.sock" } }, "gameservers": { "command": "python", "args": ["/path/to/ai-skills-api/mcp/gameservers.py"], "env": { "GAME_SERVERS_DIR": "/opt/game-servers" } }, "skills": { "command": "python", "args": ["/path/to/ai-skills-api/mcp/skills.py"], "env": { "SKILLS_API_URL": "http://localhost:8080" } } } } ``` ## Available Tools ### homelab - `container_status` - Get Docker container status - `list_containers` - List all containers - `start_container` - Start a container - `stop_container` - Stop a container - `restart_container` - Restart a container - `container_logs` - Get container logs - `system_resources` - Get CPU/memory/disk usage - `run_command` - Run shell command (use carefully) - `docker_compose_action` - Run docker-compose actions ### gameservers - `list_servers` - List all game servers - `get_server_config` - Get server config - `update_server_config` - Update server config - `server_status` - Get server status - `start_server` - Start a game server - `stop_server` - Stop a game server - `get_server_logs` - Get server logs - `create_server` - Create new game server - `delete_server` - Delete a game server - `get_templates` - Get available templates ### skills - `get_skill` - Get skill by ID - `search_skills` - Search skills - `list_skills` - List skills - `get_context` - Get context bundle - `get_conventions` - Get conventions - `get_snippets` - Get snippets - `check_cache` - Check response cache - `get_memory` - Get project memory - `add_memory` - Add project memory - `create_skill` - Create new skill ## Token Savings Pattern When using agents: 1. **Before asking**: Call `skills/check_cache` with your prompt 2. **If cached**: Use the cached response directly 3. **If not cached**: Call `skills/get_context` to inject relevant skills/conventions 4. **After response**: Optionally call `skills/add_memory` to save important decisions This pattern avoids: - Re-sending your coding standards every request - Re-explaining project architecture - Re-asking questions you've asked before