Provides containerized deployment options with features like lightweight image, secure non-root user execution, health checks, and environment validation.
Supports environment variable configuration through .env files for managing API keys and other settings.
Offers deployment configuration for Kubernetes with container specifications and secure API key management.
Provides deployment instructions and environment setup specific to Linux environments.
Supports integration with Claude Desktop on macOS through specific configuration file paths and setup instructions.
Implements the MCP server in Python with async/await support and type hints for better performance and code quality.
AbuseIPDB MCP Server (Python)
A Model Context Protocol (MCP) server for integrating with the AbuseIPDB API. This server provides two main functions: checking IP addresses for abuse reports and reporting abusive IP addresses.
Features
- Check IP: Query AbuseIPDB for abuse reports on a specific IP address
- Report IP: Submit abuse reports for malicious IP addresses
- Categories Mapping: Human-readable category names for abuse reports
- Rate limit handling with detailed error messages
- Comprehensive response formatting
- Input validation for IP addresses and parameters
- Docker support for easy deployment and containerization
- MCP configuration for seamless integration with MCP clients
- Async/await support for better performance
- Type hints for better code quality
Setup
Prerequisites
- Python 3.8 or higher
- Docker (for containerized deployment)
- An AbuseIPDB API key (get one at abuseipdb.com)
Local Installation
- Clone or download this repository
- Create a virtual environment:
- Install dependencies:
- Set your AbuseIPDB API key as an environment variable:
Running the Server
MCP Configuration
This server includes a complete MCP configuration file (mcp.json
) that defines:
- Server metadata: Name, version, description, and author information
- Tool definitions: Complete parameter schemas with validation patterns
- Environment variables: Required API key configuration
- Rate limits: Documentation of AbuseIPDB API limits by subscription tier
- Usage examples: Practical examples for each tool
- Category reference: Complete list of AbuseIPDB abuse categories
Using with MCP Clients
- Copy the server configuration to your MCP client's configuration:
- Test the server:
MCP Tools Available
The server exposes two tools to MCP clients:
check_ip
- Purpose: Check IP reputation and abuse reports
- Parameters:
ipAddress
(required),maxAgeInDays
(optional),verbose
(optional) - Returns: Formatted abuse report with confidence score, geolocation, and recent reports
report_ip
- Purpose: Report abusive IP addresses
- Parameters:
ip
(required),categories
(required),comment
(optional),timestamp
(optional) - Returns: Confirmation with updated abuse confidence score
Docker Deployment
Quick Start with Docker
- Set your API key:
- Run with helper script:
Manual Docker Commands
- Build the image:
- Run the container:
Docker Compose
- Create a
.env
file: - Start with Docker Compose:
- Stop the service:
Docker Features
- Lightweight: Uses Python 3.11 slim base image
- Secure: Runs as non-root user
- Health checks: Built-in container health monitoring
- Environment validation: Validates API key on startup
- Cross-platform: Works on Linux, macOS, and Windows
Claude Desktop Integration
For Claude Desktop, add this to your configuration file:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
Or using Docker:
Available Tools
1. check_ip
Check an IP address for abuse reports.
Parameters:
ipAddress
(required): A valid IPv4 or IPv6 addressmaxAgeInDays
(optional): Only return reports within the last x days (1-365, default: 30)verbose
(optional): Include detailed reports in response (default: false)
Example:
2. report_ip
Report an abusive IP address to AbuseIPDB.
Parameters:
ip
(required): A valid IPv4 or IPv6 address to reportcategories
(required): Comma-separated category IDs (e.g., "18,22")comment
(optional): Descriptive text of the attack (no PII)timestamp
(optional): ISO 8601 datetime of the attack
Example:
API Rate Limits
The server handles rate limits automatically and provides detailed error messages when limits are exceeded. Daily rate limits vary by subscription tier:
Endpoint | Standard | Webmaster | Supporter | Basic | Premium |
---|---|---|---|---|---|
check | 1,000 | 3,000 | 5,000 | 10,000 | 50,000 |
report | 1,000 | 3,000 | 1,000 | 10,000 | 50,000 |
Error Handling
The server provides comprehensive error handling for:
- Invalid API keys
- Rate limit exceeded (429 errors)
- Invalid IP address formats
- Invalid parameters
- Network errors
- API validation errors
Security Notes
⚠️ Important: When reporting IP addresses, ensure you strip any personally identifiable information (PII) from comments. AbuseIPDB is not responsible for any PII you reveal.
Category Reference
Common abuse categories for reporting:
- 18: Brute Force
- 22: SSH
- 21: FTP Brute Force
- 11: Comment Spam
- 10: Email Spam
- 5: Mail Server
- 6: Hacking
- 15: Port Scan
For a complete list, visit the AbuseIPDB categories page.
Development
Available Commands
python src/server.py
- Start the MCP serverpython test/test_server.py
- Run comprehensive testsdocker build -t abuseipdb-mcp-server .
- Build Docker imagedocker-compose up --build
- Start with Docker Compose
Project Structure
Production Deployment
Docker Registry
- Tag and push to registry:
- Deploy on production:
Kubernetes Deployment
License
MIT
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.
Integrates with the AbuseIPDB API to check IP addresses for abuse reports and report abusive IP addresses.
Related MCP Servers
- -securityFlicense-qualityProvides IP geolocation services using IP-API.com without requiring an API key, enabling users to obtain detailed location and network information for any IP address in a clean, formatted output.Last updated -41TypeScript
- AsecurityAlicenseAqualityProvides access to Shodan API functionality, enabling AI assistants to query information about internet-connected devices for cybersecurity research and threat intelligence.Last updated -2325JavaScriptMIT License
- AsecurityAlicenseAqualityProvides blockchain address risk scoring and asset information through the BICScan API, allowing users to assess risks for crypto addresses, domains, and dApps on a scale of 0-100.Last updated -26PythonMIT License
- AsecurityAlicenseAqualityLook up IP address geolocation, network information, detect proxies and VPNs, and find abuse contact details using IPLocate.ioLast updated -672JavaScriptMIT License