Skip to main content

Tutorial · MCP

Read market signals through Alvo MCP after sign-in.

After sign-in, the MCP endpoint exposes the same deterministic signals as the Alvo workspace: DAM/IDM prices, served forecast, cross-border scarcity snapshot and cited methodology. There are no write tools.

JSON-RPC 2.0 over HTTPread-only toolsdataSentToExternalModel:false

What gets connected

Endpoint

GET /api/mcp for discovery, POST /api/mcp for JSON-RPC transport.

Tools

get_day_ahead_prices, get_forecast, get_regime_snapshot, cite_methodology

Security

Market data through the API works in a signed-in browser session; there are no separate keys for external clients yet.

Provenance

Each successful tools/call response carries the deterministic marker alvo-rules-v1.

Sequence

1. Sign in

Use these examples in a browser on the Alvo origin after sign-in; do not give session cookies to external clients.

2. Initialize

initialize returns serverInfo, tools capability and protocolVersion.

3. Check the list

tools/list shows read-only tools, with no write path or order submission.

4. Call forecast

tools/call get_forecast returns the served forecast (p10/p50/p90 and, when available, capHitProbability) or forecast:null with forecastUnavailableReason when the account has no forecast access or the read did not yield a usable result.

5. Cite methodology

tools/call cite_methodology returns citation-marked grounding from the Alvo docs corpus.

Guardrails

Read-only

The MCP route dispatches only read-backed fetchers; no tool mutates data or submits orders.

No guarantee

Forecast is decision support, not a price guarantee. Empty or fragile data returns null or an explicit error.

No egress

Alvo computes deterministic payloads; the external assistant receives only the response you requested.

Citation grounding

cite_methodology retrieves marked chunks from the Alvo docs corpus; it does not generate a narrative answer.

Snippets

tools/list in the browser

Run on the Alvo origin after account sign-in.

fetch("/api/mcp", {
  method: "POST",
  credentials: "same-origin",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })
}).then((response) => response.json())
initialize

Verify JSON-RPC transport and serverInfo.

fetch("/api/mcp", {
  method: "POST",
  credentials: "same-origin",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "initialize",
    params: {
      protocolVersion: "2025-06-18", capabilities: {},
      clientInfo: { name: "alvo-learn", version: "1.0.0" }
    }
  })
}).then((response) => response.json())
tools/call forecast

Read-only forecast call; the result includes provenance.

fetch("/api/mcp", {
  method: "POST",
  credentials: "same-origin",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 2, method: "tools/call",
    params: {
      name: "get_forecast",
      arguments: { month: "06.2026", market: "DAM" }
    }
  })
}).then((response) => response.json())
tools/call methodology citations

Retrieval-only grounding; facts are retrieved, not generated.

fetch("/api/mcp", {
  method: "POST",
  credentials: "same-origin",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 3, method: "tools/call",
    params: {
      name: "cite_methodology",
      arguments: { query: "How does Alvo validate forecast bands?", k: 3 }
    }
  })
}).then((response) => response.json())

Want to inspect the same signals in the UI?

The workspace shows prices, forecast and cross-border regime next to an audit-friendly decision brief.

Open workspace