docs: Add clarifying comments for stateless streamable HTTP endpoints

Add inline comments explaining why GET and DELETE endpoints return 405 in stateless mode:
- GET: SSE notifications not supported without session management
- DELETE: Session termination not needed in stateless mode
This commit is contained in:
dhodun 2025-05-23 20:01:38 -05:00
commit eefdcf5bf3
No known key found for this signature in database

View file

@ -347,6 +347,7 @@ app.post('/mcp', async (req: Request, res: Response) => {
}
});
// SSE notifications not supported in stateless mode
app.get('/mcp', async (req: Request, res: Response) => {
console.log('Received GET MCP request');
res.writeHead(405).end(JSON.stringify({
@ -359,6 +360,7 @@ app.get('/mcp', async (req: Request, res: Response) => {
}));
});
// Session termination not needed in stateless mode
app.delete('/mcp', async (req: Request, res: Response) => {
console.log('Received DELETE MCP request');
res.writeHead(405).end(JSON.stringify({