Skip to main content

Rapid7 InsightOps MCP Server

An MCP (Model Context Protocol) server that wraps the Rapid7 InsightOps REST API for log search and analysis. Designed for use with Devin Web (app.devin.ai) as an STDIO MCP server, enabling AI agents to search, query, and analyze production logs directly.

Region: EU only (eu.rest.logs.insight.rapid7.com). Other regions are not supported.

Installation

# From PyPI (once published)
pip install rapid7-mcp-server

# Or directly via uvx
uvx rapid7-mcp-server

# Or from source
pip install git+https://github.com/YOUR_ORG/rapid7-mcp-server.git

Devin Web Setup

  1. Open app.devin.ai and go to Settings > MCP Marketplace
  2. Click "Add Your Own"
  3. Paste this configuration:
{
  "transport": "STDIO",
  "command": "uvx",
  "args": ["rapid7-mcp-server"],
  "env_variables": {
    "RAPID7_API_KEY": "<your Rapid7 API key>"
  }
}
  1. Save. The server will start automatically when Devin uses any Rapid7 tool.

Environment Variables

Variable Required Description
RAPID7_API_KEY Yes Your Rapid7 InsightOps API key (read-only permission is sufficient)

If RAPID7_API_KEY is not set, the server starts but every tool returns a clear error message.

Available Tools

Tool Description
rapid7_list_logs List all available logs to discover log key UUIDs. Optional name filter.
rapid7_list_log_sets List all log sets. Optional name filter.
rapid7_query_log Search a single log using a LEQL query with time range, pagination.
rapid7_query_multiple_logs Search across multiple logs simultaneously (POST-based).
rapid7_query_log_set Search all logs within a log set by name or ID.
rapid7_get_context Get surrounding log lines before/after a specific log entry.
rapid7_download_logs Download raw log data as plain text (max 10 logs).
rapid7_search_trace High-level convenience: search for a traceId across multiple logs.

LEQL Quick Reference

LEQL (Log Entry Query Language) is used in the query parameter:

# Text search (case-insensitive substring)
where(error)
where(NullPointerException)

# Key-value search
where(traceId=abc-123-def)
where(statusCode>=400 AND statusCode<500)

# Regex search
where(/timeout.*connection/i)

# Boolean operators
where(error AND NOT healthcheck)
where(level=ERROR OR level=FATAL)

# Statistical queries (returns counts/aggregates, not log lines)
calculate(COUNT)
where(level=ERROR) calculate(COUNT)
where(statusCode>=500) calculate(COUNT) groupby(service)
calculate(AVERAGE:responseTime) groupby(endpoint)

Time Range Examples

Relative: last 5 minutes, last 1 hour, last 24 hours, last 7 days, yesterday, today

Absolute: Use from_timestamp and to_timestamp (UNIX milliseconds).

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run the server locally (for testing)
RAPID7_API_KEY=your-key rapid7-mcp-server

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rapid7_mcp_server-0.1.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rapid7_mcp_server-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file rapid7_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: rapid7_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rapid7_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c298eabae4e1af47c1e958669aaa2b7340a6caa107a5532f01586f1b79e8eca
MD5 6107e5e8c0b18415350581a97d26d07c
BLAKE2b-256 38473f15e221c2cbbe0e33c60f44d627dce74de0198dc9487080447722b3358a

See more details on using hashes here.

File details

Details for the file rapid7_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rapid7_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 049c64963d52b8307c7ff32b11f1b7eacc99cb8e124ee35905621ee5e56031fb
MD5 c29f82f45f3f1b68fc759c0edbb91e2a
BLAKE2b-256 6792805a88c7f9fb16213a947a4bfb10550bbf7a4f4f01ccd41647f095506fa9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page