1. 2. AI Agents & MCP
DUFREI API
  • Raíz
    • 1. Core & Health
      • Health Check
    • 2. AI Agents & MCP
      • Model Context Protocol (Streamable HTTP)
        POST
      • Initialize Legacy SSE Stream
        GET
      • Send Legacy MCP JSON-RPC Message
        POST
    • 3. Financial Documents
      • List Financial Documents
      • Cash Inflow Forecast & Customer Concentration (HHI)
      • Discounts, Demurrage & Shrinkage Recovery Audit
    • 4. Shipments & Fleet
      • List Shipments (Trips)
      • Audit Fleet Utilization and Productivity
      • Audit Dispatch-to-Bill and Invoicing Efficiency
      • Freight Financial Unit Economics ($/km, $/L)
    • 3. Financial & Invoices
      • SAT CFDI 4.0 Monthly Fiscal Ledger & Retention Reconciliation
    • 5. Scheduled Alerts
      • Schedule Alert Rules
  • Schemas
    • PaginationMeta
    • FinancialDocsResponse
    • ShipmentsResponse
    • FinancialSummary
    • TripSummary
    • ErrorResponse
    • CanceledRecord
    • PaymentRecord
    • FinancialDocument
    • MexicanAddress
    • ShipmentLeg
    • TripDocument
    • ScheduleAlertsRequest
    • ScheduleAlertsSuccessResponse
    • McpJsonRpcRequest
    • McpJsonRpcResponse
    • RouteCatalogDetails
    • FleetUtilizationResponse
    • DispatchToBillResponse
    • CashInflowForecastResponse
    • DiscountsAndShrinkageResponse
    • FinancialUnitEconomicsResponse
  1. 2. AI Agents & MCP

Initialize Legacy SSE Stream

GET
/sse
Opens a Server-Sent Events (SSE) stream for bidirectional MCP communication with legacy clients.
The connection emits an initial endpoint event with the URI (including sessionId) where POST
messages must be routed via /messages.

Solicitud

Autorización
API Key
Agregar parámetro en header
x-api-key
Ejemplo:
x-api-key: ********************
or
Parámetros de consulta

Respuestas

🟢200
text/event-stream
SSE event stream established successfully.
Bodytext/event-stream

🟠401Unauthorized
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/sse?apiKey=' \
--header 'x-api-key: <api-key>'
Respuesta Ejemplo de Respuesta
200 - Ejemplo 1
null
Modificado en 2026-09-20 15:05:35
Anterior
Model Context Protocol (Streamable HTTP)
Siguiente
Send Legacy MCP JSON-RPC Message
Built with