Skip to main content
Glama
alephnan

MCP AbuseIPDB Server

by alephnan

MCP AbuseIPDB Server

An MCP (Model Context Protocol) server that provides threat intelligence lookups against the AbuseIPDB database. This server enables any MCP-capable client to perform IP reputation checks, CIDR block analysis, and access curated blacklists with intelligent caching and rate limiting.

Features

  • IP Reputation Checks: Single IP address lookups with detailed abuse data

  • CIDR Block Analysis: Check entire network ranges for malicious activity

  • Blacklist Access: Retrieve current AbuseIPDB blacklist with configurable confidence levels

  • Bulk Operations: Check multiple IP addresses efficiently

  • Log Enrichment: Extract and analyze IP addresses from log lines

  • Intelligent Caching: SQLite-based caching with TTL to minimize API usage

  • Rate Limiting: Built-in quota management for AbuseIPDB API limits

  • Security Focused: Input validation, private IP filtering, and secure defaults

Related MCP server: IPLocate MCP Server

Quick Start

Prerequisites

  • Python 3.11 or higher

  • AbuseIPDB API key (get one at abuseipdb.com)

Installation

  1. Clone the repository:

git clone <repository-url>
cd AbuseIPDB-MCP
  1. Install the package:

pip install -e .
  1. Set up your environment:

cp .env.example .env
# Edit .env and add your ABUSEIPDB_API_KEY
  1. Run the server:

python -m mcp_abuseipdb.server

MCP Client Configuration

Add to your MCP client configuration (e.g., mcp.json):

{
  "mcpServers": {
    "mcp-abuseipdb": {
      "command": "python",
      "args": ["scripts/start_mcp_server.py"],
      "cwd": "/path/to/AbuseIPDB-MCP",
      "env": {
        "ABUSEIPDB_API_KEY": "your_api_key_here"
      }
    }
  }
}

Option 2: Direct Module Execution

{
  "mcpServers": {
    "mcp-abuseipdb": {
      "command": "python",
      "args": ["-m", "mcp_abuseipdb.server"],
      "cwd": "/path/to/AbuseIPDB-MCP",
      "env": {
        "ABUSEIPDB_API_KEY": "your_api_key_here"
      }
    }
  }
}

Important Notes:

  • Replace your_api_key_here with your actual AbuseIPDB API key

  • Update /path/to/AbuseIPDB-MCP to the actual path where you cloned this repository

  • The enhanced startup script (Option 1) provides better error diagnostics

  • Ensure your API key is valid and not expired on the AbuseIPDB website

Available Tools

check_ip

Check the reputation of a single IP address.

Parameters:

  • ip_address (required): IP address to check

  • max_age_days (optional): Maximum age of reports (default: 30)

  • verbose (optional): Include detailed reports (default: false)

  • threshold (optional): Confidence threshold for flagging (default: 75)

check_block

Check the reputation of a CIDR network block.

Parameters:

  • network (required): CIDR network (e.g., "192.168.1.0/24")

  • max_age_days (optional): Maximum age of reports (default: 30)

get_blacklist

Retrieve the AbuseIPDB blacklist.

Parameters:

  • confidence_minimum (optional): Minimum confidence level (default: 90)

  • limit (optional): Maximum entries to retrieve

bulk_check

Check multiple IP addresses efficiently.

Parameters:

  • ip_addresses (required): List of IP addresses

  • max_age_days (optional): Maximum age of reports (default: 30)

  • threshold (optional): Confidence threshold for flagging (default: 75)

enrich_log_line

Extract and analyze IP addresses from log entries.

Parameters:

  • log_line (required): Log line containing IP addresses

  • threshold (optional): Confidence threshold for flagging (default: 75)

  • max_age_days (optional): Maximum age of reports (default: 30)

Available Resources

cache://info

Get current cache statistics and rate limiter status.

doc://usage

Complete API usage documentation and examples.

Available Prompts

triage_ip

Generate security analyst triage notes for an IP address.

