Skip to content
Docs menu

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.

1 operation · 1 schema

POST /mcp

The hub as a remote MCP server

mcpMessage · scope key:read

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

mcpMessage parameters
NameInTypeDescription
toolsetsquerystring

length ≤ 200

Comma-separated toolsets, for example train,devices. The default is train. Unknown names are 400.

Request body

application/json · required · McpJsonRpcMessage

mcpMessage request body
FieldTypeDescription
jsonrpcrequiredstring

one of 2.0

idstring | integer | null
methodstring
paramsobject
resultobject
errorobject

Responses

mcpMessage responses
StatusDescriptionBody
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.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
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.

Problemapplication/problem+json
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.

Problemapplication/problem+json

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

object

A JSON-RPC 2.0 message as MCP defines it: a request, a notification or a response. A batch is an array of them.

McpJsonRpcMessage fields
FieldTypeDescription
jsonrpcrequiredstring

one of 2.0

idstring | integer | null
methodstring
paramsobject
resultobject
errorobject