Skip to content

Commit e3b4496

Browse files
committed
clean up and small fixes to comments
1 parent 5730f3e commit e3b4496

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

src/examples/client/simpleStreamableHttp.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ async function main(): Promise<void> {
3030
// Connect the client using the transport and initialize the server
3131
await client.connect(transport);
3232
console.log('Connected to MCP server');
33-
// Open a standalone SSE stream to receive server-initiated messages
3433
console.log('Opening SSE stream to receive server notifications...');
3534
try {
3635
await transport.openSseStream();

src/examples/server/simpleStreamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ app.post('/mcp', async (req: Request, res: Response) => {
174174
}
175175
});
176176

177-
// Handle GET requests for SSE streams (now using built-in support from StreamableHTTP)
177+
// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
178178
app.get('/mcp', async (req: Request, res: Response) => {
179179
const sessionId = req.headers['mcp-session-id'] as string | undefined;
180180
if (!sessionId || !transports[sessionId]) {

src/examples/server/standaloneSseWithGetStreamableHttp.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ import { ReadResourceResult } from '../../types.js';
88
const server = new McpServer({
99
name: 'resource-list-changed-notification-server',
1010
version: '1.0.0',
11-
}, {
12-
capabilities: {
13-
resources: {
14-
listChanged: true, // Support notifications for resource list changes
15-
},
16-
}
1711
});
1812

1913
// Store transports by session ID to send notifications

src/server/streamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class StreamableHTTPServerTransport implements Transport {
136136
// or else return HTTP 405 Method Not Allowed
137137
const headers: Record<string, string> = {
138138
"Content-Type": "text/event-stream",
139-
"Cache-Control": "no-cache",
139+
"Cache-Control": "no-cache, no-transform",
140140
Connection: "keep-alive",
141141
};
142142

0 commit comments

Comments
 (0)