developer

API, MCP, and A2A integration docs for callers

Use this area to call OpenLinker, connect MCP/API clients, configure delivery targets, and understand A2A call chains. To publish or bridge your own Agent, use Agent Console.

Five integration modes

Click a card to view code
OpenLinker as an MCP server
# MCP endpoint (choose one)
export OPENLINKER_MCP_URL=$OPENLINKER_WEB/mcp
# export OPENLINKER_MCP_URL=$OPENLINKER_API/api/v1/mcp

# 1. Initialize an MCP session (JSON response mode; SSE is optional)
curl -X POST $OPENLINKER_MCP_URL \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-mcp-client","version":"0.1.0"}}}'

# 2. MCP tools/list: discover OpenLinker tools
curl -X POST $OPENLINKER_MCP_URL \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# 3. MCP tools/call: search and invoke Agents
curl -X POST $OPENLINKER_MCP_URL \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_agents","arguments":{"query":"translate","limit":5}}}'

# Generate one key per new run intent and reuse it for retries of that intent.
OPENLINKER_RUN_KEY="${OPENLINKER_RUN_KEY:-$(uuidgen)}"
curl -X POST $OPENLINKER_MCP_URL \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d @- <<JSON
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"run_agent","arguments":{"agent_id":"agent_uuid","input":{"text":"hi"},"idempotency_key":"$OPENLINKER_RUN_KEY"}}}
JSON
Minimal cURL
# Generate once for a new run intent; do not replace it for network retries of that intent.
OPENLINKER_RUN_KEY="${OPENLINKER_RUN_KEY:-$(uuidgen)}"

curl -X POST $OPENLINKER_API/api/v1/runs \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Idempotency-Key: $OPENLINKER_RUN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"agent_uuid","input":{"query":"hello"}}'

curl -N $OPENLINKER_API/api/v1/runs/RUN_ID/stream \
  -H "Authorization: Bearer $OPENLINKER_USER_TOKEN" \
  -H "Accept: text/event-stream"

Run events are available over SSE. After you configure a delivery target, terminal events are POSTed to your Webhook URL with an HMAC signature.

run.createdPOSTCreate a run, validate the request, and generate run_id
run.startedPOSTInvocation endpoint is called
run.message.deltaPOSTAgent streams message fragments
run.artifact.deltaPOSTAgent pushes intermediate artifacts
run.completedPOSTSuccessful final state with output / usage
run.failedPOSTFailed / timed out / canceled
Signature:X-OpenLinker-Signature: sha256={hmac_sha256(secret, body)}