The Huntress API MCP Server provides programmatic access to Huntress API functionality, enabling you to manage and interact with:
- Account information: Retrieve current account details
- Organizations: List all organizations and get specific organization details
- Agents: List agents (with filters for platform/organization) and get specific agent details
- Reports: Access incident reports (filterable by status/severity/organization), summary reports (filterable by type/organization), and billing reports (filterable by status)
The server includes built-in rate limiting (60 requests per minute) and error handling for invalid requests, API errors, and rate limit enforcement.
Used for managing API credentials and environment configuration for the Huntress API server.
Used for installing dependencies and building the Huntress API MCP server.
Huntress API MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with the Huntress API. This server enables programmatic access to Huntress functionality including account management, organization management, agent management, incident reports, and more.
Features
- Latest MCP SDK 1.15.1: Built with the latest Model Context Protocol features
- Deferred Initialization: Optimized for Smithery deployment with lazy loading
- Container Support: Ready for containerized deployment via Smithery
- HTTP/SSE Transport: Supports both stdio and HTTP/SSE modes
- CORS Enabled: Full CORS support for browser-based MCP clients
- Health Check: Built-in health check endpoint for container orchestration
- Rate Limiting: Built-in rate limiting (60 requests per minute)
- Comprehensive Error Handling: Detailed error messages and validation
- Session Management: Compatible with Smithery's tool discovery process
Installation
Installing via Smithery
To install Huntress API MCP Server for Claude Desktop automatically via Smithery:
Manual Installation
- Clone the repository
- Install dependencies:
- Create a
.env
file based on.env.example
:
- Build the server:
Available Tools
Account Management
get_account_info
: Get information about the current account
Organization Management
list_organizations
: List organizations in the account (supports pagination)get_organization
: Get details of a specific organization
Agent Management
list_agents
: List agents in the account (supports pagination)get_agent
: Get details of a specific agent
Incident Management
list_incidents
: List incidents in the account (supports pagination and status filtering)get_incident
: Get details of a specific incident
Configuration
The server requires the following environment variables:
HUNTRESS_API_KEY
: Your Huntress API KeyHUNTRESS_API_SECRET
: Your Huntress API Secret Key
These can be obtained from your Huntress account at <your_account_subdomain>.huntress.io
under API Credentials.
Usage with MCP
Local Development (stdio mode)
Add the following configuration to your MCP settings:
Container/HTTP Mode
When running in container mode, the server exposes:
- HTTP Endpoint:
http://localhost:3000/
(POST for MCP requests) - SSE Endpoint:
http://localhost:3000/sse
(Server-Sent Events) - Health Check:
http://localhost:3000/health
(GET for health status)
Rate Limiting
The server implements Huntress API's rate limiting of 60 requests per minute on a sliding window. This means:
- No more than 60 requests can be made within any 60-second period
- The window slides, so if request 1 is made at T0 and request 60 at T30, request 61 must wait until T60
Smithery Deployment
This server is optimized for deployment on Smithery using container deployment, featuring:
- Container Runtime: Uses Docker container with HTTP streaming (SSE)
- HTTP Endpoint: Implements
/
endpoint for MCP communication - Environment Variable Configuration: Maps configuration to environment variables
- Deferred Initialization: Credentials are only loaded when tools are actually invoked
- Tool Discovery: Tools can be listed without requiring authentication
Smithery Configuration
The smithery.yaml
uses:
runtime: "container"
for Docker container deployment- HTTP streaming: Server-Sent Events (SSE) for real-time communication
- Environment variable mapping: Maps configuration to
HUNTRESS_API_KEY
andHUNTRESS_API_SECRET
- Lazy loading: Tools discoverable without authentication
Deployment Steps
- Push to GitHub: Ensure your code is in a GitHub repository
- Connect to Smithery: Visit https://smithery.ai and connect your GitHub
- Deploy: Use Smithery's container deployment for automatic building
Latest MCP Features (v1.15.1)
This server leverages the latest MCP SDK features including:
- Enhanced Error Handling: Improved error validation and reporting
- CORS Support: For browser-based MCP clients
- Session Lifecycle Hooks: Better session management
- OAuth Improvements: Enhanced authentication methods
- Async Callback Support: For session initialization and cleanup
- Custom Headers: Support for custom authentication headers
- Streamable HTTP Transport: Support for HTTP/SSE transport modes
- HTTP Endpoint:
/mcp
endpoint with proper REST methods
HTTP Endpoint Details
When running in HTTP mode (Smithery deployment), the server exposes:
- MCP Endpoint:
http://localhost:3000/mcp
- GET: Returns server capabilities for tool discovery
- POST: Handles MCP tool calls
- DELETE: Handles session cleanup
- Health Check:
http://localhost:3000/health
- Configuration: Via query parameters (
?huntressApiKey=xxx&huntressApiSecret=yyy
)
Docker Support (Legacy)
For custom container deployment:
Build Docker Image
Run Docker Container
Error Handling
The server handles various error scenarios:
- Invalid API credentials
- Rate limit exceeded
- Invalid request parameters
- API response errors
- Session management errors
- Tool discovery failures
- Container health issues
Development
Local Development
Build
Clean
License
MIT License - See LICENSE file for details
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.
Tools
MCP server for Huntress API integration
Related MCP Servers
- AsecurityAlicenseAqualityMCP server for searching npm packagesLast updated -173013JavaScriptMIT License
- TypeScriptMIT License
- AsecurityAlicenseAqualityAlchemy MCP ServerLast updated -1119063TypeScriptMIT License