Live endpoint: https://drivestock.eu/api/mcp
# Drivestock MCP — Client Connect (P0 live)
Public **Streamable HTTP** MCP for B2B catalog search + quote inquiries.
No OAuth in Phase 1.
| | |
|---|---|
| **MCP endpoint** | `https://drivestock.eu/api/mcp` |
| **Health** | `https://drivestock.eu/api/mcp/health` |
| **Transport** | Streamable HTTP (JSON-RPC over `POST`; not legacy SSE-only) |
| **Protocol** | Prefer `2025-06-18` (also accepts `2025-03-26`) |
| **Auth** | None |
| **Privacy** | https://drivestock.eu/de/datenschutz/ |
| **Support** | request@drivestock.eu |
| **Shop** | Drivestock live; `brand_shop=mechstock` prepared, not live |
---
## Headers (every client POST)
```
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-06-18
```
Optional after `initialize`: `Mcp-Session-Id: <id from response header>`.
CORS: server reflects request `Origin` (e.g. `https://claude.ai`, `https://chatgpt.com`, Cursor origins) or `*` if Origin absent.
Allowed methods: `POST`, `OPTIONS`, `DELETE` (+ health `GET`).
`GET /api/mcp` returns **405** (no long-lived SSE listen in P0) — clients use **POST-only**.
Soft limits: `create_inquiry` ≈ **1000 / IP / day**; web form stays 10/h.
`search_parts` requires **`q` and/or `brand`**, `limit` ≤ **50** (no full-catalog dump).
---
## Tools
| Tool | Required args | Notes |
|------|---------------|--------|
| `search_parts` | `q` and/or `brand` | Optional: `condition`, `limit`≤50, `brand_shop` |
| `get_part` | `sku` **or** `brand`+`part_number` | Full prices per condition |
| `list_brands` | — | Optional `prefix` |
| `get_brand_stats` | — | Optional `brand` |
| `suggest_alternatives` | `sku` (or brand+pn) | Optional `limit`≤20 |
| `create_inquiry` | `email`, `qty`, `note`, `sku` | Optional: `company`, `name`, `phone`, `condition`, **`source`** |
**`source` on create_inquiry** (stored on the inquiry record):
`cursor` | `claude` | `chatgpt` | `grok` | `other`
Prices: free **netto** display € from DB, else **„auf Anfrage“**. Never raw feed prices.
---
## Cursor
1. Open MCP settings (Cursor Settings → MCP).
2. Add a **remote / HTTP** server (not stdio command).
3. URL: `https://drivestock.eu/api/mcp`
4. Or merge this into your user `mcp.json`:
```json
{
"mcpServers": {
"drivestock": {
"url": "https://drivestock.eu/api/mcp",
"transport": "streamable-http",
"headers": {
"MCP-Protocol-Version": "2025-06-18"
}
}
}
}
```
Repo stub (same content): `mcp/cursor-plugin/mcp.json`.
On inquiries from Cursor agents set `source: "cursor"`.
---
## Claude (Remote MCP / Connectors)
1. Claude → Settings → Connectors (or MCP / Remote servers — label varies by plan).
2. Add remote MCP URL: `https://drivestock.eu/api/mcp`
3. Transport: **Streamable HTTP** (not the old HTTP+SSE pair).
4. No OAuth client ID in Phase 1.
5. Use `source: "claude"` on `create_inquiry`.
Directory listing: see `mcp/CLAUDE-CONNECTORS-PREP.md` (Clemens-gated submit).
---
## Grok Custom / Grok MCP
1. Custom connector / MCP remote server field.
2. Endpoint: `https://drivestock.eu/api/mcp`
3. Streamable HTTP + protocol `2025-06-18`.
4. Use `source: "grok"` on `create_inquiry`.
Gallery listing: see `mcp/GROK-GALLERY-PREP.md` (Clemens-gated).
---
## ChatGPT (Custom GPT / Apps)
1. Where remote MCP is enabled (Apps / Connectors / Custom GPT actions — product-dependent).
2. Server URL: `https://drivestock.eu/api/mcp`
3. Use `source: "chatgpt"` on `create_inquiry`.
4. Apps directory submit: `mcp/CHATGPT-APPS-PREP.md` (Clemens-gated).
---
## Manual JSON-RPC smoke
```bash
# Health
curl -s https://drivestock.eu/api/mcp/health
# Initialize
curl -s https://drivestock.eu/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}'
# tools/list
curl -s https://drivestock.eu/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
# search_parts
curl -s https://drivestock.eu/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_parts","arguments":{"q":"MDX61","brand":"SEW-Eurodrive","limit":3}}}'
# get_part
curl -s https://drivestock.eu/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_part","arguments":{"sku":"MDX61B0040-5A3-4"}}}'
```
---
## P1 still open
- Catalog listings (Claude / ChatGPT Apps / Grok) — prep docs ready, submit = Clemens
- Optional OAuth / API keys if abuse appears
- Mechstock catalog behind `brand_shop`
- SSE listen / resumable streams if a client requires GET streams