@last9/mcp-server
Advanced tools
+1
-1
| { | ||
| "name": "@last9/mcp-server", | ||
| "version": "0.9.0", | ||
| "version": "0.10.0", | ||
| "description": "Last9 MCP Server - Model Context Protocol server implementation for Last9", | ||
@@ -5,0 +5,0 @@ "bin": { |
+12
-33
@@ -328,39 +328,18 @@ # Last9 MCP Server | ||
| MCP Streamable HTTP requires an initialize handshake first. Don't set `Mcp-Session-Id` on the first request. | ||
| The Streamable HTTP handler runs in **stateless** mode, so any request is served independently. An `initialize` handshake and an `Mcp-Session-Id` header are optional — clients that send them still work (the header is accepted and ignored), and clients can also skip straight to `tools/list` / `tools/call`. Every tool is an independent request/response query; the server issues no server→client notifications, so `GET /mcp` (the SSE stream) returns `405`. | ||
| ```bash | ||
| # Step 1: Initialize | ||
| SESSION_ID=$(curl -si -X POST http://localhost:8080/mcp \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 1, | ||
| "method": "initialize", | ||
| "params": { | ||
| "protocolVersion": "2024-11-05", | ||
| "capabilities": {}, | ||
| "clientInfo": {"name": "curl-test", "version": "1.0"} | ||
| } | ||
| }' | grep -i "^Mcp-Session-Id:" | awk '{print $2}' | tr -d '\r') | ||
| echo "Session: $SESSION_ID" | ||
| # Step 2: Send initialized notification | ||
| # List tools — a session handshake is optional in stateless mode | ||
| curl -s -X POST http://localhost:8080/mcp \ | ||
| -H "Content-Type: application/json" \ | ||
| -H "Mcp-Session-Id: $SESSION_ID" \ | ||
| -d '{"jsonrpc": "2.0", "method": "notifications/initialized", "params": {}}' | ||
| -H "Accept: application/json, text/event-stream" \ | ||
| -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | ||
| # Step 3: List tools | ||
| # Call a tool | ||
| curl -s -X POST http://localhost:8080/mcp \ | ||
| -H "Content-Type: application/json" \ | ||
| -H "Mcp-Session-Id: $SESSION_ID" \ | ||
| -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | ||
| # Step 4: Call a tool | ||
| curl -s -X POST http://localhost:8080/mcp \ | ||
| -H "Content-Type: application/json" \ | ||
| -H "Mcp-Session-Id: $SESSION_ID" \ | ||
| -H "Accept: application/json, text/event-stream" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 3, | ||
| "id": 2, | ||
| "method": "tools/call", | ||
@@ -370,3 +349,3 @@ "params": { | ||
| "arguments": { | ||
| "service": "your-service-name", | ||
| "service_name": "your-service-name", | ||
| "lookback_minutes": 30, | ||
@@ -413,3 +392,3 @@ "limit": 10 | ||
| - `span_name` (string, optional): Filter by span name. | ||
| - `deployment_environment` (string, optional): Filter by environment. | ||
| - `env` (string, optional): Filter by environment. | ||
@@ -523,3 +502,3 @@ ### get_service_summary | ||
| - `service` (string, required) | ||
| - `service_name` (string, required) | ||
| - `lookback_minutes` (integer, optional): Default: 60. | ||
@@ -603,4 +582,4 @@ - `limit` (integer, optional): Default: 20. | ||
| - `lookback_minutes` (integer, optional): Default: 60. | ||
| - `service` (string, optional) | ||
| - `environment` (string, optional) | ||
| - `service_name` (string, optional) | ||
| - `env` (string, optional) | ||
| - `event_name` (string, optional): Call without this first to get `available_event_names`. | ||
@@ -607,0 +586,0 @@ |
41274
-0.7%656
-3.1%