SuperAPIAI Directory

mcp-server-thehive

github.com · AI developer platforms

TheHive integration for collaborative security incident response and case management.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

Purpose

mcp-server-thehive is a server based on MCP (Model Context Protocol), designed to connect AI models and automation tools with the TheHive incident response platform, enabling MCP clients (such as AI assistants) to interact with TheHive through a standard protocol to perform security alert retrieval, case management, and incident response operations.

Main Capabilities

The server provides the following tools:

  • get_thehive_alerts: Retrieve a list of alerts from TheHive, with an optional limit parameter (default 100), returning formatted alert information including ID, title, severity, and status.
  • get_thehive_alert_by_id: Retrieve detailed information for a specified alert, with the required parameter alert_id, returning comprehensive alert details.
  • get_thehive_cases: Retrieve a list of cases from TheHive, with an optional limit parameter (default 100), returning formatted case information.
  • get_thehive_case_by_id: Retrieve detailed information for a specified case, with the required parameter case_id, returning comprehensive case details.
  • promote_alert_to_case: Promote an alert to a case, with the required parameter alert_id, returning information about the newly created case.
  • create_thehive_case: Create a new case in TheHive, with the required parameters title and description, and optional parameters including severity, tags, tlp, pap, status, assignee, case_template, start_date, returning information about the newly created case.

Usage

Before use, the following requirements must be met: an accessible TheHive 5 instance; a valid TheHive API token.

How to obtain: Download the precompiled binary for each operating system from the GitHub Releases page, make it executable, and place it in the desired location; or build from source.

Configure environment variables:

  • THEHIVE_URL: TheHive API base URL (default http://localhost:9000/api)
  • THEHIVE_API_TOKEN: TheHive API token (required)
  • VERIFY_SSL: Whether to verify SSL certificates (default false)
  • RUST_LOG: Log level (optional, e.g. debug, info)

You can create a .env file in the project root directory.

Obtaining an API token: Log in to the TheHive instance, go to User Settings → API Keys, click Create API Key, and copy the generated token as THEHIVE_API_TOKEN.

Running the server: The server communicates via stdio using the MCP protocol, and the MCP client must be configured to use this server. Typical operations include retrieving recent alerts, getting alert details, promoting alerts to cases, and creating new cases.

Project Structure

Dependencies include rmcp (MCP protocol implementation), thehive-client (TheHive API client library), tokio (asynchronous runtime), reqwest (HTTP client), serde (serialization framework), tracing (logging and instrumentation). The project includes comprehensive integration tests using a mock TheHive server, enabling isolated and repeatable testing without the need for a live TheHive instance.

Security Considerations

  • Store API tokens securely (use environment variables or secure credential storage)
  • Never commit API tokens to version control
  • Enable SSL verification in production environments
  • Restrict network access to the TheHive instance
  • Use least-privilege API tokens to access TheHive
  • Monitor and log all API interactions
  • Rotate API tokens regularly

Common Troubleshooting

  • Connection refused: Verify that THEHIVE_URL is correct; check network connectivity to the TheHive instance; ensure that TheHive is running and accessible.
  • Authentication failure: Verify that THEHIVE_API_TOKEN is correct and not expired; check whether the API token has the necessary permissions; ensure that the token format is correct.
  • SSL certificate error: During testing, VERIFY_SSL=false can be set (not recommended for production); install the correct SSL certificate; use a valid certificate authority.

Enable debug logging for troubleshooting.

Contribution and License

Contribution process: Fork the repository, create a feature branch, make changes,Add applicable tests, submit a pull request. This project is licensed under the MIT License, see the LICENSE file for details.

Related Projects

thehive-client-rs (Rust client library for TheHive API), mcp-server-cortex (MCP server for Cortex), mcp-server-wazuh (MCP server for Wazuh SIEM).

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools