Skip to content

Commit 2aa697c

Browse files
authored
docs: add GET request handling for streamableHttp stateless mode (#1161)
1 parent 466483f commit 2aa697c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ app.post('/mcp', async (req, res) => {
625625
}
626626
});
627627

628+
// Handle GET requests when session management is not supported - the server must return an HTTP 405 status code in this case
629+
app.get('/mcp', (req, res) => {
630+
res.status(405).end();
631+
});
632+
628633
const port = parseInt(process.env.PORT || '3000');
629634
app.listen(port, () => {
630635
console.log(`MCP Server running on http://localhost:${port}/mcp`);

0 commit comments

Comments
 (0)