This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Ahmed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're right to check the URL — I'll address that specific question and give focused next steps. No, the URL does not universally need to end with
/mcp
for Streamable HTTP to work. The
/mcp
path is used by LiveKit's docs-hosted MCP endpoint, but Streamable HTTP support depends on how your MCP server at https://orch-api-dev.assembly-industries.com/v0/mcp-tools/stream is implemented and what transport it advertises — not the literal path name. Likely causes of your error (client shows
transport=sse
): • The client is attempting SSE but your server expects a different transport (raw HTTP stream, WebSocket, etc.). • The server response doesn't present the expected MCP capabilities/streaming handshake or correct headers/content-type, so the client falls back to SSE and fails. • The endpoint isn’t returning the MCP JSON capability object or streaming JSON-RPC in the format the LiveKit Agents SDK expects. What you can do next (quick checklist): 1. Curl the endpoint to inspect the response: ◦ Check it returns a JSON capabilities object and includes a
stream
indication. ◦ Confirm
Content-Type: application/json
and that streamed responses are valid JSON-RPC lines. 1. Verify your server’s transport matches the client’s expectation (SSE vs HTTP streaming vs WebSocket). 2. If you control the server routing and want to test parity with LiveKit’s example, temporarily expose an endpoint that returns the same capabilities/stream semantics as the docs
/mcp
endpoint and point the client there to see if listing succeeds. 3. Compare your implementation to the MCP spec and the LiveKit Agents examples for the required handshake and streaming format. If you want, share the raw response headers/body (or a small curl output) from your URL and I’ll help pinpoint which part of the handshake or transport is mismatched. Sources: LiveKit Docs MCP Server | LiveKit docs | Tool definition and use | LiveKit docs | Using MCP with LiveKit Agents
h
For further context: this is how I have configured my mcp. mcp_servers_config = [ mcp.MCPServerHTTP( url=mcp_url, headers={ "authorization": f"Bearer {os.getenv('MCP_AUTH_TOKEN')}", "x-mcp-proxy-auth": f"Bearer {os.getenv('MCP_PROXY_AUTH_TOKEN')}", "accept": "application/json, text/event-stream", "content-type": "application/json" } ) ]
t
Thanks — this config is helpful. You're setting the client to accept both JSON and SSE, and sending auth headers, which is fine. A few focused checks will quickly reveal the mismatch. 1) Verify the server's capabilities response • Run:
curl -i -H "Authorization: Bearer <token>" -H "Accept: application/json" <your-url>
• Paste the response headers and the first JSON body you get. The response should be a JSON object listing MCP capabilities and indicate streaming support. 2) Confirm transport behavior • If the server supports SSE it should respond with
Content-Type: text/event-stream
and stream SSE events. • If it supports HTTP streaming it should return
Content-Type: application/json
and stream JSON-RPC objects (newline-delimited or proper chunking). • If the server returns one format but the client tries a different transport, listing will fail. 3) Quick tests to isolate: • Curl with
Accept: text/event-stream
to see SSE behavior:
curl -i -H "Accept: text/event-stream" <your-url>
• Curl with
Accept: application/json
to see JSON handshake:
curl -i -H "Accept: application/json" <your-url>
• Check that your server returns the capability JSON on an initial GET (not only after upgrade/POST). 4) Headers to confirm • Ensure the server returns the correct
Content-Type
and does not strip or rewrite the auth headers behind a proxy. Also confirm any proxy preserves
text/event-stream
responses. If you share the curl outputs (response headers + first JSON or SSE lines), I’ll point out exactly what’s mismatched and the minimal change to make the client use the correct transport.
Thanks — the curl response makes the issue clear. The 405 Method Not Allowed shows your endpoint is rejecting GET requests. MCP tool listing and the initial MCP handshake require a GET (or an endpoint that returns capabilities on GET). This is why the client tried SSE and failed. What to do next: • Allow GET on that endpoint (or add a GET-capable endpoint) that returns the MCP capabilities JSON on the initial request. • Confirm the GET response includes
Content-Type: application/json
and a capabilities object (and indicates streaming support). • If your server only accepts POST for streaming, expose a separate GET
/capabilities
(or similar) that returns the handshake JSON, and keep the streaming POST/upgrade for the actual stream. If you can, paste the GET response after you enable it (headers + first JSON body) and I’ll verify the capability object and streaming indicator.
h
which endpoint are you talking about. the mcp url i am using?
t
Yes — the MCP URL you configured (https://orch-api-dev.assembly-industries.com/v0/mcp-tools/stream) is the endpoint I meant. This endpoint must accept a GET request and return the MCP capabilities JSON (with a
stream
indication) on that initial GET so the client can list tools and choose the transport. Right now it returned 405 because GET is not allowed, which prevents the handshake. Next steps: 1. Enable GET on that same URL (or add a GET-capable URL) that returns the capabilities JSON with
Content-Type: application/json
. 2. Keep your streaming endpoint (POST/SSE/HTTP stream) for the actual streamed messages if needed. 3. After enabling GET, run: ◦
curl -i -H "Authorization: Bearer <token>" -H "Accept: application/json" https://orch-api-dev.assembly-industries.com/v0/mcp-tools/stream
◦ Paste the response headers and body here and I’ll verify the capabilities format and streaming indicator. If you prefer, you can add a separate
/capabilities
GET endpoint that returns the handshake JSON and point the client at that URL.
h
so just to be sure, streamable http is allowed via mcp in livekit?
t
Yes — LiveKit's MCP client supports Streamable HTTP. Key things that must be true for it to work with your MCP URL (https://orch-api-dev.assembly-industries.com/v0/mcp-tools/stream): • The endpoint must accept an initial GET and return the MCP capabilities JSON (handshake) with
Content-Type: application/json
. • The capabilities response must indicate streaming support so the client can choose Streamable HTTP. • The streaming endpoint must actually serve the transport the client expects (HTTP streaming or SSE) and preserve auth headers through any proxies. Right now your endpoint returned 405 because GET was not allowed. Enable GET on that URL (or add a GET
/capabilities
endpoint that returns the handshake JSON) and then run the curl command: curl -i -H "Authorization: Bearer <token>" -H "Accept: application/json" https://orch-api-dev.assembly-industries.com/v0/mcp-tools/stream Paste the response headers and body here and I’ll verify the capabilities and streaming indicator.