Skip to content

OpenAI fine-tuning takes no new jobs from January 6, 2027. Move your fine-tunes

Docs

Gridline MCP server

Gridline's MCP server gives Claude Code, Cursor, Claude Desktop and any other MCP client tools to fine-tune, distill, evaluate and batch open models on Gridline. There are no GPUs or containers to manage.

Overview

The server is the npm package @gridlinegpu/mcp. It runs on your machine over stdio as gridline-mcp and needs Node.js 18 or later. Each tool wraps one route of the Gridline API, an OpenAI-compatible API at:

https://api.gridlinegpu.com/openai/v1

The agent quickstart walks through a full loop (fine-tune, evaluate against the base, batch on the winner) and shows the same calls over plain HTTP. The OpenAPI 3.1 spec describes every documented route.

Install

Claude Code, for every project:

claude mcp add gridline --scope user -- npx -y @gridlinegpu/mcp

Leave out --scope user to add it to the current project only. Check it with claude mcp list.

Cursor, Claude Desktop and any other client that reads an mcpServers config:

{
  "mcpServers": {
    "gridline": {
      "command": "npx",
      "args": ["-y", "@gridlinegpu/mcp"],
      "env": { "GRIDLINE_TOKEN": "<your Gridline API key>" }
    }
  }
}

The env block is optional. To start the server by hand:

npx -y @gridlinegpu/mcp

Logging in

The server looks for an API key in this order:

  1. GRIDLINE_TOKEN, if set.
  2. The private key file that gridline login (the Python SDK, pip install gridlinegpu) or the server's own login saved.
  3. Otherwise tools answer not_logged_in. The agent then calls login, which shows you a link and a code: sign in or sign up, check the code and click Approve. With no browser, signup creates an account and email_login gets a key for an existing one from an emailed code.

The key stays on your machine. The server sends it only to Gridline's API as the bearer token, never prints it and never returns it in a tool result.

Spending credit

Four tools spend credit: create_fine_tune, create_eval_run and create_distillation (unless dry_run is true), and create_batch. Each refuses, and sends nothing, unless the call carries confirm_spend: true, so the agent has to read the quote or the price first. Every other tool is free. Prices are on the pricing page.

Tools

ToolSpends creditWhat it does
list_modelsNoBase models you can batch or fine-tune on, and your ft: models.
get_credit_balanceNoYour credit balance and recent charges.
upload_fileNoUpload a local JSONL file (purpose fine-tune or batch).
create_fine_tuneYesStart a LoRA, QLoRA or DPO fine-tuning job, or quote it with dry_run.
list_fine_tunesNoYour fine-tuning jobs.
get_fine_tuneNoA job's status, its quote and its ft: model once it succeeds.
list_fine_tune_eventsNoA job's progress and loss.
cancel_fine_tuneNoCancel a fine-tuning job.
create_batchYesRun a batch on a base model or your ft: model.
get_batchNoA batch's status, counts and output file ids.
cancel_batchNoCancel a batch.
download_resultsNoSave a batch's output or error file to a local path.
create_evalNoDefine an eval: its item schema and graders.
create_eval_runYesRun an eval, or quote it with dry_run.
get_eval_runNoA run's status and per-grader results.
list_output_itemsNoA run's graded rows.
create_distillationYesRun a one-call distillation job (teacher, student, prompt baking), or quote it with dry_run.
list_distillationsNoYour distillation jobs.
get_distillationNoA job's status, stage, costs and its ft: model once it succeeds.
list_distillation_eventsNoA job's stage events.
cancel_distillationNoCancel a distillation job and its current stage.
request_merged_weightsNoExport an ft: model merged into its base.
get_merged_weightsNoA merged-weights export's status and files.
get_merged_file_urlNoA short-lived download URL for one merged file.

Account tools

These manage the account and its key. None of them spends credit.

ToolWhat it does
loginLog in through your browser when no key is set: shows a link and a one-time code.
signupCreate a Gridline account and its key with no browser, after you accept the terms.
email_loginGet a key for an existing account from a code emailed to you.
verify_emailVerify the account's email with the 6-digit code Gridline sends.
add_creditGet a card checkout link you pay once, or a USDC request when that is open.
claim_free_creditClaim the starter credit, while it lasts.
list_keysList your keys, with an emailed code.
revoke_keyRevoke the server's own key, or another key with an emailed code.

Closing the account is not available to agents: you do it in the dashboard.

Contact us

Building something, stuck on a job, or want to share feedback? A couple of lines is enough.

What's it about? (optional)

A person on our team reads every message and replies by email. Prefer to talk? Book a call