MCP server SSE error: Invalid content type, expected "text/event-stream"

I created a MCP server using Cursor AI and added a test web front end.

This all works I get data in the browser but when I add it to Cursor>Settings>MCP with some other working MCP servers it errors:

SSE error: Invalid content type, expected “text/event-stream”

The url format is
http://localhost:5555/mcp/sse

Any idea why or how to resolve, Cursor AI tells me everthing is correct

Unfortunately, the documentation doesn’t provide detailed troubleshooting steps for your specific error, but it does validate that your approach and configuration format are correct.

1 Like

Any luck with this?

No, think its a product issue

worked on this again today.
still fails even though if I use a web frontend it connects

how to fix this ?
“weather_server”: {
“url”: “http://127.0.0.1:6274/sse
}

is this fixed? i’m getting this and not able to resolve it.
2025-05-09 16:26:31.465 [error] gent: Client error for command SSE error: Invalid content type, expected “text/event-stream”

2025-05-09 16:26:31.465 [error] gent: Error in MCP: SSE error: Invalid content type, expected “text/event-stream”

2025-05-09 16:26:31.467 [info] gent: Handling ListOfferings action

2025-05-09 16:26:31.467 [error] gent: No server info found
vigneshs@128525 mcp-jira-agent % curl http://localhost:8001/events

event: server_info

data: {‘name’: ‘jira-agent’, ‘version’: ‘1.0.0’, ‘capabilities’: [‘read_jira_ticket’]}

my mcp events api response also looks correct..
This is when i’m runnning with this url config :
{
“mcpServers”: {
“jira-agent”: {
“url”: “http://localhost:8001
}
}
}
when i try with command, I get,
2025-05-09 16:11:25.111 [error] gent: Error in MCP: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)

2025-05-09 16:11:25.111 [error] gent: Client error for command Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)

2025-05-09 16:11:25.112 [error] gent: Error in MCP: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)

2025-05-09 16:11:25.112 [error] gent: Client error for command Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)
Looks like something is wrong with the response of the events api but not able to fix it. Please help

same for me:{
“mcpServers”: {
“MCP-Docker-Linux”: {
“name”: “MCP (Azure)”,
“type”: “sse”,
“url”: “http://127.0.0.1:5088/sse”,
“apiKey”: “”,
“description”: “MCP Server”
}
}
}

2025-05-30 13:11:07.440 [info] inux: Handling DeleteClient action

2025-05-30 13:11:08.003 [info] inux: Handling CreateClient action

2025-05-30 13:11:08.003 [info] inux: Creating streamableHttp transport

2025-05-30 13:11:08.012 [error] inux: Client error for command Streamable HTTP error: Unexpected content type: null

2025-05-30 13:11:08.013 [info] inux: Client closed for command

2025-05-30 13:11:08.013 [error] inux: Error connecting to streamableHttp server, falling back to SSE: Streamable HTTP error: Unexpected content type: null

2025-05-30 13:11:08.017 [error] inux: Client error for command Failed to send an error response: Error: Not connected