Skip to main content

krauncher-mcp

An MCP server that gives an agent one tool: a pre-run cost estimate for a GPU task, from static analysis of the code. The code is never executed.

It wraps the Krauncher analyzer (the assay), not the broker — there is no dispatch, no execution, no market lineup. Just: how long will this cost, and what does it need to run.

The seconds are a relative signal for comparing code against code, not an absolute forecast. They are normalized to a fixed reference card (RTX PRO 6000 WS) so two estimates are comparable; the GPU and host your code actually runs on will differ, so never read a second-count as the wall-clock you will get. Compare variant-to-variant. This is an early 0.x release — the model is approximate and evolving.

The estimate tool

Input: code — the task's Python source (a self-contained function; a @client.task-decorated function is fine).

Output, on the reference card (RTX PRO 6000 WS, the card CU is normalized to):

{
  "reference_card": "RTX PRO 6000 WS",
  "compute_sec": 20.2,      // the three phases of wall time on the ref card
  "setup_sec": 3.0,
  "io_sec": 2.1,
  "min_vram_gb": 6,         // raw requirement, no headroom margin
  "min_disk_gb": 10,
  "confidence": 1.0,        // 0-1
  "analysis_method": "ast", // "ast" | "llm"
  "cpu_only": false,
  "findings": [             // what the analyzer read from the code
    "num_epochs=1", "batch_size=16",
    "Recognized model: BERT Base (0.11B params)",
    "precision=fp16 from fp16=True"
  ]
}

The loop it is built for: edit the run → estimate → keep what's cheaper → repeat, all before spending a GPU-second. The estimate is a static forecast, not a guarantee; confidence and analysis_method say how much to trust it, and a rough estimate never blocks — it returns a best effort.

What it does not return: the cost model's calibration coefficients or weights. Only what the analyzer detected in the code leaves the server.

Install

pip install -e .        # from this directory; also installs the analyzer client

The server needs an API key for the analyzer, in the environment:

export CAS_API_KEY=cas_...

Verify it works without wiring up a client — runs estimate on a sample task and prints the contract:

krauncher-mcp --selftest

Wire it into an MCP client

stdio transport; the console script is krauncher-mcp.

{
  "mcpServers": {
    "krauncher-analyzer": {
      "command": "krauncher-mcp",
      "env": { "CAS_API_KEY": "cas_..." }
    }
  }
}

Scope

v1 is deliberately one tool. The per-GPU market lineup is intentionally left out — the agent's job is to improve its code and know the cost before running, and a pre-run estimate (even rough or partial) is the whole point.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

krauncher_mcp-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

krauncher_mcp-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file krauncher_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: krauncher_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for krauncher_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 558abca2597201a4f526fb3cfc63a84d811cbb378892a06af1d2512bc92b2777
MD5 a7056d42712e212ff0ac831fb0c3d733
BLAKE2b-256 e080721767c95d2381431ab991628ae914db12bbd2ffeeeaf807c4862aad016b

See more details on using hashes here.

File details

Details for the file krauncher_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: krauncher_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for krauncher_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d4e1dde9d837de01ffdbfa3f2c7c09713199c8384b3052c3dca0ec2247b7681
MD5 7f1b612b20167440bb7a30767b68896a
BLAKE2b-256 7c0410e4c312a5bda6163954745109e4eb079515734bb301816aadeee0720bce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page