Parameters:

  • ip_data (required): IP check data from AbuseIPDB

Configuration

All configuration is done via environment variables. Copy .env.example to .env and customize:

Required Settings

  • ABUSEIPDB_API_KEY: Your AbuseIPDB API key

Optional Settings

  • MAX_AGE_DAYS: Default report age limit (default: 30)

  • CONFIDENCE_THRESHOLD: Default confidence threshold (default: 75)

  • DAILY_QUOTA: API request quota (default: 1000)

  • CACHE_DB_PATH: SQLite cache file location (default: ./cache.db)

  • LOG_LEVEL: Logging level (default: INFO)

  • ALLOW_PRIVATE_IPS: Allow checking private IPs (default: false)

Usage Examples

Basic IP Check

Check the reputation of 8.8.8.8

Log Analysis

Analyze this log line for threats:
192.168.1.100 - - [10/Jan/2024:10:00:00 +0000] "GET /admin/login.php HTTP/1.1" 200 1234

Bulk Analysis

Check these IPs for malicious activity:
- 203.0.113.100
- 198.51.100.50
- 192.0.2.25

Security Investigation

I'm investigating suspicious activity from 203.0.113.100. Can you:
1. Check its reputation with detailed reports
2. Analyze the surrounding network block
3. Generate triage notes for our security team

See examples/queries.md for more detailed examples.

Docker Deployment

Build and run with Docker:

# Build the image
docker build -f docker/Dockerfile -t mcp-abuseipdb .

# Run the container
docker run -e ABUSEIPDB_API_KEY=your_key_here mcp-abuseipdb

Development

Setup Development Environment

pip install -e ".[dev]"
pre-commit install

Run Tests

pytest

Security Considerations

  • API Key Protection: Never commit API keys to version control

  • Private IP Filtering: Private IPs are blocked by default

  • Rate Limiting: Built-in quota management prevents API abuse

  • Input Validation: All inputs are validated and sanitized

  • Caching: Reduces API calls and improves performance

Rate Limits

AbuseIPDB free tier provides 1,000 requests per day. This server:

  • Implements intelligent caching to minimize API usage

  • Provides rate limiting with configurable quotas

  • Gracefully handles rate limit errors with backoff

Troubleshooting

"Unauthorized API key" Error in Claude App

If you're getting unauthorized API key errors when using the MCP server with Claude:

  1. Verify API Key Configuration:

    # Test your API key with the diagnostic script
    python diagnostics/api_auth_diagnostic.py
  2. Check Claude App Configuration:

    • Ensure your mcp.json has the correct API key in the env section

    • Verify the cwd path points to your project directory

    • Make sure the API key value matches exactly (no extra spaces)

  3. Use Enhanced Startup Script:

    • Switch to Option 1 configuration (enhanced startup script)

    • Check the server logs in Claude app for diagnostic messages

    • Look for [MCP AbuseIPDB] prefixed messages

  4. Environment Variable Issues:

    • Ensure your .env file is in the project root directory

    • Verify the API key in .env matches your Claude app configuration

    • Check that the API key is valid on the AbuseIPDB website

  5. Debug Steps:

    # Test local server startup
    python scripts/start_mcp_server.py
    
    # Check environment loading
    python -c "from mcp_abuseipdb.settings import Settings; print('API key loaded:', bool(Settings().abuseipdb_api_key))"

Common Issues

  • "No .env file found": Make sure .env exists in project root or set API key in Claude app config

  • "Settings API key: EMPTY": API key not properly loaded from environment

  • "Environment var: EMPTY": API key not set in Claude app MCP configuration

  • Connection timeouts: Check your internet connection and AbuseIPDB service status

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes with tests

  4. Run the test suite and linting

  5. Submit a pull request

License

MIT License — see LICENSE for details.

Support

  • Documentation: See examples/ directory

  • Issues: Please report bugs and feature requests via GitHub issues

  • API Documentation: AbuseIPDB API Docs

Changelog

