Badgr — GPU Compute for AI Agents Copy
OfficialAllows launching autonomous agent jobs on GitHub repositories, with status, cost, output, receipt, and recent logs available through task checks.
badgr-mcp
MCP server that lets coding agents provision GPU jobs and model endpoints — directly from Claude, Cursor, Copilot, or any MCP-compatible tool.
npx badgr-mcpThe problem it solves
Running a GPU workload normally means switching to a terminal, writing a CLI command, waiting, and copying an endpoint URL back into your editor. badgr-mcp removes all of that — your coding agent calls badgr_serve or badgr_run directly, gets the endpoint URL back, and keeps working without you leaving the editor.
Related MCP server: gpu-broker-mcp
Quick start
1. Get a Badgr API key at aibadgr.com
2. Add to your MCP config:
{
"mcpServers": {
"badgr": {
"command": "npx",
"args": ["badgr-mcp"],
"env": {
"BADGR_API_KEY": "your-api-key"
}
}
}
}3. Ask your agent to run a GPU job:
"Serve
meta-llama/Llama-3.1-8B-Instructon a GPU and give me the endpoint URL"
The agent calls badgr_serve, gets back the endpoint URL, and you can start using it immediately.
Available tools
badgr_serve — persistent OpenAI-compatible endpoint
Start a model endpoint that stays up until you stop it or the max runtime is reached.
badgr_serve(
model: string, // HuggingFace model ID
max_runtime_minutes: number, // Auto-stop after N minutes (max: BADGR_MAX_RUNTIME, default 60)
gpu?: string, // L40S | A100 | H100 | RTX_4090 (default: L40S)
gpu_count?: number, // 1–8 GPUs (default: 1)
region?: string, // US | EU | AU (default: US)
max_price_per_hour?: number, // Hard $/hr cap
name?: string // Optional label for the deployment
)Returns: { deployment_id, endpoint_url, openai_base_url, cost_per_hour, max_runtime_minutes }
The openai_base_url is a fully OpenAI-compatible endpoint — drop it into any OpenAI SDK client.
badgr_run — one-off GPU job
Run a container command on a GPU. The job runs, completes, and is torn down automatically.
badgr_run(
command: string[], // Docker command, e.g. ["python", "train.py"]
image?: string, // Docker image (default: python:3.11-slim)
gpu?: string, // RTX_4090 | A100 | L40S | H100 (default: RTX_4090)
gpu_count?: number, // 1–8 GPUs (default: 1)
region?: string,
max_price_per_hour?: number,
name?: string
)Returns: { deployment_id, status, gpu_type, cost_per_hour, logs_url }
badgr_status — list active deployments
badgr_status()Returns: list of active deployments with IDs, models, GPUs, status, and cost.
badgr_logs — fetch deployment logs
badgr_logs(deployment_id: string)Returns: { lines: string[], log_text: string }
badgr_down — stop a deployment
badgr_down(deployment_id: string)Terminates the deployment and stops billing immediately.
Returns: { status, message } — always call this when done.
Smithery tool names
The server also exposes tools used for registry listings (the first three are aliases or helpers for Run and Serve, the next three cover the AI API and Launch products):
Tool | Behavior |
| Same as |
| Same as |
|
|
| Launches an autonomous agent job on a GitHub repository, verified by your |
|
|
|
|
Call badgr_down when a deployment is finished so billing stops.
Hosted HTTP mode
node src/server.js --http (or set PORT) serves the same tools at POST /mcp over streamable HTTP, with GET /health. Every request must carry Authorization: Bearer <Badgr API key>; the server uses that caller's key for Badgr calls, so a shared host never spends someone else's credits. The server never falls back to a BADGR_API_KEY env var in this mode, so an unauthenticated caller cannot spend the host's credits. Each request is stateless. Put TLS in front of it.
Publishing to Smithery
smithery.yaml and Dockerfile in this folder describe a stdio deployment. In Smithery, connect the GitHub repo and set the base directory to packages/badgr-mcp. Users supply badgrApiKey (plus optional price cap, runtime cap and base URL) as Smithery config, which maps to the environment variables below. Publishing on Smithery is a manual step done from a Smithery account. The smithery.yaml here describes the stdio deployment; whether Smithery's current flow wants that or the hosted HTTP mode above was not verified.
Environment variables
Variable | Required | Default | Description |
| Yes | — | Your Badgr API key from aibadgr.com |
| No |
| API endpoint override |
| No |
| Hard $/hr cap applied to all jobs |
| No |
| Max minutes for |
| No |
| Hard USD cap on one |
BADGR_MAX_PRICE and BADGR_MAX_RUNTIME are safety limits — the server enforces these regardless of what the agent requests.
Example agent workflow
Serve a model and use it:
Agent: badgr_serve("meta-llama/Llama-3.1-8B-Instruct", max_runtime_minutes=30)
← { deployment_id: "dep-abc123", openai_base_url: "https://dep-abc123.aibadgr.com/v1", cost_per_hour: 1.20 }
Agent: [uses openai_base_url to run inference]
Agent: badgr_down("dep-abc123")
← { status: "terminated", message: "Billing stopped" }Run a fine-tuning job:
Agent: badgr_run(["python", "train.py"], gpu="A100", image="pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime")
← { deployment_id: "dep-xyz789", status: "running", logs_url: "..." }
Agent: badgr_logs("dep-xyz789")
← { log_text: "Epoch 1/10: loss=2.34..." }Requirements
Node.js 18+
A Badgr API key — sign up at aibadgr.com
An MCP-compatible coding agent (Claude, Cursor, Copilot, or any client that supports MCP)
Available Tools
11 toolsai_chatB
Call the Badgr AI API (OpenAI-compatible chat completion) and return the reply with token usage. max_tokens is capped at 4096 per call. Usage is metered.
Inputs: model (required), messages (required), max_tokens, temperature.
badgr_downB
Terminate a Badgr deployment and stop billing.
Inputs: deployment_id (required).
badgr_logsC
Fetch logs for a Badgr deployment.
Inputs: deployment_id (required).
badgr_runA
Run a one-off GPU job via Badgr. Returns deployment_id, status, receipt_id, logs_url. Hard limits: max_price_per_hour ≤ $5/hr. Always confirm with the user before running jobs that cost > $1/hr.
Inputs: gpu, name, image, region, +3 more.
badgr_serveA
Provision a persistent OpenAI-compatible endpoint for an LLM model. Returns endpoint_url, deployment_id, receipt_id. The endpoint stays up (billing runs) until badgr_down is called. Hard limits: max_price_per_hour ≤ $5/hr. max_runtime_minutes is REQUIRED — agents must not create open-ended billing. Always confirm with the user before serving.
Inputs: model (required), max_runtime_minutes (required), gpu, name, +3 more.
badgr_statusA
List active Badgr GPU deployments for this account.
Inputs: no named parameters.
check_launch_taskB
Check an agent task started with launch_agent_task: status, cost so far, verification output, receipt and recent log lines.
Inputs: job_id (required), log_lines.
check_resultA
Check the state of one Badgr deployment and fetch its most recent log lines. Use after run_workload or deploy_model, with the returned deployment_id. Call badgr_down when the deployment is finished so billing stops.
Inputs: deployment_id (required), log_lines.
deploy_modelA
Provision a persistent OpenAI-compatible endpoint for an LLM model. Returns endpoint_url, deployment_id, receipt_id. The endpoint stays up (billing runs) until badgr_down is called. Hard limits: max_price_per_hour ≤ $5/hr. max_runtime_minutes is REQUIRED — agents must not create open-ended billing. Always confirm with the user before serving.
Inputs: model (required), max_runtime_minutes (required), gpu, name, +3 more.
launch_agent_taskA
Launch an autonomous coding agent on a GitHub repository. The job is verified by running check. max_cost is REQUIRED (hard limit $5); max_runtime_minutes is REQUIRED (limit 60). Returns a job_id: poll with check_launch_task, and read the receipt when it finishes. Always confirm with the user before launching.
Inputs: check (required), max_cost (required), repository (required), instruction (required), +2 more.
run_workloadA
Run a one-off GPU job via Badgr. Returns deployment_id, status, receipt_id, logs_url. Hard limits: max_price_per_hour ≤ $5/hr. Always confirm with the user before running jobs that cost > $1/hr.
Inputs: gpu, name, image, region, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The set contains exact duplicate purposes: badgr_run and run_workload both run a one-off GPU job with identical descriptions, and badgr_serve and deploy_model both provision a persistent endpoint identically. badgr_status and check_result also overlap on deployment state inspection, making misselection highly likely.
Naming mixes a badgr_ prefix (badgr_run, badgr_status, badgr_logs) with unrelated generic verb_noun names (run_workload, deploy_model, check_result) and an unaffixed ai_chat. The duplication across naming schemes makes the surface feel inconsistent rather than deliberately organized.
Eleven tools is a reasonable raw count for the GPU compute domain, but two pairs are exact duplicates, so the effective surface is smaller and the count overstates the real capability. The set would be better scoped if duplicates were removed.
The lifecycle is broadly covered: run jobs, serve endpoints, check status/logs, tear down billing, call chat, and launch/check autonomous agent tasks. Minor gaps exist around pricing/model discovery or richer cost inspection, but core workflows are reachable.
Maintenance
Related MCP Connectors
ComputePortal marketplace: AI agents find, deploy and manage GPU and CPU compute through MCP.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
AI cloud for agents: launch GPUs, run jobs that stop their own billing, schedule runs.
HiveCompute MCP Server — decentralized inference router for AI agents
Related MCP Servers
- AlicenseAqualityCmaintenanceJungle Grid MCP Server lets AI agents submit, estimate, monitor, and retrieve logs for GPU workloads through Jungle Grid. It enables agentic execution for inference, training, fine-tuning, and batch jobs without manually choosing GPU providers or infrastructure.828 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover, reserve, and dispatch inference to GPU nodes via MCP tools, using signed handles for stateless reservation management.Apache 2.0
- AlicenseBqualityBmaintenanceZero-quota GPU orchestration MCP server — lets AI agents discover, provision, and manage GPU compute across multi-datacenter partner nodes (H100/H200/B200) through a single control plane.499 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to submit GPU job requests, select eligible workers, track execution, and retrieve results via MCP.1421MIT