remove logs how to ititialize with curl - not needed anymore as we have client
This commit is contained in:
parent
c3f08567a2
commit
16df308d4f
3 changed files with 1 additions and 45 deletions
|
|
@ -148,28 +148,6 @@ app.get('/mcp', async (req: Request, res: Response) => {
|
|||
const PORT = 3000;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`MCP Streamable HTTP Server listening on port ${PORT}`);
|
||||
console.log(`Initialize session with the command below id you are using curl for testing:
|
||||
-----------------------------
|
||||
SESSION_ID=$(curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Accept: text/event-stream" \
|
||||
-d '{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "initialize",
|
||||
"params": {
|
||||
"capabilities": {},
|
||||
"protocolVersion": "2025-03-26",
|
||||
"clientInfo": {
|
||||
"name": "test",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
"id": "1"
|
||||
}' \
|
||||
-i http://localhost:3000/mcp 2>&1 | grep -i "mcp-session-id" | cut -d' ' -f2 | tr -d '\\r')
|
||||
echo "Session ID: $SESSION_ID"
|
||||
-----------------------------`);
|
||||
});
|
||||
|
||||
// Handle server shutdown
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { CallToolResult } from '../../types.js';
|
|||
* (protocol version 2024-11-05). It mainly used for testing backward compatible clients.
|
||||
*
|
||||
* The server exposes two endpoints:
|
||||
* - /sse: For establishing the SSE stream (GET)
|
||||
* - /mcp: For establishing the SSE stream (GET)
|
||||
* - /messages: For receiving client messages (POST)
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -272,28 +272,6 @@ app.delete('/mcp', async (req: Request, res: Response) => {
|
|||
const PORT = 3000;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`MCP Streamable HTTP Server listening on port ${PORT}`);
|
||||
console.log(`Initialize session with the command below id you are using curl for testing:
|
||||
-----------------------------
|
||||
SESSION_ID=$(curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Accept: text/event-stream" \
|
||||
-d '{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "initialize",
|
||||
"params": {
|
||||
"capabilities": {},
|
||||
"protocolVersion": "2025-03-26",
|
||||
"clientInfo": {
|
||||
"name": "test",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
"id": "1"
|
||||
}' \
|
||||
-i http://localhost:3000/mcp 2>&1 | grep -i "mcp-session-id" | cut -d' ' -f2 | tr -d '\\r')
|
||||
echo "Session ID: $SESSION_ID"
|
||||
-----------------------------`);
|
||||
});
|
||||
|
||||
// Handle server shutdown
|
||||
|
|
|
|||
Loading…
Reference in a new issue