# Connect DealScore to n8n

You connect DealScore to n8n by adding an MCP Client Tool node to an AI Agent, setting Endpoint to https://cardealscore.com/api/mcp with HTTP Streamable transport, and using Header Auth with an API key. DealScore is a remote MCP server at `https://cardealscore.com/api/mcp` (Streamable HTTP). In n8n, an MCP Client Tool node connects `score_deal` to an AI Agent. DealScore's default for a client that can open a browser is OAuth 2.1 with PKCE. A workflow run does not open a browser, so this page uses Header Auth and the `x-api-key` header.

Page: https://cardealscore.com/integrations/n8n

Get a free API key: https://cardealscore.com/login?next=%2Fkeys. Used car price API: https://cardealscore.com/used-car-price-api

## Add the MCP Client Tool

1. In a workflow, add an AI Agent node.
2. Add an MCP Client Tool node and connect its tool output to the AI Agent.
3. Set Server Transport to HTTP Streamable. On node version 1.2 and later that is the default. The current default version is 1.4.
4. Set Endpoint to `https://cardealscore.com/api/mcp`.
5. Set Authentication to Header Auth and attach the credential below.
6. Leave Tools to Include on All, or switch it to Selected and include `score_deal`. All also exposes `explain_grade` and `health`.
7. Attach your own chat model to the AI Agent. Ask it to call `score_deal` with a year, make, model, asking price, and mileage. ZIP is optional.

MCP Client Tool:

```text
Endpoint: https://cardealscore.com/api/mcp
Server Transport: HTTP Streamable
Authentication: Header Auth
Header name: x-api-key
Header value: YOUR_KEY
```

Create the key at /keys. A workflow run does not open a browser, so Header Auth is the path to use. Bearer Auth with the same key also works. Full setup: /integrations/n8n.

The MCP Client Tool docs page still names the URL field SSE Endpoint. That is version 1 of the node. Version 1.1 and later call the field Endpoint, and version 1.2 and later add Server Transport. DealScore does not serve SSE, so a version 1 node cannot reach it.

## Header Auth

Create a key on https://cardealscore.com/keys. In n8n, create a Header Auth credential. Name is `x-api-key`. Value is the key. Select that credential on the MCP Client Tool. DealScore needs that one header.

Bearer Auth sends `Authorization: Bearer` and the same key. DealScore accepts that header on MCP and on `POST /api/score`. Header Auth is the one that sends `x-api-key`.

Node version 1.2 and later also lists MCP OAuth2. n8n's MCP OAuth2 credential can register a client with the server (dynamic client registration is on by default) and has an optional Resource URL. Header Auth is the setup on this page.

## Quick answers

### Why does n8n use an API key instead of OAuth?

A workflow run does not open a browser, so Header Auth is the path to use. The header name is x-api-key and the value is a key from /keys, with no Bearer prefix.

### Which MCP Client Tool version do I need?

Version 1.2 or later, where Server Transport can be HTTP Streamable. DealScore does not serve SSE, so a version 1 node cannot reach it.

### Does Bearer Auth work in n8n?

Yes. Bearer Auth sends Authorization: Bearer with the same key, and DealScore accepts that header on MCP and on POST /api/score.

### Which tools does n8n get, and what do they cost?

score_deal, explain_grade, and health. Free includes 5 scored calls a month. Only results with coverage: scored count, and explain_grade and health are never metered.

## Workflow file

Import this workflow, then attach the Header Auth credential and your own chat model. The file has no credentials and no API key.

Download dealscore-n8n-workflow.json: https://cardealscore.com/integrations/dealscore-n8n-workflow.json

## Example output

Example output, illustrative numbers. [Score a real listing](https://cardealscore.com/try). A generic 2019 Example Sedan listed at $20,000 with 40,000 miles. The ask is 9% under the expected $22,000 (band $20,000 to $24,000). score_v2 grades that delta_pct Good. The score is 87. comps_count is 20. data_source is example. A live score returns live, mock, or error. These numbers are made up. The same example is on https://cardealscore.com/used-car-price-api. It uses the `score_deal` response shape. It was not made from n8n, and it does not count against the meter. How the bands are drawn: https://cardealscore.com/guides/how-deal-grades-work

score_deal arguments:

```json
{
  "year": 2019,
  "make": "Example",
  "model": "Sedan",
  "asking_price": 20000,
  "mileage": 40000
}
```

score_deal response:

```json
{
  "grade": "Good",
  "score": 87,
  "expected_price": 22000,
  "expected_price_low": 20000,
  "expected_price_high": 24000,
  "delta_pct": -0.09,
  "confidence": 0.8,
  "coverage": "scored",
  "rubric_version": "score_v2",
  "data_source": "example",
  "vehicle": {
    "year": 2019,
    "make": "Example",
    "model": "Sedan"
  },
  "comps_count": 20
}
```

## If the tool list stays empty

- Server Transport is HTTP Streamable and Endpoint is `https://cardealscore.com/api/mcp`. SSE Endpoint is the version 1 field, and DealScore has no SSE URL.
- Authentication is Header Auth. Name is `x-api-key`. Value is the key from https://cardealscore.com/keys, with no `Bearer` prefix in that value.
- `coverage: cannot_score` with a null grade means comps were too thin. The connection worked.
- `score_quota_exceeded` means the monthly cap is spent. The connection worked. Plans: https://cardealscore.com/pricing

Directory links:

```
https://cardealscore.com/integrations/n8n?ref=n8n&utm_source=n8n&utm_medium=mcp_directory
https://cardealscore.com/agents?ref=n8n&utm_source=n8n&utm_medium=mcp_directory
```

Sources: [MCP Client Tool](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/), [MCP credentials](https://docs.n8n.io/integrations/builtin/credentials/mcp/).

## What the agent can call

`score_deal` grades a deal. Send `asking_price` and `mileage`, plus a VIN or year, make, and model. `trim` and `zip` are optional. `explain_grade` maps a `delta_pct` to a grade without fetching comps. `health` reports coverage and limits. Free includes 5 scored calls a month and Builder is $19/mo (founding price) for 1,000 scored calls a month. Only `coverage: scored` counts, and `explain_grade` and `health` are never metered. Plans: https://cardealscore.com/pricing. Argument details: https://cardealscore.com/docs/api. Test arguments in the browser first: https://cardealscore.com/try.

## Other clients

[Cursor](https://cardealscore.com/integrations/cursor), [VS Code](https://cardealscore.com/integrations/vs-code), [Claude Code](https://cardealscore.com/integrations/claude-code), [Claude Desktop](https://cardealscore.com/integrations/claude-desktop), [Codex](https://cardealscore.com/integrations/codex), [ChatGPT](https://cardealscore.com/integrations/chatgpt). The REST call and a recorded response are on https://cardealscore.com/used-car-price-api. Every client is also listed on https://cardealscore.com/agents.
