Provides access to TheHive incident response platform, enabling retrieval and analysis of security alerts, case management, promotion of alerts to cases, and performing incident response operations through TheHive's API.
MCP Server for TheHive
An MCP (Model Context Protocol) server that provides AI models and automation tools with access to TheHive incident response platform.
Overview
This server acts as a bridge between MCP clients (like AI assistants) and TheHive, allowing them to:
Retrieve and analyze security alerts
Access case information
Promote alerts to cases
Perform incident response operations
Features
Available Tools
get_thehive_alerts - Retrieve a list of alerts from TheHive
Optional
limit
parameter (default: 100)Returns formatted alert information including ID, title, severity, and status
get_thehive_alert_by_id - Get detailed information about a specific alert
Required
alert_id
parameterReturns comprehensive alert details
get_thehive_cases - Retrieve a list of cases from TheHive
Optional
limit
parameter (default: 100)Returns formatted case information
get_thehive_case_by_id - Get detailed information about a specific case
Required
case_id
parameterReturns comprehensive case details
promote_alert_to_case - Promote an alert to a case
Required
alert_id
parameterReturns information about the newly created case
create_thehive_case - Create a new case in TheHive
Required
title
anddescription
parametersOptional parameters:
severity
,tags
,tlp
,pap
,status
,assignee
,case_template
,start_date
Returns information about the newly created case
Installation
Prerequisites
Access to a TheHive 5 instance
Valid TheHive API token
Downloading Pre-compiled Binaries
You can download pre-compiled binaries for various operating systems from the GitHub Releases page. Download the appropriate binary for your system, make it executable, and place it in your desired location.
Building from Source
Configuration
The server requires the following 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
- Logging level (optional, e.g.,debug
,info
)
Environment File
Create a .env
file in the project root:
Getting a TheHive API Token
Log into your TheHive instance
Go to User Settings → API Keys
Click Create API Key
Copy the generated token and use it as
THEHIVE_API_TOKEN
Usage
Running the Server
Integration with MCP Clients
The server communicates over stdio using the MCP protocol. Configure your MCP client to use this server:
Examples
Retrieving Recent Alerts
Getting Alert Details
Promoting an Alert to Case
Creating a New Case
Development
Project Structure
Dependencies
rmcp - MCP protocol implementation
thehive-client - TheHive API client library
tokio - Async runtime
reqwest - HTTP client
serde - Serialization framework
tracing - Logging and instrumentation
Testing
The project includes a comprehensive suite of integration tests that leverage a mock TheHive server. This mock server simulates the TheHive API, allowing for isolated and repeatable testing of the MCP server's functionality without requiring a live TheHive instance.
Running Tests:
Security Considerations
Store API tokens securely (use environment variables or secure credential stores)
Never commit API tokens to version control
Enable SSL verification in production environments
Limit network access to TheHive instance
Use least-privilege API tokens for TheHive access
Monitor and log all API interactions
Rotate API tokens regularly
Troubleshooting
Common Issues
Connection Refused
Verify
THEHIVE_URL
is correctCheck network connectivity to TheHive instance
Ensure TheHive is running and accessible
Authentication Failed
Verify
THEHIVE_API_TOKEN
is correct and not expiredCheck if the API token has necessary permissions
Ensure the token is properly formatted
SSL Certificate Errors
Set
VERIFY_SSL=false
for testing (not recommended for production)Install proper SSL certificates
Use valid certificate authority
Logging
Enable debug logging for troubleshooting:
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
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
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
TheHive MCP Server
Related MCP Servers
- -securityAlicense-qualityMarineTraffic MCP ServerLast updated -6MIT License
- AsecurityAlicenseAqualityWayback Machine MCP ServerLast updated -212MIT License
- MIT License
- -securityAlicense-qualityApache Hadoop Hive MCP Server by CDataLast updated -1MIT License