Skip to content

Commit 1f06b83

Browse files
authored
Merge pull request #27 from rollbar/brianr/fix-npx
Fix npx and add instructions in readme
2 parents 6178b6f + d023d54 commit 1f06b83

File tree

3 files changed

+63
-9
lines changed

3 files changed

+63
-9
lines changed

README.md

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ A Model Context Protocl (MCP) server for [Rollbar](https://rollbar.com).
77
88
## Features
99

10-
This MCP server implementes the `stdio` server type, which means your AI tool (e.g. Claude) will run it directly; you don't run a separate process.
10+
This MCP server implementes the `stdio` server type, which means your AI tool (e.g. Claude) will run it directly; you don't run a separate process or connect over http.
1111

1212
### Configuration
1313

14-
`ROLLBAR_ACCESS_TOKEN`: a `read`-scope access token for your Rollbar project.
14+
`ROLLBAR_ACCESS_TOKEN`: an access token for your Rollbar project with `read` and/or `write` scope.
1515

1616
### Tools
1717

@@ -25,6 +25,8 @@ This MCP server implementes the `stdio` server type, which means your AI tool (e
2525

2626
`list-items(environment)`: List items filtered by status, environment and a search query.
2727

28+
`update-item(itemId, status?, level?, title?, assignedUserId?, resolvedInVersion?, snoozed?, teamId?)`: Update an item's properties including status, level, title, assignment, and more. Example prompt: `Mark Rollbar item #123456 as resolved` or `Assign item #123456 to user ID 789`. (Requires `write` scope)
29+
2830
## How to Use
2931

3032
Tested with node 18, 20, and 22 (`nvm use 22`).
@@ -40,44 +42,56 @@ npm run build
4042

4143
Configure your `.mcp.json` as follows:
4244

45+
Using npx (recommended):
46+
4347
```
4448
{
4549
"mcpServers": {
4650
"rollbar": {
4751
"type": "stdio",
48-
"command": "node",
52+
"command": "npx",
4953
"args": [
50-
"/ABSOLUTE/PATH/TO/rollbar-mcp-server/build/index.js"
54+
"-y",
55+
"@rollbar/mcp-server"
5156
],
5257
"env": {
53-
"ROLLBAR_ACCESS_TOKEN": "<project read access token>"
58+
"ROLLBAR_ACCESS_TOKEN": "<project read/write access token>"
5459
}
5560
}
5661
}
5762
}
5863
```
5964

65+
Or using a local installation:
66+
67+
6068
### VS Code
6169

6270
Configure your `.vscode/mcp.json` as follows:
6371

72+
Using npx (recommended):
73+
6474
```
6575
{
6676
"servers": {
6777
"rollbar": {
6878
"type": "stdio",
69-
"command": "node",
79+
"command": "npx",
7080
"args": [
71-
"/ABSOLUTE/PATH/TO/rollbar-mcp-server/build/index.js"
81+
"-y",
82+
"@rollbar/mcp-server"
7283
],
7384
"env": {
74-
"ROLLBAR_ACCESS_TOKEN": "<project read access token>"
85+
"ROLLBAR_ACCESS_TOKEN": "<project read/write access token>"
7586
}
7687
}
7788
}
7889
}
7990
```
8091

92+
Or using a local installation:
93+
94+
8195
## How to Develop
8296

8397
Install and build:
@@ -87,6 +101,44 @@ npm install
87101
npm run build
88102
```
89103

104+
Run your local installation from Claude Code:
105+
106+
```
107+
{
108+
"mcpServers": {
109+
"rollbar": {
110+
"type": "stdio",
111+
"command": "node",
112+
"args": [
113+
"/ABSOLUTE/PATH/TO/rollbar-mcp-server/build/index.js"
114+
],
115+
"env": {
116+
"ROLLBAR_ACCESS_TOKEN": "<project read/write access token>"
117+
}
118+
}
119+
}
120+
}
121+
```
122+
123+
Run your local installation from VSCode:
124+
125+
```
126+
{
127+
"servers": {
128+
"rollbar": {
129+
"type": "stdio",
130+
"command": "node",
131+
"args": [
132+
"/ABSOLUTE/PATH/TO/rollbar-mcp-server/build/index.js"
133+
],
134+
"env": {
135+
"ROLLBAR_ACCESS_TOKEN": "<project read/write access token>"
136+
}
137+
}
138+
}
139+
}
140+
```
141+
90142
You can test an individual tool using the `@modelcontextprotocol/inspector` module. For example, test the tool `get-item-details` with arg `counter=2455389`:
91143

92144
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rollbar/mcp-server",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Model Context Protocol server for Rollbar",
55
"repository": {
66
"type": "git",

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
24
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
35
import { registerAllTools } from "./tools/index.js";

0 commit comments

Comments
 (0)