v3
MCP
Mcp Http Post
Handle MCP JSON-RPC requests via HTTP Streamable transport.
This endpoint implements the MCP Streamable HTTP transport (spec 2025-03-26).
- Accepts JSON-RPC requests via POST
- Returns either immediate JSON response OR SSE stream on same connection
- Session management via Mcp-Session-Id header
- Content negotiation via Accept header
The response format is determined by:
- Message type (notifications return 202 Accepted)
- Accept header (must include text/event-stream for SSE)
- Tool execution characteristics (long-running tools may stream)
Args: request: FastAPI request message: JSON-RPC message auth_api_key: API key authentication mcp_session_id: Optional session ID from header mcp_protocol_version: MCP-Protocol-Version header (defaults to 2025-03-26 if absent) accept: Accept header for content negotiation
Returns: JSONResponse with immediate result OR EventSourceResponse with SSE stream
post/v3/mcp/http
Request
- Base URLhttps://api.definite.app (the document declares no server; this is the origin it was published from)
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Mcp-Session-Idstring nullable
MCP-Protocol-Versionstring nullable
X-Thread-Idstring nullable
X-Definite-MCP-Clientstring nullable
acceptstring nullable
Request body
object required
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 2 revisions of this API.