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/v1The 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.
The same server also runs hosted, with nothing to install: see Remote MCP.
Install
Claude Code, for every project:
claude mcp add gridline --scope user -- npx -y @gridlinegpu/mcpLeave 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/mcpLogging in
The server looks for an API key in this order:
GRIDLINE_TOKEN, if set.- The private key file that
gridline login(the Python SDK,pip install gridlinegpu) or the server's own login saved. - Otherwise tools answer
not_logged_in. The agent then callslogin, which shows you a link and a code: sign in or sign up, check the code and click Approve. With no browser,signupcreates an account andemail_logingets 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
| Tool | Spends credit | What it does |
|---|---|---|
list_models | No | Base models you can batch or fine-tune on, and your ft: models. |
get_credit_balance | No | Your credit balance and recent charges. |
upload_file | No | Upload a local JSONL file (purpose fine-tune or batch). |
create_fine_tune | Yes | Start a LoRA, QLoRA or DPO fine-tuning job, or quote it with dry_run. |
list_fine_tunes | No | Your fine-tuning jobs. |
get_fine_tune | No | A job's status, its quote and its ft: model once it succeeds. |
list_fine_tune_events | No | A job's progress and loss. |
cancel_fine_tune | No | Cancel a fine-tuning job. |
create_batch | Yes | Run a batch on a base model or your ft: model. |
get_batch | No | A batch's status, counts and output file ids. |
cancel_batch | No | Cancel a batch. |
download_results | No | Save a batch's output or error file to a local path. |
create_eval | No | Define an eval: its item schema and graders. |
create_eval_run | Yes | Run an eval, or quote it with dry_run. |
get_eval_run | No | A run's status and per-grader results. |
list_output_items | No | A run's graded rows. |
create_distillation | Yes | Run a one-call distillation job (teacher, student, prompt baking), or quote it with dry_run. |
list_distillations | No | Your distillation jobs. |
get_distillation | No | A job's status, stage, costs and its ft: model once it succeeds. |
list_distillation_events | No | A job's stage events. |
cancel_distillation | No | Cancel a distillation job and its current stage. |
request_merged_weights | No | Export an ft: model merged into its base. |
get_merged_weights | No | A merged-weights export's status and files. |
get_merged_file_url | No | A short-lived download URL for one merged file. |
Account tools
These manage the account and its key. None of them spends credit.
| Tool | What it does |
|---|---|
login | Log in through your browser when no key is set: shows a link and a one-time code. |
signup | Create a Gridline account and its key with no browser, after you accept the terms. |
email_login | Get a key for an existing account from a code emailed to you. |
verify_email | Verify the account's email with the 6-digit code Gridline sends. |
add_credit | Get a card checkout link you pay once, or a USDC request when that is open. |
claim_free_credit | Claim the starter credit, while it lasts. |
list_keys | List your keys, with an emailed code. |
revoke_key | Revoke 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.
Remote MCP
The same server also runs hosted at https://api.gridlinegpu.com/mcp over Streamable HTTP, so a client connects with a URL and nothing to install. Send your Gridline API key (create one at https://gridlinegpu.com/dashboard/tokens) as the Authorization: Bearer header. Without a key the client can still connect and list the tools, and every tool call answers not_logged_in.
Claude Code:
claude mcp add --transport http gridline https://api.gridlinegpu.com/mcp \
--header "Authorization: Bearer $GRIDLINE_TOKEN"A client that takes a URL and headers in a JSON config:
{
"mcpServers": {
"gridline": {
"url": "https://api.gridlinegpu.com/mcp",
"headers": { "Authorization": "Bearer <your Gridline API key>" }
}
}
}It has the same tools, quotes and spend guard as the local server: tools that spend credit still need confirm_spend: true, and fine-tunes, eval runs and distillations quote first with dry_run: true. Because it cannot read or write files on your machine, upload_file takes the file's text as content (at most 4 MiB; send larger files to the Files API) and create_distillation takes a prompts_file id. These tools are only in the local server: download_results, login, signup, email_login, verify_email, add_credit, claim_free_credit, list_keys, revoke_key. Read batch results with the Files API (GET /files/{id}/content).
Each request stands alone: the server keeps no session or state of its own. Your key goes only to Gridline's API for that request, and the API's usual rate limits apply. Its discovery card is at /.well-known/mcp.
Source and listings
- npm: @gridlinegpu/mcp
- Official MCP Registry: io.github.GridlineGPU/mcp
- Source (MIT): GridlineGPU/gridline-mcp on GitHub