-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better CORS defaults for SSE transport #143
Comments
Hey, I am interested in fixing this. would love to discuss more |
For what it is worth, https://github.com/punkpeye/fastmcp defaults to allowing CORS by default. |
+1 Edit: its a bug not an enhancement |
I have developed web servers that integrate MCP SSE functionality:
These servers can be extended with custom routes while retaining full MCP SSE capabilities. Thus, it is possible to add CORS support using the functions from FastAPI or Starlette. |
I am not confident that cors considerations should be even part of MCP SDK. This feels very much like something that should be implemented at a framework/server level. |
It's likely that most MCP servers accessible over SSE should be contactable by frontend web applications, which means the right CORS headers need to be set. The SDK should likely opt-in to this by default, with an opt-out available.
See also modelcontextprotocol/python-sdk#187.
The text was updated successfully, but these errors were encountered: