> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# GraphQL, MCP, and streaming

> Use GraphQL, MCP, and streaming interfaces alongside REST.

Veryfront also supports GraphQL, Model Context Protocol (MCP), and WebSocket connections. Run streams use server-sent events (SSE) over REST.

## Choose an interface

| Interface | Use it for | Connection |
| - | - | - |
| GraphQL | Query or mutate supported platform resources. | HTTP at `/graphql` or `/api/graphql`. |
| MCP | Discover and invoke supported tools. | `POST /mcp` or `POST /projects/{project_reference}/mcp`. |
| SSE | Follow run events and reconnect from an event position. | HTTP `GET` to a run stream endpoint. |
| WebSocket | Receive notifications, collaborate, or open interactive sessions. | A protocol-specific WebSocket endpoint. |

SSE is part of the REST API. GraphQL, MCP, and WebSocket have separate operation or message contracts.

## GraphQL

Use `https://api.veryfront.com/graphql`. The `/api/graphql` alias routes to the same GraphQL handler.

The GraphQL schema defines available queries, mutations, input types, and results. REST endpoint availability does not imply a matching GraphQL field. See the [GraphQL reference](https://veryfront.com/docs/cloud/graphql).

## MCP

Send MCP requests to `https://api.veryfront.com/mcp`, or use `/projects/{project_reference}/mcp` when the project must be explicit. The endpoint accepts `POST` requests and `OPTIONS` requests for cross-origin resource sharing (CORS) preflight.

Use the [MCP discovery endpoints](/docs/cloud/rest/apis/api-discovery-and-metadata#mcp-discovery) to inspect available tools and schemas. Follow the [MCP reference](https://veryfront.com/docs/cloud/mcp) for initialization, authentication, and tool-call messages.

## SSE run streams

Choose the stream endpoint for the run context available to your client.

| Endpoint | Reference |
| - | - |
| `GET /runs/{run_id}/stream` | [Stream run events](/docs/cloud/rest/api-reference/runs/stream-run-events) |
| `GET /conversations/{conversation_id}/runs/{run_id}/stream` | [Stream conversation run events](/docs/cloud/rest/api-reference/runs/stream-conversation-run-events) |

To resume the run-scoped stream after an event, send its ID in the `Last-Event-ID` header. Each stream endpoint defines event IDs, replay behavior, and visibility.

## WebSocket connections

Use `wss://api.veryfront.com` as the WebSocket origin. For example, the run notification path is `wss://api.veryfront.com/ws/runs/{runId}/events`.

Each WebSocket endpoint defines its authentication, message format, and session behavior.

Available WebSocket paths:

| Path | Purpose |
| - | - |
| `/ws/runs/{runId}/events` | Run notifications. |
| `/ws/conversations/{conversationId}/events` | Conversation notifications. |
| `/ws/{projectId}/events` | Project notifications. |
| `/ws/{projectId}/yjs` | Collaborative editing. |
| `/ws/{projectId}/logs` | Project log delivery. |
| `/ws/{projectId}/terminal` | Project runtime terminal. |
| `/sandbox-sessions/{session_id}/terminal` | Interactive sandbox terminal. |

For sandbox terminal entry points, see the [terminal endpoint](/docs/cloud/rest/api-reference/sandbox-terminal/open-sandbox-terminal). For related run and conversation resources, see the [Execution API](/docs/cloud/rest/apis/execution-api).

[Back to REST API reference](/docs/cloud/rest)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.