@last9/mcp-server 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +76 -12
  2. package/package.json +9 -5
package/README.md CHANGED
@@ -9,18 +9,75 @@ A [Model Context Protocol](https://modelcontextprotocol.io/) server implementati
9
9
 
10
10
  ## Status
11
11
 
12
- Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements two MCP [tools](https://modelcontextprotocol.io/docs/concepts/tools):
12
+ Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements the following MCP [tools](https://modelcontextprotocol.io/docs/concepts/tools):
13
13
 
14
- - `get_exceptions`: Get list of execeptions
15
- - `get_servicegraph`: Get Service graph for an endpoint from the exception
16
- - `get_logs`: Get logs filtered by service name and/or severity level
14
+ - `get_exceptions`: Get list of exceptions.
15
+ - `get_service_graph`: Get service graph for an endpoint from the exception.
16
+ - `get_logs`: Get logs filtered by service name and/or severity level.
17
+ - `get_drop_rules`: Get drop rules for logs that determine what logs get filtered out at [Last9 Control Plane](https://last9.io/control-plane)
18
+ - `add_drop_rule`: Create a drop rule for logs at [Last9 Control Plane](https://last9.io/control-plane)
17
19
 
20
+ ## Tools Documentation
21
+
22
+ ### get_exceptions
23
+
24
+ Retrieves server-side exceptions over a specified time range.
25
+
26
+ Parameters:
27
+
28
+ - `limit` (integer, optional): Maximum number of exceptions to return. Default: 20.
29
+ - `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).
30
+ - `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS).
31
+ - `span_name` (string, optional): Name of the span to filter by.
32
+
33
+ ### get_service_graph
34
+
35
+ Gets the upstream and downstream services for a given span name, along with the throughput for each service.
36
+
37
+ Parameters:
38
+
39
+ - `span_name` (string, required): Name of the span to get dependencies for.
40
+ - `lookback_minutes` (integer, optional): Number of minutes to look back. Default: 60.
41
+ - `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).
42
+
43
+ ### get_logs
44
+
45
+ Gets logs filtered by optional service name and/or severity level within a specified time range.
46
+
47
+ Parameters:
48
+
49
+ - `service` (string, optional): Name of the service to get logs for.
50
+ - `severity` (string, optional): Severity of the logs to get.
51
+ - `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).
52
+ - `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS).
53
+ - `limit` (integer, optional): Maximum number of logs to return. Default: 20.
54
+
55
+ ### get_drop_rules
56
+
57
+ Gets drop rules for logs, which determine what logs get filtered out from reaching Last9.
58
+
59
+ ### add_drop_rule
60
+
61
+ Adds a new drop rule to filter out specific logs at [Last9 Control Plane](https://last9.io/control-plane)
62
+
63
+ Parameters:
64
+
65
+ - `name` (string, required): Name of the drop rule.
66
+ - `filters` (array, required): List of filter conditions to apply. Each filter has:
67
+ - `key` (string, required): The key to filter on. Only attributes and resource.attributes keys are supported. For resource attributes, use format: resource.attributes[key_name] and for log attributes, use format: attributes[key_name] Double quotes in key names must be escaped.
68
+ - `value` (string, required): The value to filter against.
69
+ - `operator` (string, required): The operator used for filtering. Valid values:
70
+ - "equals"
71
+ - "not_equals"
72
+ - `conjunction` (string, required): The logical conjunction between filters. Valid values:
73
+ - "and"
18
74
 
19
75
  ## Installation
20
76
 
21
77
  You can install the Last9 Observability MCP server using either:
22
78
 
23
79
  ### Homebrew
80
+
24
81
  ```
25
82
  # Add the Last9 tap
26
83
  brew tap last9/tap
@@ -30,6 +87,7 @@ brew install last9-mcp
30
87
  ```
31
88
 
32
89
  ### NPM
90
+
33
91
  ```bash
34
92
  # Install globally
35
93
  npm install -g @last9/mcp-server
@@ -46,8 +104,11 @@ The service requires the following environment variables:
46
104
 
47
105
  - `LAST9_AUTH_TOKEN`: Authentication token for Last9 MCP server (required)
48
106
  - `LAST9_BASE_URL`: Last9 API URL (required)
107
+ - `LAST9_REFRESH_TOKEN`: Refresh Token with Write permissions. Needed for accessing control plane APIs (required).
49
108
 
50
- Signup at [Last9](https://app.last9.io/) and get your env variable keys [here](https://app.last9.io/integrations?integration=OpenTelemetry).
109
+ - Signup at [Last9](https://app.last9.io/) and setup one of the [integrations](https://last9.io/docs/integrations/).
110
+ - Obtain `LAST9_BASE_URL` and `LAST9_AUTH_TOKEN` from [here](https://app.last9.io/integrations?integration=OpenTelemetry).
111
+ - The Write Refresh Token can be obtained from [API Access](https://app.last9.io/settings/api-access) page.
51
112
 
52
113
  ## Usage with Claude Desktop
53
114
 
@@ -69,8 +130,9 @@ code ~/Library/Application\ Support/Claude/claude_desktop_config.json
69
130
  "last9": {
70
131
  "command": "/opt/homebrew/bin/last9-mcp",
71
132
  "env": {
72
- "LAST9_AUTH_TOKEN": "your_auth_token",
73
- "LAST9_BASE_URL": "https://otlp.last9.io"
133
+ "LAST9_AUTH_TOKEN": "<your_auth_token>",
134
+ "LAST9_BASE_URL": "<last9_otlp_host>",
135
+ "LAST9_REFRESH_TOKEN": "<refresh_token_from_last9_dashboard>"
74
136
  }
75
137
  }
76
138
  }
@@ -93,8 +155,9 @@ Configure Cursor to use the MCP server:
93
155
  "last9": {
94
156
  "command": "/opt/homebrew/bin/last9-mcp",
95
157
  "env": {
96
- "LAST9_AUTH_TOKEN": "your_auth_token",
97
- "LAST9_BASE_URL": "https://otlp.last9.io"
158
+ "LAST9_AUTH_TOKEN": "<auth_token>",
159
+ "LAST9_BASE_URL": "<last9_otlp_host>",
160
+ "LAST9_REFRESH_TOKEN": "<write_refresh_token>"
98
161
  }
99
162
  }
100
163
  }
@@ -118,10 +181,11 @@ Configure Cursor to use the MCP server:
118
181
  "last9": {
119
182
  "command": "/opt/homebrew/bin/last9-mcp",
120
183
  "env": {
121
- "LAST9_AUTH_TOKEN": "your_auth_token",
122
- "LAST9_BASE_URL": "https://otlp.last9.io"
184
+ "LAST9_AUTH_TOKEN": "<auth_token>",
185
+ "LAST9_BASE_URL": "<last9_otlp_host>",
186
+ "LAST9_REFRESH_TOKEN": "<refresh_token>"
123
187
  }
124
188
  }
125
189
  }
126
190
  }
127
- ```
191
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@last9/mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Last9 MCP Server - Model Context Protocol server implementation for Last9",
5
5
  "bin": {
6
6
  "last9-mcp": "./bin/cli.js"
@@ -13,8 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "postinstall": "node bin/download-binary.js",
16
- "preversion": "go run main.go --version",
17
- "postversion": "git push && git push --tags"
16
+ "preversion": "go run . --version"
18
17
  },
19
18
  "repository": {
20
19
  "type": "git",
@@ -24,7 +23,12 @@
24
23
  "node": ">=14"
25
24
  },
26
25
  "preferGlobal": true,
27
- "keywords": ["last9", "mcp", "ai", "claude"],
26
+ "keywords": [
27
+ "last9",
28
+ "mcp",
29
+ "ai",
30
+ "claude"
31
+ ],
28
32
  "author": "Last9",
29
33
  "license": "MIT",
30
34
  "bugs": {
@@ -34,4 +38,4 @@
34
38
  "publishConfig": {
35
39
  "access": "public"
36
40
  }
37
- }
41
+ }