openclaw - 💡(How to fix) Fix [Bug]: `openclaw docs` broken — docs.openclaw.ai/mcp returns text/html instead of text/event-stream (SSE routing conflict)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

openclaw docs <query> has been broken since at least 2026-05-24. Every query fails with:

Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream"
SseError: SSE error: Invalid content type, expected "text/event-stream"
    at _eventSource.onerror ...
    { code: 200, event: { type: 'error', message: 'Invalid content type, expected "text/event-stream"', code: 200 } }

Error Message

Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream" SseError: SSE error: Invalid content type, expected "text/event-stream" at _eventSource.onerror ... { code: 200, event: { type: 'error', message: 'Invalid content type, expected "text/event-stream"', code: 200 } }

Root Cause

openclaw docs calls:

pnpm dlx mcporter call https://docs.openclaw.ai/mcp.search_open_claw --args {...} --output text

mcporter's URL parser (splitHttpToolSelector) splits https://docs.openclaw.ai/mcp.search_open_claw into:

  • MCP server URL: https://docs.openclaw.ai/mcp
  • Tool name: search_open_claw

It then opens an SSE connection to https://docs.openclaw.ai/mcp. But that URL is now a documentation HTML page (the docs site page for the MCP feature), not an MCP SSE endpoint:

$ curl -sI https://docs.openclaw.ai/mcp
HTTP/2 200
content-type: text/html; charset=utf-8   ← should be text/event-stream
cache-control: public, max-age=60, stale-while-revalidate=60
x-openclaw-docs-origin: cloudflare-r2

The response body is a redirect to /cli/mcp (the MCP documentation page). The SSE client rejects it immediately.

Fix Action

Fix

The /mcp path on docs.openclaw.ai has a naming collision:

  • The docs site publishes a page at /mcp (documentation for the MCP feature)
  • The MCP SSE search endpoint is expected to live at /mcp

One of these needs to move. Suggested options:

  1. Move the MCP SSE endpoint to a dedicated subdomain or path that won't collide with docs pages (e.g. https://mcp-search.docs.openclaw.ai/ or https://docs.openclaw.ai/_mcp)
  2. Move the MCP documentation page to a path like /features/mcp or /cli/mcp-integration
  3. Serve the SSE endpoint conditionally based on Accept: text/event-stream header (though this is fragile)

The SEARCH_TOOL URL is hardcoded in the CLI bundle (docs-cli-CanaXSf8.js): const SEARCH_TOOL = "https://docs.openclaw.ai/mcp.search_open_claw" — any path change will require a CLI release as well.

Code Example

Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream"
SseError: SSE error: Invalid content type, expected "text/event-stream"
    at _eventSource.onerror ...
    { code: 200, event: { type: 'error', message: 'Invalid content type, expected "text/event-stream"', code: 200 } }

---

pnpm dlx mcporter call https://docs.openclaw.ai/mcp.search_open_claw --args {...} --output text

---

$ curl -sI https://docs.openclaw.ai/mcp
HTTP/2 200
content-type: text/html; charset=utf-8   ← should be text/event-stream
cache-control: public, max-age=60, stale-while-revalidate=60
x-openclaw-docs-origin: cloudflare-r2

---

openclaw docs heartbeat
# Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream"
RAW_BUFFERClick to expand / collapse

Summary

openclaw docs <query> has been broken since at least 2026-05-24. Every query fails with:

Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream"
SseError: SSE error: Invalid content type, expected "text/event-stream"
    at _eventSource.onerror ...
    { code: 200, event: { type: 'error', message: 'Invalid content type, expected "text/event-stream"', code: 200 } }

Root Cause

openclaw docs calls:

pnpm dlx mcporter call https://docs.openclaw.ai/mcp.search_open_claw --args {...} --output text

mcporter's URL parser (splitHttpToolSelector) splits https://docs.openclaw.ai/mcp.search_open_claw into:

  • MCP server URL: https://docs.openclaw.ai/mcp
  • Tool name: search_open_claw

It then opens an SSE connection to https://docs.openclaw.ai/mcp. But that URL is now a documentation HTML page (the docs site page for the MCP feature), not an MCP SSE endpoint:

$ curl -sI https://docs.openclaw.ai/mcp
HTTP/2 200
content-type: text/html; charset=utf-8   ← should be text/event-stream
cache-control: public, max-age=60, stale-while-revalidate=60
x-openclaw-docs-origin: cloudflare-r2

The response body is a redirect to /cli/mcp (the MCP documentation page). The SSE client rejects it immediately.

Steps to Reproduce

openclaw docs heartbeat
# Docs search failed: [mcporter] SSE error: Invalid content type, expected "text/event-stream"

Environment

  • OpenClaw version: 2026.5.22 (a374c3a)
  • mcporter version: 0.11.3 (via pnpm dlx)
  • Platform: WSL2 (Linux 6.6.114.1-microsoft-standard-WSL2)
  • Date confirmed broken: 2026-05-24

Fix

The /mcp path on docs.openclaw.ai has a naming collision:

  • The docs site publishes a page at /mcp (documentation for the MCP feature)
  • The MCP SSE search endpoint is expected to live at /mcp

One of these needs to move. Suggested options:

  1. Move the MCP SSE endpoint to a dedicated subdomain or path that won't collide with docs pages (e.g. https://mcp-search.docs.openclaw.ai/ or https://docs.openclaw.ai/_mcp)
  2. Move the MCP documentation page to a path like /features/mcp or /cli/mcp-integration
  3. Serve the SSE endpoint conditionally based on Accept: text/event-stream header (though this is fragile)

The SEARCH_TOOL URL is hardcoded in the CLI bundle (docs-cli-CanaXSf8.js): const SEARCH_TOOL = "https://docs.openclaw.ai/mcp.search_open_claw" — any path change will require a CLI release as well.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: `openclaw docs` broken — docs.openclaw.ai/mcp returns text/html instead of text/event-stream (SSE routing conflict)