v0.1.0

  • Initial release

  • Basic IP checking functionality

  • CIDR block analysis

  • Blacklist access

  • Bulk operations

  • Log enrichment

  • Caching and rate limiting

  • Docker support

Available Tools

5 tools
bulk_checkB

Check multiple IP addresses in batch against AbuseIPDB

ParametersJSON Schema
NameRequiredDescriptionDefault
ip_addressesYesList of IP addresses to check
max_age_daysNoMaximum age of reports to consider in days
thresholdNoAbuse confidence threshold for flagging (0-100)

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the service (AbuseIPDB) and batch capability, but doesn't disclose rate limits, authentication requirements, what constitutes a 'check' (e.g., reputation scoring, blacklist lookup), error handling, or response format. For a tool with 3 parameters and no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Check multiple IP addresses in batch against AbuseIPDB'). Every word earns its place with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., confidence scores, report details), error conditions, or behavioral constraints like rate limits. For a batch operation with external service integration, more context is needed for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain how threshold interacts with AbuseIPDB's scoring system). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('check multiple IP addresses in batch') and the target resource ('against AbuseIPDB'), distinguishing it from sibling tools like 'check_ip' (likely single IP) and 'check_block' (likely IP block). It explicitly mentions the batch capability which differentiates it from single-item alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for batch checking IPs against AbuseIPDB, but doesn't explicitly state when to use this versus alternatives like 'check_ip' or 'check_block'. It provides context about the service (AbuseIPDB) but lacks explicit guidance on use cases, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_blockB

Check the reputation of a CIDR block using AbuseIPDB

ParametersJSON Schema
NameRequiredDescriptionDefault
networkYesCIDR network to check (e.g., '192.168.1.0/24')
max_age_daysNoMaximum age of reports to consider in days

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the service (AbuseIPDB) but does not disclose behavioral traits such as rate limits, authentication requirements, error handling, or what the output looks like (e.g., reputation score, report details). This is a significant gap for a tool with external dependencies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of reputation checking with an external service, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., rate limits, auth), output format, and error handling, which are crucial for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters ('network' as CIDR and 'max_age_days' with constraints). The description adds no additional parameter semantics beyond what the schema provides, such as examples of valid CIDR formats or implications of the age filter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('check the reputation') and resource ('CIDR block') using a named service ('AbuseIPDB'). It distinguishes this tool from sibling tools like 'check_ip' (likely for individual IPs) and 'bulk_check' (likely for multiple checks).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for reputation checking of CIDR blocks, but does not explicitly state when to use this tool versus alternatives like 'check_ip' for single IPs or 'bulk_check' for multiple blocks. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_ipA

Check the reputation of a single IP address using AbuseIPDB

ParametersJSON Schema
NameRequiredDescriptionDefault
ip_addressYesIP address to check
max_age_daysNoMaximum age of reports to consider in days
verboseNoInclude detailed report information
thresholdNoAbuse confidence threshold for flagging (0-100)

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the service (AbuseIPDB) but does not disclose behavioral traits such as rate limits, authentication needs, error handling, or what the output looks like. For a tool with no annotations, this leaves significant gaps in understanding its operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects like rate limits, authentication, and output format. For a tool with 4 parameters and no structured output, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description does not add any meaning beyond what the schema provides, such as explaining parameter interactions or usage examples. Baseline 3 is appropriate as the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Check the reputation') and resource ('a single IP address'), specifying the service provider ('using AbuseIPDB'). It distinguishes from sibling tools like 'bulk_check' (multiple IPs) and 'check_block' (IP block) by emphasizing 'single IP address'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context for checking IP reputation via AbuseIPDB, but does not explicitly state when to use this tool versus alternatives like 'bulk_check' or 'check_block'. It provides clear purpose but lacks explicit exclusions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

enrich_log_lineB

Extract and enrich IP addresses from a log line with AbuseIPDB data

