mcp
The hub as a remote MCP server: one URL an AI agent connects to, with an API key, and the same tools the lucen-mcp package serves.
POST / mcp
The hub as a remote MCP server
An AI agent connects here with one line of configuration and nothing to install. The transport is MCP's Streamable HTTP. Send a JSON-RPC message with an API key as Authorization: Bearer. The server keeps no session: every request stands alone and the answer is JSON.
The tools are the ones the lucen-mcp package serves over stdio. Each tool calls this API with the caller's own key. So every scope rule, every rate limit and every 404 is the API's own. Tools that act on the server's own computer are not offered here. No tool can approve a deployment, mint a key or continue a stopped campaign.
toolsets picks the tools. train is the default: the training flow from picking a robot to its sim test videos. all serves every tool. A browser session token is refused with 401. Give the agent an API key instead. A request whose Origin is not this hub's web app is 403. Each key may make 600 requests a minute here, like the rest of the API. One person has at most three requests in flight, whichever of their keys sends them. The body must arrive whole within 10 seconds, or the answer is 408.
A deployment serves this endpoint only once its operator switches it on. Until then every request is 503.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
toolsets | query | string | Comma-separated toolsets, for example |
Request body
| Field | Type | Description |
|---|---|---|
jsonrpc | string | |
id | string | integer | null | |
method | string | |
params | object | |
result | object | |
error | object |
Responses
| Status | Description | Body |
|---|---|---|
200 | The JSON-RPC response. | McpJsonRpcMessage |
202 | A notification or a response from the client, accepted. | |
400 | The body is not a JSON-RPC message, or a toolset is unknown. | McpJsonRpcMessage |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
408 | The request body did not arrive within 10 seconds. | |
413 | The request body is larger than 1 MiB. | |
429 | This key made too many requests this minute, or this person already has three requests in flight. | Problem |
503 | A service this endpoint needs is not configured in this deployment. The API boots with zero secrets. An endpoint that needs one says so instead of returning a stack trace. | Problem |
Schemas (1)
The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.
McpJsonRpcMessage
A JSON-RPC 2.0 message as MCP defines it: a request, a notification or a response. A batch is an array of them.
| Field | Type | Description |
|---|---|---|
jsonrpc | string | |
id | string | integer | null | |
method | string | |
params | object | |
result | object | |
error | object |