3 ms·
> I did something a little bit hacky: if the request is for GET /mcp and the Accept header includes text/html and NOT application/json or text/event-stream, I r
by cyberge99 5mo ago
> I did something a little bit hacky: if the request is for GET /mcp and the Accept header includes text/html and NOT application/json or text/event-stream, I return a HTML page
Is this not the intended use of request headers?
- lorecore 5mo agoI think so, but if you wanted to be pedantic you could make the argument that the same resource is not being served with the different Accept header. A welcome page is not the same thing as the JSON returned from the MCP spec.
- pull_my_finger 5mo agoMaybe it should return a 303 See Other response
- weird-eye-issue 5mo agoA redirect actually does make sense but then there will be some percentage of users that end up copying the redirect URL and try to use that as the MCP URL
- PufPufPuf 5mo agoTechnically not really, it's supposed to be alternative versions of the same content.