ParametersJSON Schema
NameRequiredDescriptionDefault
log_lineYesLog line containing IP addresses to enrich
thresholdNoAbuse confidence threshold for flagging (0-100)
max_age_daysNoMaximum age of reports to consider in days

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions enrichment with AbuseIPDB data but lacks details on rate limits, authentication requirements, error handling, or what the output looks like (e.g., structured data vs. raw text). This is inadequate for a tool that likely involves external API calls and data processing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to explaining what the tool does, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving external API data enrichment) and lack of annotations and output schema, the description is insufficient. It doesn't cover behavioral aspects like rate limits or output format, leaving critical gaps for an AI agent to use it effectively in context with sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond implying that 'log_line' contains IP addresses and 'threshold'/'max_age_days' relate to AbuseIPDB filtering. This meets the baseline for high schema coverage but doesn't enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Extract and enrich'), the target resource ('IP addresses from a log line'), and the data source ('with AbuseIPDB data'). It distinguishes itself from sibling tools like 'check_ip' or 'bulk_check' by focusing on log line processing rather than direct IP checking or bulk operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'check_ip' for single IPs or 'bulk_check' for multiple IPs. It doesn't mention prerequisites, such as needing AbuseIPDB access, or exclusions, like whether it handles IPv6 addresses or specific log formats.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_blacklistB

Retrieve the AbuseIPDB blacklist of malicious IP addresses

ParametersJSON Schema
NameRequiredDescriptionDefault
confidence_minimumNoMinimum confidence level (0-100)
limitNoMaximum number of entries to retrieve

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Retrieve' implies a read operation, it doesn't specify whether this is a real-time query or cached data, what format the results come in, whether there are rate limits, or any authentication requirements. The description is too minimal for a tool that presumably accesses external threat intelligence data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that retrieves threat intelligence data with no annotations and no output schema, the description is insufficient. It doesn't explain what format the blacklist returns (e.g., list of IPs with metadata), whether results are paginated, or any behavioral characteristics. The agent would be left guessing about important operational aspects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage with clear documentation of both parameters. The description adds no additional parameter information beyond what's already in the schema. Since schema coverage is high, the baseline score of 3 is appropriate - the description doesn't add value but doesn't need to compensate for schema gaps either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieve') and the specific resource ('AbuseIPDB blacklist of malicious IP addresses'), making the purpose immediately understandable. It distinguishes this tool from its siblings by focusing on retrieving a blacklist rather than checking individual IPs or performing bulk operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings like 'check_ip' or 'bulk_check'. It doesn't mention any prerequisites, alternatives, or contextual factors that would help an agent decide between this retrieval operation and other available tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedbulk_check
    • First observedcheck_block
    • First observedcheck_ip
    • First observedenrich_log_line
    • First observedget_blacklist

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: bulk_check handles multiple IPs, check_block covers CIDR blocks, check_ip is for single IPs, enrich_log_line processes log lines, and get_blacklist retrieves a blacklist. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., check_ip, get_blacklist) with clear, descriptive names. There are no deviations in style or convention across the set.

Tool Count5/5

With 5 tools, the server is well-scoped for AbuseIPDB functionality, covering key operations like single/bulk IP checks, block analysis, log enrichment, and blacklist retrieval. Each tool earns its place without feeling excessive or insufficient.

Completeness5/5

The tool set provides comprehensive coverage for the AbuseIPDB domain, including reputation checks at different scales (single, bulk, block), log enrichment, and blacklist access. There are no obvious gaps in the core workflows for this purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Integrates with the AbuseIPDB API to check IP addresses for abuse reports and report abusive IP addresses.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables IP address intelligence lookup including geolocation, network information, privacy detection (VPN/proxy/Tor), company data, and abuse contacts using IPLocate.io API. Supports both IPv4 and IPv6 addresses with comprehensive analysis tools and security assessment capabilities.
    107
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to check IP reputation and abuse reports via AbuseIPDB, including abuse confidence scores, report details, and bulk IP triage.
    20
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alephnan/AbuseIPDB-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server