docs: add GET request handling for streamableHttp stateless mode (#1161)
This commit is contained in:
parent
466483f25d
commit
2aa697ceda
1 changed files with 5 additions and 0 deletions
|
|
@ -625,6 +625,11 @@ app.post('/mcp', async (req, res) => {
|
|||
}
|
||||
});
|
||||
|
||||
// Handle GET requests when session management is not supported - the server must return an HTTP 405 status code in this case
|
||||
app.get('/mcp', (req, res) => {
|
||||
res.status(405).end();
|
||||
});
|
||||
|
||||
const port = parseInt(process.env.PORT || '3000');
|
||||
app.listen(port, () => {
|
||||
console.log(`MCP Server running on http://localhost:${port}/mcp`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue