---
title: "Tunnel Connector Token"
method: POST
path: "/tunnel/connector-token"
---

# Tunnel Connector Token

`POST /tunnel/connector-token`

## Request

- Base URL: `https://api.local-mcp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.local-mcp.com/tunnel/connector-token`
- Auth: none declared

#2033: mints a qp-bound connector identifier for a web AI whose connector UI has a
single URL field — Grok, and every web AI on Windows until #2158 ships working OAuth
there (see copyConnectorForAgent in go-server). The real tunnel_token authenticates
THIS call via the JSON body — never a query string, or this endpoint would repeat the
exact mistake it exists to fix (enforced by FastAPI's body-model binding, not by hand:
`token` is a Pydantic field, so a `?token=` on this URL is simply ignored).

The returned qp_token is NOT the tunnel_token — a distinct value, one per (machine,
kind), resolved back to the real token by _resolve_qp_connector_token. It is EQUALLY
capable if it leaks (authenticates tools/call exactly like the real token); the point is
blast radius, not severity: re-minting a kind revokes only that kind's previous qp_token,
leaving the real tunnel_token and every other kind's binding untouched — unlike
/tunnel/rotate, which replaces the real token itself. #2326's point-of-use approval does
NOT (yet) cover this path — see #2033 for why.

## Request body

- TunnelConnectorTokenRequest
  - `token` string, required
  - `kind` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/local-mcp/apis/lmcp-api.md) · [All operations](https://skmtc.dev/local-mcp/apis/lmcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/local-mcp/apis/lmcp-api/revisions/f1f1c502623a?raw)
