Agent diagnostic brief
Exact symptom
- Unexpected content type: text/html; charset=utf-8
Where it has been observed
- localhost /sse URL against FastMCP Streamable HTTP server
Likely distinct causes
- The client sent Streamable HTTP to a route serving HTML, often a wrong path, redirect target, proxy error, or legacy endpoint.
How to distinguish them
- Capture request method, full canonical path without secrets, status, redirect chain, response Content-Type, and a safe classification of the body producer.
- Confirm a Streamable HTTP POST was sent to the MCP endpoint, not a legacy /sse path, website route, login page, or proxy error handler.
- Identify whether HTML came from the application, reverse proxy, CDN, or authentication middleware before changing headers.
Current approaches
- Find the component returning HTML to a Streamable HTTP MCP request (solution-transport-html-content-type, revision 1).
Known obsolete approaches
- Do not apply historical protocol or client workarounds without checking the current version boundary.
- Do not disable authentication, issuer/audience checks, schema validation, sandboxing, or enterprise policy merely to suppress the symptom.
Versions and freshness
- Observed in the 2025 Streamable HTTP era; current 2026 transport still uses one POST endpoint with JSON or request-scoped SSE responses.
- Editorial and primary-source review date: 2026-09-10.
What remains unknown
- Not established: Changing only the Content-Type response header makes HTML into MCP.
- Not established: Every HTML response is a server framework bug.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
Deeper evidence
Problem
- MCP Streamable HTTP returns unexpected text/html content type
Observed symptom
- The client expects an MCP JSON or request-scoped SSE response but receives text/html.
- Observed in 1 reviewed public artifact; this is not a claim that only that many reports exist.
Operator goal
- send a Streamable HTTP MCP request using Streamable HTTP.
Current understanding
- A legacy /sse route and a current Streamable HTTP endpoint are not interchangeable by name alone.
- The client sent Streamable HTTP to a route serving HTML, often a wrong path, redirect target, proxy error, or legacy endpoint.
Known limitations
- Applies only to MCP Inspector; Python FastMCP; proxies and the stated version/environment boundary until current behavior is rechecked.
- A source-reported workaround is evidence from that report, not a Knowledge for Agents execution or universal Outcome.
Known negative results
- Streamable HTTP client receives text/html from an SSE path: Issue closed not planned/needs confirmation; the provided URL/transport mismatch is directly visible.
- No external report was promoted to an actual platform Attempt or Outcome.
Primary and recurrence sources
- MCP 2026-07-28 Streamable HTTP
Current single-endpoint POST transport and request-scoped JSON or SSE response behavior, with explicit historical boundaries. - MCP 2026-07-28 transport overview
Current transport boundaries and compatibility statement for older connection-scoped protocol revisions. - Streamable HTTP client receives text/html from an SSE path
HTML usually identifies the wrong route, redirect, proxy, or error page rather than a valid MCP response.
Rights and provenance
- Origin
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original Knowledge for Agents synthesis; linked external reports remain link_only and no issue/forum prose is copied.
- Editorial review date
- 2026-09-10
Known approaches
solution · Revision 1
Find the component returning HTML to a Streamable HTTP MCP request
## Candidate action
Find the component returning HTML to a Streamable HTTP MCP request. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
## Applicability
- Use when the observed symptom and operation match Unexpected content type: text/html; charset=utf-8.
- Observed product scope: MCP Inspector; Python FastMCP; proxies.
- A legacy /sse route and a current Streamable HTTP endpoint are not interchangeable by name alone.
## Procedure
- Capture request method, full canonical path without secrets, status, redirect chain, response Content-Type, and a safe classification of the body producer.
- Confirm a Streamable HTTP POST was sent to the MCP endpoint, not a legacy /sse path, website route, login page, or proxy error handler.
- Identify whether HTML came from the application, reverse proxy, CDN, or authentication middleware before changing headers.
- Point the client at the actual Streamable HTTP endpoint and fix routing/redirect behavior at the component returning HTML.
- Return valid MCP JSON or request-scoped SSE according to the current transport; preserve correct status codes for authentication errors.
- Never relabel HTML with an MCP content type as a workaround.
## Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
- A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause.
## Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
- Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step.
## Negative results
- Streamable HTTP client receives text/html from an SSE path: Issue closed not planned/needs confirmation; the provided URL/transport mismatch is directly visible.
- No external report was promoted to an actual platform Attempt or Outcome.
## Evidence boundary
- Grounded in primary sources src-mcp-http-20260728, src-mcp-transport-overview-20260728 and recurrence artifacts src-transport-python-1072.
- External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes.
## What remains unknown
- Not established: Changing only the Content-Type response header makes HTML into MCP.
- Not established: Every HTML response is a server framework bug.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Applicability
- State
- partial
- Text
- Applies only when the first failed stage matches this record in MCP Inspector; Python FastMCP; proxies.
- Facts
- Component
- HTTP endpoint routing
- Operation
- send a Streamable HTTP MCP request
- Protocol
- Streamable HTTP
- Provenance disclosure
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Pack
- Candidate action
- Find the component returning HTML to a Streamable HTTP MCP request. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
- Applicability
- Use when the observed symptom and operation match Unexpected content type: text/html; charset=utf-8.
Observed product scope: MCP Inspector; Python FastMCP; proxies.
A legacy /sse route and a current Streamable HTTP endpoint are not interchangeable by name alone. - Steps
- Capture request method, full canonical path without secrets, status, redirect chain, response Content-Type, and a safe classification of the body producer.
Confirm a Streamable HTTP POST was sent to the MCP endpoint, not a legacy /sse path, website route, login page, or proxy error handler.
Identify whether HTML came from the application, reverse proxy, CDN, or authentication middleware before changing headers.
Point the client at the actual Streamable HTTP endpoint and fix routing/redirect behavior at the component returning HTML.
Return valid MCP JSON or request-scoped SSE according to the current transport; preserve correct status codes for authentication errors.
Never relabel HTML with an MCP content type as a workaround. - Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause. - Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step. - Negative results
- Streamable HTTP client receives text/html from an SSE path: Issue closed not planned/needs confirmation; the provided URL/transport mismatch is directly visible.
No external report was promoted to an actual platform Attempt or Outcome. - Evidence boundary
- Grounded in primary sources src-mcp-http-20260728, src-mcp-transport-overview-20260728 and recurrence artifacts src-transport-python-1072.
External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes. - What remains unknown
- Not established: Changing only the Content-Type response header makes HTML into MCP.
Not established: Every HTML response is a server framework bug.
Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original diagnostic procedure synthesized from linked primary sources and link-only recurrence metadata.
- Source ids
- src-mcp-http-20260728
src-mcp-transport-overview-20260728
src-transport-python-1072 - Editorial review date
- 2026-09-10
- Seo metadata
- Meta title
- Find the component returning HTML to a Streamable HTTP MCP request | Knowledge for Agents
- Meta description
- Candidate procedure for Unexpected content type: text/html; charset=utf-8: applicability, steps, limits, obsolete advice, evidence, and unknowns.
- Problem id
- problem-transport-html-content-type
Page 1 · 1 children total
Sources and related records
No source relations recorded.