# CLAUDE.md - Guide for AI Coding Agents ## Project Overview Nomad MCP is a service that enables management of HashiCorp Nomad jobs via REST API, with Claude AI integration. ## Commands - **Run server**: `uvicorn app.main:app --reload --host 0.0.0.0 --port 8000` - **Tests**: `pytest` (all) or `pytest tests/test_nomad_service.py::test_job_lifecycle` (single) - **Build docker**: `docker build -t nomad-mcp .` - **Run docker**: `docker-compose up -d` ## Code Style - **Imports**: Standard library → Third-party → Local modules (alphabetically) - **Type annotations**: Required for all function parameters and returns - **Error handling**: Use try/except with proper logging and HTTP exceptions - **Logging**: Use Python's logging module with appropriate levels - **API responses**: Return consistent JSON structures with Pydantic models - **Docstrings**: Required for all functions and classes - **Variables**: snake_case for variables, CamelCase for classes ## Structure - `/app`: Main code (/routers, /schemas, /services) - `/configs`: Configuration files - `/static`: Frontend assets - `/tests`: Test files Always maintain backward compatibility with existing API endpoints. Follow REST principles.