Remix.run Logo
cyberge99 4 hours 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?

PufPufPuf 4 hours ago | parent | next [-]

Technically not really, it's supposed to be alternative versions of the same content.

lorecore 4 hours ago | parent | prev [-]

I 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 4 hours ago | parent [-]

Maybe it should return a 303 See Other response

weird-eye-issue 2 hours ago | parent [-]

A 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