rapid7
Node.js based tool to query the Rapid7 logs REST API.
claude mcp add --transport stdio el95149-rapid7-mcp-server node /path/to/your/rapid7-mcp-server/mcp-server.js \ --env RAPID7_API_KEY="your-api-key-here" \ --env RAPID7_BASE_URL="https://eu.rest.logs.insight.rapid7.com"
How to use
This MCP server exposes Rapid7 InsightIDR log querying capabilities via the MCP framework. It allows you to query logs within a given logset over a specified time window using natural language or LEQL filters, paginate results, and optionally target specific logsets by name. The server also supports listing available logsets, and you can poll the status of long-running queries. Use the provided tools to construct queries with time ranges in ISO8601 format and, when needed, refine results with filters or LEQL expressions. For production deployments, configure the RAPID7_API_KEY and RAPID7_BASE_URL environment variables to securely authorize and direct requests to the Rapid7 EU API (or another region by adjusting the base URL).
Typical usage flow:
- Start the MCP server (node mcp-server.js) after setting environment variables.
- Use queryRapid7Logset or queryRapid7LogsetByName to fetch logs within a window, with optional perPage and query parameters.
- Use listRapid7Logsets to discover available logsets and their IDs.
- If a long-running query is started, use pollRapid7Query with the returned queryId to monitor progress and retrieve results when complete.
How to install
Prerequisites:
- Node.js installed (v14+ recommended)
- Access to Rapid7 InsightIDR API and a valid API key
- Optional: a local clone of this MCP server repository
Installation steps:
-
Clone the repository: git clone https://github.com/your-org/rapid7-mcp-server.git cd rapid7-mcp-server
-
Install dependencies: npm install
-
Configure environment variables (example):
- RAPID7_API_KEY=your-api-key-here
- RAPID7_BASE_URL=https://eu.rest.logs.insight.rapid7.com
You can set these in a local .env file (if using a runner that loads it) or export them in your shell before starting the server.
-
Run the server: node mcp-server.js
-
(Optional) Run tests: npm test
Additional notes
Tips and notes:
- Do not commit API keys to version control. Use environment variables or a secure vault.
- The RAPID7_BASE_URL defaults to the EU region. To switch regions, update this value to the appropriate base URL for US, CA, AU, AP, etc.
- Ensure the Rapid7 API key has permissions to query logs and access the selected logsets.
- When using listRapid7Logsets, you can discover logset IDs and names to feed into queryRapid7Logset.
- Handle ISO8601 datetime formats strictly; the server converts them to UNIX timestamps for queries.
- If you encounter authentication errors, verify that the API key is valid and has not expired, and confirm network access to the Rapid7 API endpoint.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.