---
title: "MCP gateway (per-user): forward a JSON-RPC message on behalf of the invoking user"
method: POST
path: "/connections/mcp/relay"
tags: ["Connections"]
---

# MCP gateway (per-user): forward a JSON-RPC message on behalf of the invoking user

`POST /connections/mcp/relay`

## Request

- Base URL: `https://api.ziggsai.com`
- URL: `https://api.ziggsai.com/connections/mcp/relay`
- Auth: HTTP bearer

Like POST :id/mcp, but the connection is not caller-supplied: the agent asserts the invoking end-user via X-On-Behalf-Of-User and the gateway resolves the live grant this agent holds on that user's connection (one agent = one server, so the pair is unique; the server is derived from the connection). No connectionId/grantId is baked into the agent.

## Headers

- `X-Ziggs-Lane` string

## Response `201`

Created

- object: Passthrough body from the upstream MCP server. Ziggs does not reshape it.

---

[API](https://skmtc.dev/ziggsai/apis/ziggs-developer-api.md) · [All operations](https://skmtc.dev/ziggsai/apis/ziggs-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ziggsai/apis/ziggs-developer-api/revisions/eda79030e072?raw)
