@logrocket/mcp
v0.2.1
Published
An MCP (Model Context Protocol) server that enables Claude and other MCP clients to query the LogRocket API in natural language to access information about your LogRocket sessions, metrics, issues, and more. For example, allows you to:
Maintainers
Keywords
Readme
LogRocket MCP Server
An MCP (Model Context Protocol) server that enables Claude and other MCP clients to query the LogRocket API in natural language to access information about your LogRocket sessions, metrics, issues, and more. For example, allows you to:
- Pull in context about your app's behavior to help with debugging and fixing errors
- Get a better sense of how users interact with your app
- Query a user or account's sessions for targeted investigation
Available Tools
use_logrocket
Run a natural language query against LogRocket. Chains tool calls internally to limit context usage.
Parameters:
query(required) - The natural language query to run against LogRocket datachatID(optional) - The ID of a previous conversation to continue; omit to start a new conversation
Example:
"Use LogRocket to tell me how many users have gone through the refills flow today."
...
"On average, how long did it take them to complete the flow?"
...
"How can we improve the flow to reduce the number of users who abandon it?"query_logrocket_user
Deprecated. Use
use_logrocketinstead.
Query LogRocket by user email to get information about their sessions.
Parameters:
userEmail(required) - The email address of the user to queryquestion(required) - Question about the user's behavior/sessions
Example:
"Can you check LogRocket for user [email protected] and tell me what errors they encountered?"query_logrocket_sessions
Deprecated. Use
use_logrocketinstead.
Query LogRocket for specific sessions by URL. Use this when you have a LogRocket session URL.
Parameters:
sessionURLs(required) - Array of LogRocket session URLs (max 10)question(required) - Question about the sessions
Session URL format: https://app.logrocket.com/{org}/{app}/s/{recordingID}/{sessionID}
Example:
"What errors occurred in this session: https://app.logrocket.com/apphub/logrocket/s/abc123/456"Environment Variables
| Variable | Description |
| --------------------- | --------------------------------------- |
| LOGROCKET_API_TOKEN | API token for authentication (required) |
The API token is available at https://app.logrocket.com/r/settings/general.
Configuration for MCP Clients
Cursor
Add the following to your Cursor MCP configuration file (~/.cursor/mcp.json):
{
"mcpServers": {
"logrocket": {
"command": "npx",
"args": ["@logrocket/mcp"],
"env": {
"LOGROCKET_API_TOKEN": "..."
}
}
}
}Claude Desktop
Add to your Claude Desktop configuration file:
{
"mcpServers": {
"logrocket": {
"command": "npx",
"args": ["@logrocket/mcp"],
"env": {
"LOGROCKET_API_TOKEN": "..."
}
}
}
}Configuration File Locations
- Cursor:
~/.cursor/mcp.json - macOS (Claude Desktop):
~/Library/Application Support/Claude/claude_desktop_config.json - Windows (Claude Desktop):
%APPDATA%\Claude\claude_desktop_config.json - Linux (Claude Desktop):
~/.config/Claude/claude_desktop_config.json
Security Notes
- Never commit your API token to version control
- Rotate tokens regularly according to your security policy
- The token should be treated as sensitive credentials
Troubleshooting
Token not found error
If you see an error about LOGROCKET_API_TOKEN not being set:
- Verify the environment variable is set in your MCP configuration
- Restart your MCP client after updating the configuration
Connection errors
If you encounter connection timeouts or errors:
- Verify you have internet connectivity
- Check if the API endpoint is accessible
- Verify your API token is valid and not expired
- Check for any firewall or proxy restrictions
