> For the complete documentation index, fetch https://nextauto.ai/llms.txt. Use it to find every page before exploring further.

# MCP server

The NeXT Grade MCP server lets an agent grade a vehicle from photos and read the Vehicle Asset Report, with no code. It uses the same account, keys, approval and limits as the API.

- Address: `https://nextauto.ai/mcp` (Streamable HTTP)
- Sign-in: your API key as `Authorization: Bearer <key>`. Get one on the [API keys](https://nextauto.ai/keys) page; see [Auth and keys](https://nextauto.ai/docs/auth).
- Coming soon: connecting from Claude and ChatGPT by signing in with your NeXT Grade account, without a key.

## Connect your agent

Keep the key in the `NEXTGRADE_KEY` environment variable, never in a prompt or chat.

**Claude Code** (`.mcp.json` in your project)

```json
{
  "mcpServers": {
    "nextgrade": {
      "type": "http",
      "url": "https://nextauto.ai/mcp",
      "headers": { "Authorization": "Bearer ${NEXTGRADE_KEY}" }
    }
  }
}
```

Claude Code reads the key from the environment when it starts. The one-line `claude mcp add --transport http nextgrade https://nextauto.ai/mcp --header "Authorization: Bearer <key>"` also works, but it saves the key itself in Claude Code's settings file.

**Cursor** (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "nextgrade": {
      "url": "https://nextauto.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:NEXTGRADE_KEY}" }
    }
  }
}
```

**VS Code** (`.vscode/mcp.json`)

```json
{
  "servers": {
    "nextgrade": {
      "type": "http",
      "url": "https://nextauto.ai/mcp",
      "headers": { "Authorization": "Bearer ${input:nextgrade-key}" }
    }
  },
  "inputs": [
    { "type": "promptString", "id": "nextgrade-key", "description": "NeXT Grade API key", "password": true }
  ]
}
```

VS Code asks for the key when the server first starts.

Any other client that speaks Streamable HTTP, such as Codex, works the same way: the address above, plus the `Authorization` header. See your client's MCP docs for where that goes.

## Try it

```prompt
Use the nextgrade MCP server to grade the vehicle in these photos: [photo URLs]. List the damage by part with severity and whether to repair or replace, then the tire grades.
```

## Tools

| Tool | What it does | Effect |
| --- | --- | --- |
| `create_vehicle_report` | Grade a vehicle from photos with NeXT Grade: an itemized list of damaged parts with severity and repair or replace, plus tire grades and paintwork where the report includes them. | Creates |
| `get_vehicle_report` | Read a report by its report_id: its status while it runs, then the findings. | Reads only |
| `list_vehicle_reports` | This account's reports, newest first, with status, vehicle, reference and damage count. | Reads only |
| `create_photo_upload` | Make a link where a person can add photos of a vehicle from their phone or computer, with no sign-in. | Creates |
| `check_photo_upload` | How many photos a person has added to an upload so far. | Reads only |
| `list_report_features` | The sections a Vehicle Asset Report can include (damage list, tire grades, paintwork and more), with what each adds. | Reads only |
| `get_usage` | Reports used this minute, today and this month, and the account's limits. | Reads only |

`create_vehicle_report` uses one report from the account's daily limit, like `POST /v1/analyses`. `create_photo_upload` makes an upload link. The other tools only read. No tool deletes or changes anything else.

## Photos

Give `create_vehicle_report` public `https` photo addresses in `photo_urls`. When the photos are on someone's phone or computer, call `create_photo_upload`: it returns a link the person opens to add up to 32 photos, with no sign-in, for an hour. Once they say they're done, pass its `upload_id` as `photo_upload_id`. Agents that can make HTTP requests can `PUT` each photo's bytes (JPEG, PNG or WebP, under 4.4 MB) to the `put_url` it returns.

## Waiting for a report

A report takes 1 to 4 minutes. `create_vehicle_report` waits up to `wait_seconds` (default 45, at most 200) and returns the report, or its `report_id` while it's still running. Then call `get_vehicle_report` with that id and a `wait_seconds` of its own. Reports made through MCP also appear in `GET /v1/analyses` and fire your [webhooks](https://nextauto.ai/docs/webhooks).

## What comes back

A short summary for the conversation, plus the report as JSON (`structuredContent`): the vehicle, each damaged part with its damage, severity, repair or replace and likelihood, tire grades and paintwork where the report has them, and the views the photos missed. Damage at or below the report's likelihood cutoff comes separately as `unlikely_damage`. `get_vehicle_report` with `detail: "full"` returns every field of the [result](https://nextauto.ai/docs/results), including photo evidence boxes; it is long.

Findings are estimates from photos. Agents are told to say so, and to suggest a person reviews them before a price, loan or claim decision.

Coming soon: **OBD2 engine data** and **vehicle history** sections of the Vehicle Asset Report. Part numbers, related parts and repair cost come after that. None of these are in the API yet.
