Open SourceApache-2.0 License

badgr-mcp

MCP server that lets Claude, Cursor, Copilot, or any MCP-compatible coding agent provision GPU jobs and model endpoints directly from the editor.

How it works

badgr-mcp exposes GPU provisioning as MCP tools, so your coding agent can serve a model or run a job without you leaving the editor.

1

Add to your MCP config

Point your agent's MCP config at npx badgr-mcp with a BADGR_API_KEY environment variable.

2

Agent calls a tool

Your agent calls badgr_serve or badgr_run directly and gets back a deployment_id plus an endpoint or logs URL.

3

Stop when done

The agent calls badgr_down to terminate the deployment and stop billing immediately.

1

Install

Terminal
npx badgr-mcp

Requires Node.js 18+, a Badgr API key (sign up at aibadgr.com), and an MCP-compatible coding agent.

2

Usage

Add badgr-mcp to your MCP client config (Claude, Cursor, Copilot, or any MCP-compatible tool):

MCP config (JSON)
{
  "mcpServers": {
    "badgr": {
      "command": "npx",
      "args": ["badgr-mcp"],
      "env": {
        "BADGR_API_KEY": "your-api-key"
      }
    }
  }
}

Example output

Example agent workflow
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" }

What's included

badgr_serve — start a persistent OpenAI-compatible endpoint for any HuggingFace model
badgr_run — run a one-off container command on a GPU, torn down automatically on completion
badgr_status — list active deployments with IDs, models, GPUs, status, and cost
badgr_logs — fetch deployment log output
badgr_down — stop a deployment and halt billing immediately
BADGR_MAX_PRICE and BADGR_MAX_RUNTIME server-enforced safety limits regardless of what the agent requests
Works with Claude, Cursor, Copilot, or any MCP-compatible coding agent
Configurable BADGR_BASE_URL for self-hosted or private API endpoints
View on GitHub →

Ready to try badgr-mcp?

npx badgr-mcp — no account needed to get started.