Skip to content

MCP server

Loresta exposes one MCP streamable HTTP endpoint at https://loresta.co/mcp. It uses the same scoped bearer keys as the REST API.

Field Value
Endpoint POST https://loresta.co/mcp
Authentication Authorization: Bearer lsk_live_...
Content type application/json
Accept application/json or text/event-stream
Current protocol 2025-06-18
Accepted compatibility versions 2025-03-26 and 2024-11-05
Terminal window
curl "https://loresta.co/mcp" \
-X POST \
-H "Authorization: Bearer $LORESTA_AGENT_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "my-integration", "version": "1.0.0" }
}
}'

The server supports initialize, notifications/initialized, ping, tools/list, and tools/call.

Tool Scope Behavior
loresta_get_persona persona:read Returns approved non-secret creator context
loresta_get_usage usage:read Returns current allowance and operation totals
loresta_draft_reply replies:write Prepares a decision and never sends a message
loresta_create_handoff handoffs:write Queues creator review after explicit confirmation

tools/list returns only tools allowed by the key’s scopes.

{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "loresta_get_persona",
"arguments": { "profileId": "cr_example" }
}
}

Write tools accept idempotencyKey inside their arguments. loresta_create_handoff also requires confirm: true after the user approves the action.

Authentication and content negotiation failures use HTTP status codes. A tool execution policy error returns a successful JSON-RPC envelope with result.isError: true and structured Loresta error details. Unknown JSON-RPC methods return code -32601.

Loresta’s MCP tools cannot send social replies, issue refunds, change offers, expose provider tokens, or cross workspace boundaries.