A FastMCP server for managing compute tasks on the Qarnot Computing platform.
The goal was to explore how mcp works and how it can quickly be integrated to claude web through connectors: https://claude.ai/settings/connectors with a starting point of an OpenAPI json (from https://doc.tasq.qarnot.com/documentation/api/)
The test has been made with cloudfare to expose my local container over network tunneling.
Using the Qarnot MCP server with Claude Web:
- List Tasks: View all compute tasks with status and progress
- Get Task Details: Retrieve detailed information about specific tasks
- Submit Tasks: Create and submit new compute tasks
- Get Logs: Retrieve stdout/stderr from task instances
- Abort Tasks: Stop running tasks
- Delete Tasks: Remove tasks from the system
- Profile Management: List and view available computation profiles
git clone https://github.com/your-org/qarnot-mcp.git
cd qarnot-mcp
uv syncpip install -e .Copy the example environment file and configure:
cp .env.example .envAvailable environment variables:
| Variable | Default | Description |
|---|---|---|
QARNOT_BASE_URL |
https://api.qarnot.com |
Qarnot API base URL |
QARNOT_API_VERSION |
1 |
API version |
LOG_LEVEL |
INFO |
Logging level |
# Using uv
uv run python main.py
# Or directly
python main.pyThe server will start on port 8000 with streamable-http transport.
docker compose -f docker-compose.prod.yml up -dFor Claude Web access, use the local configuration with Cloudflare tunnel:
docker compose -f docker-compose.local.yml upThe tunnel URL will be displayed in the cloudflared container logs.
Note: This is a proof of concept — no OAuth flow is implemented. The Qarnot API key is passed directly via env file. In a production setup, consider:
- Adding an OAuth gateway in front of this server that exchanges OAuth tokens for Qarnot API credentials, or
- Working with Qarnot to provide native OAuth support (e.g., OAuth 2.0 / OpenID Connect) so that MCP clients can authenticate without handling raw API keys.
The server requires a Qarnot API key for authentication. Provide it via .env file
List all compute tasks for the authenticated user.
{
"tags": ["optional", "tag", "filter"]
}Get detailed information about a specific task.
{
"task_uuid": "task-uuid-here"
}Submit a new compute task.
{
"name": "My Task",
"profile": "docker-batch",
"instance_count": 4,
"resource_buckets": ["input-bucket"],
"result_bucket": "output-bucket",
"constants": [
{"key": "DOCKER_CMD", "value": "python script.py"}
],
"tags": ["my-project"]
}Get stdout or stderr logs from a task.
{
"task_uuid": "task-uuid-here",
"log_type": "stdout",
"instance_id": 0
}Abort a running task.
{
"task_uuid": "task-uuid-here"
}Delete a task from the system.
{
"task_uuid": "task-uuid-here"
}List available computation profiles.
Get details of a specific profile.
{
"profile_name": "docker-batch"
}uv run pytestuv run pytest --cov=src/qarnot_mcpMIT
