- FastAPI backend with SQLite (ai.db) - Tables: skills, snippets, conventions, cache, memory - MCP servers: homelab, gameservers, skills - Docker Compose setup - Seed data with 8 skills, 2 conventions, 2 snippets - Token savings patterns via context bundles and caching
2.6 KiB
2.6 KiB
MCP Server Configuration
Running MCP Servers
Option 1: Directly with Python
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):
{
"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 statuslist_containers- List all containersstart_container- Start a containerstop_container- Stop a containerrestart_container- Restart a containercontainer_logs- Get container logssystem_resources- Get CPU/memory/disk usagerun_command- Run shell command (use carefully)docker_compose_action- Run docker-compose actions
gameservers
list_servers- List all game serversget_server_config- Get server configupdate_server_config- Update server configserver_status- Get server statusstart_server- Start a game serverstop_server- Stop a game serverget_server_logs- Get server logscreate_server- Create new game serverdelete_server- Delete a game serverget_templates- Get available templates
skills
get_skill- Get skill by IDsearch_skills- Search skillslist_skills- List skillsget_context- Get context bundleget_conventions- Get conventionsget_snippets- Get snippetscheck_cache- Check response cacheget_memory- Get project memoryadd_memory- Add project memorycreate_skill- Create new skill
Token Savings Pattern
When using agents:
- Before asking: Call
skills/check_cachewith your prompt - If cached: Use the cached response directly
- If not cached: Call
skills/get_contextto inject relevant skills/conventions - After response: Optionally call
skills/add_memoryto save important decisions
This pattern avoids:
- Re-sending your coding standards every request
- Re-explaining project architecture
- Re-asking questions you've asked before