2.7 KiB
2.7 KiB
Nomad MCP - Quick Start Guide
This guide will help you quickly set up and start using the Nomad MCP service for managing Nomad jobs.
1. Installation
Clone the Repository
git clone https://github.com/your-org/nomad-mcp.git
cd nomad-mcp
Install Dependencies
pip install -r requirements.txt
2. Configuration
Set Up Environment Variables
Create a .env
file in the project root:
# Nomad connection settings
NOMAD_ADDR=http://your-nomad-server:4646
NOMAD_TOKEN=your-nomad-token
NOMAD_NAMESPACE=development
NOMAD_SKIP_VERIFY=true
# API settings
PORT=8000
HOST=0.0.0.0
# Logging level
LOG_LEVEL=INFO
Replace your-nomad-server
and your-nomad-token
with your actual Nomad server address and token.
3. Start the Service
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The service will be available at http://localhost:8000
.
4. Access the Web UI
Open your browser and navigate to:
http://localhost:8000
You should see the Nomad Job Manager UI with a list of jobs in your default namespace.
5. Basic Operations
View Jobs
- Select a namespace from the dropdown in the header
- Browse the list of jobs with their statuses
Manage a Job
- Click the "View" button next to a job to see its details
- Use the "Restart" button to restart a job
- Use the "Stop" button to stop a job
View Logs
- Select a job to view its details
- Scroll down to the "Logs" section
- Switch between stdout and stderr using the tabs
6. API Usage
List Jobs
curl http://localhost:8000/api/claude/list-jobs?namespace=development
Get Job Status
curl -X POST http://localhost:8000/api/claude/jobs \
-H "Content-Type: application/json" \
-d '{"job_id": "example-job", "action": "status", "namespace": "development"}'
Stop a Job
curl -X POST http://localhost:8000/api/claude/jobs \
-H "Content-Type: application/json" \
-d '{"job_id": "example-job", "action": "stop", "namespace": "development", "purge": false}'
7. Claude AI Integration
To set up Claude AI integration:
- Configure Claude with the provided
claude_nomad_tool.json
file - Update the URLs in the configuration to point to your Nomad MCP service
- Use natural language to ask Claude to manage your Nomad jobs
Example prompt for Claude:
Please list all jobs in the development namespace using the Nomad MCP service.
Next Steps
- Read the full README.md for detailed information
- Check out the User Guide for the web UI
- Explore the Claude API Integration Documentation for AI integration
- Review the API documentation at
http://localhost:8000/docs