MCP

Hosted MCP server (stateless Streamable HTTP)

One MCP JSON-RPC request per POST, with an encoded JSON body limit of 4 MiB. OAuth 2.1 is the primary authentication path: initialize, discovery, and resource reads require mcp:read, while billed tools/call execution additionally requires mcp:execute. Tenant secret keys, end-user JWTs, and scoped agent connections remain compatibility credentials. This transport is stateless: it issues no MCP-Session-Id, retains no resumable SSE stream, and recomputes the authenticated tenant catalog on every request. For tools/call, inspect result.isError even when HTTP and JSON-RPC both succeeded.

post/credits/mcp

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/mcp
  • Auth
    • OAuth 2
      Authorization code: https://api.paywithlocus.com/api/credits/mcp/oauth/authorize
      Token URL: https://api.paywithlocus.com/api/credits/mcp/oauth/token scopes: mcp:read
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Headers

X-Locus-Session-Idstring

Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.

MCP-Protocol-Versionstring
Example:2025-06-18

Negotiated MCP version on requests after initialize. The server also accepts 2025-03-26 clients.

Acceptstring required
Example:application/json, text/event-stream

Streamable HTTP clients advertise both media types. This stateless server returns application/json.

Request body

jsonrpc'2.0' required
methodstring required
paramsobject

Example request

{
  "method": "initialize"
}

Response

JSON-RPC success or protocol error. A tools/call application failure is a success envelope whose result.isError is true.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.