The Rollbar MCP server provides integration with Rollbar's error tracking platform, allowing Large Language Models (LLMs) to access and analyze error data, deployment information, and user details from your Rollbar projects.
The easiest way to use the Rollbar MCP server is with NPX. Add the following configuration to your ~/.cursor/mcp.json
:
{
"mcpServers": {
"rollbar-mcp": {
"command": "npx",
"args": ["-y", "@hiyorineko/mcp-rollbar-server"],
"env": {
"ROLLBAR_PROJECT_TOKEN": "YOUR_PROJECT_ACCESS_TOKEN",
"ROLLBAR_ACCOUNT_TOKEN": "YOUR_ACCOUNT_ACCESS_TOKEN",
"ROLLBAR_PROJECT_ID": "YOUR_PROJECT_ID",
"ROLLBAR_PROJECT_NAME": "YOUR_PROJECT_NAME"
}
}
}
}
Alternatively, you can install and run the server locally:
$ cd mcp-rollbar-server
$ npm install
$ npm run build
Then, update your ~/.cursor/mcp.json
:
{
"mcpServers": {
"rollbar-mcp": {
"command": "YOUR_NODE_PATH",
"args": ["YOUR_PROJECT_PATH/mcp-rollbar-server/dist/src/index.js"],
"env": {
"ROLLBAR_PROJECT_TOKEN": "YOUR_PROJECT_ACCESS_TOKEN",
"ROLLBAR_ACCOUNT_TOKEN": "YOUR_ACCOUNT_ACCESS_TOKEN",
"ROLLBAR_PROJECT_ID": "YOUR_PROJECT_ID",
"ROLLBAR_PROJECT_NAME": "YOUR_PROJECT_NAME"
}
}
}
}
To find your Node.js path, run which node
in your terminal.
Two types of tokens are used for different APIs:
ROLLBAR_PROJECT_TOKEN
: Required for project-level operations (errors, occurrences, environments, deployments)ROLLBAR_ACCOUNT_TOKEN
: Required for account-level operations (projects, users)Optional variables:
ROLLBAR_PROJECT_ID
: Default project ID when not specified in requestsROLLBAR_PROJECT_NAME
: Default project name for referenceWhile you can use the server with only one token type, configuring both provides full functionality.
The Rollbar MCP server provides multiple tools for interacting with Rollbar data. Here are some common usage patterns:
To retrieve the most recent errors in your production environment:
List the most recent errors in my production environment.
This will use the rollbar_list_items
tool with the environment parameter set to "production".
To get detailed information about a specific error:
Get detailed information for error item with ID 12345, including stack trace and recent occurrences.
This combines the rollbar_get_item
and rollbar_list_occurrences
tools.
To view recent deployments:
Show me the recent deployments for project 67890.
This uses the rollbar_list_deploys
tool with the specified project ID.
To find critical errors from the past week:
List all critical errors that occurred in the last week.
This uses the rollbar_list_items
tool with level="critical" and appropriate time filters.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.