Official AbuseIPDB MCP server — check IP reputation from MCP clients
Project description
AbuseIPDB MCP
AbuseIPDB MCP is a small Model Context Protocol server for checking IP reputation from MCP clients such as Claude, Cursor, VS Code, Codex, and others. It talks to the AbuseIPDB API v2 over HTTPS and exposes the results as MCP tools over stdio.
Current server status: stdio, read-only. Published on PyPI as
mcp-server-abuseipdb, on Docker Hub as abuseipdb/abuseipdb-mcp, and in the
MCP Registry as
io.github.abuseipdb/abuseipdb-mcp.
What it does
- Checks one public IPv4 or IPv6 address with
check_ip. - Checks a batch of public IPs with
bulk_check(cap configurable, default 100). - Returns AbuseIPDB confidence score, report count, country, ISP, usage type, domain, last report time, risk tier, and a short plain-English summary.
- Rejects hostnames, URLs, CIDR ranges, and private/reserved addresses by default.
- Returns structured errors for bad input, auth failures, timeouts, rate limits, and AbuseIPDB API errors.
- Publishes MCP tool annotations for read-only, idempotent, open-world calls.
It does not submit reports or fetch blacklists yet.
Requirements
- Python 3.11+
- uv
- An AbuseIPDB API key
Install
The distribution on PyPI is mcp-server-abuseipdb; the command it installs is
abuseipdb-mcp. Most users do not need to install anything ahead of time —
uvx fetches and runs it on demand, which is the form every client example
below uses.
Run it once by hand to confirm your key works:
ABUSEIPDB_API_KEY=your_key_here uvx mcp-server-abuseipdb
To keep a persistent install on PATH instead:
uv tool install mcp-server-abuseipdb
The server uses MCP stdio. It waits for JSON-RPC on stdin and looks idle when started from a terminal; that is expected. Stdout is reserved for JSON-RPC messages, so logs go to stderr.
MCP client setup
Most MCP clients use this shape:
{
"mcpServers": {
"abuseipdb": {
"command": "uvx",
"args": ["mcp-server-abuseipdb"],
"env": {
"ABUSEIPDB_API_KEY": "your_key_here"
}
}
}
}
Checked-in examples:
examples/mcp/mcpServers.jsonfor Claude Desktop, Claude Code, Cursor, and othermcpServersclientsexamples/mcp/codex-config.tomlfor Codex CLI and Codex desktopexamples/mcp/vscode-copilot-mcp.jsonfor VS Code Copilot (usesservers, notmcpServers, and prompts for the key instead of storing it)examples/mcp/claude-code-project.mcp.jsonfor a Claude Code project configexamples/mcp/docker.jsonfor running the published image instead ofuvx
Keep the key in env, an envFile, or your client secret store. Do not put it
in args and do not commit real keys.
Tools
check_ip
Checks one public IP address.
| Parameter | Default | Notes |
|---|---|---|
ip |
required | Public IPv4 or IPv6 address |
max_age_in_days |
30 |
AbuseIPDB report window, 1-365 |
verbose |
true |
Include AbuseIPDB report details when available |
Returns a normalized dict with abuseConfidenceScore, riskTier, report
metadata, source fields, and message.
bulk_check
Checks a list of public IP addresses.
| Parameter | Default | Notes |
|---|---|---|
ips |
required | IPv4/IPv6 addresses; cap set by ABUSEIPDB_MAX_BULK_IPS (default 100) |
max_age_in_days |
30 |
AbuseIPDB report window, 1-365 |
Duplicate inputs are deduplicated. Invalid IPs are returned as per-item errors. If AbuseIPDB rate-limits an item, the remaining items in that same call are marked skipped rather than burned against an exhausted quota.
Rate limits
AbuseIPDB is the sole authority on your quota. This server does not cache or predict limit state across requests:
- An
HTTP 429is returned to the caller as a structuredRATE_LIMITEDerror. - The short-circuit is scoped to a single
bulk_checkcall. A later tool invocation contacts AbuseIPDB again, so a retry works as soon as your quota allows. - When a response shows the remaining quota at or below 10% of your plan
limit, the result carries a
noticefield.
Environment
| Variable | Default | Purpose |
|---|---|---|
ABUSEIPDB_API_KEY |
required | AbuseIPDB API key |
ABUSEIPDB_ALLOW_PRIVATE |
false |
Allow private/reserved IPs for lab use |
ABUSEIPDB_REQUEST_TIMEOUT |
30 |
API timeout in seconds |
ABUSEIPDB_API_BASE_URL |
AbuseIPDB v2 URL | Override for tests, proxies, or a local backend |
ABUSEIPDB_MAX_BULK_IPS |
100 |
Max IPs accepted per bulk_check call |
ABUSEIPDB_ENABLE_WRITE_TOOLS |
false |
Reserved gate for future write tools |
Docker
docker run --rm -i -e ABUSEIPDB_API_KEY=your_key_here abuseipdb/abuseipdb-mcp:0.1.0
As an MCP client entry, note that -i is required — the server speaks stdio:
{
"mcpServers": {
"abuseipdb": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "ABUSEIPDB_API_KEY",
"abuseipdb/abuseipdb-mcp:0.1.0"
],
"env": { "ABUSEIPDB_API_KEY": "your_key_here" }
}
}
}
To build locally instead:
docker build -t abuseipdb-mcp:local .
Development
git clone https://github.com/AbuseIPDB/abuseipdb-mcp.git
cd abuseipdb-mcp
uv sync
cp .env.example .env # then set ABUSEIPDB_API_KEY
Run the server from the checkout (--env-file loads .env; uv run alone
does not):
uv run --env-file .env abuseipdb-mcp
Tests and lint:
uv run pytest -q
uv run ruff check .
Protocol validation runs through the development npm package. MCP Inspector is interactive; the conformance suite is scriptable and runs in CI:
npm install
npm run mcp:inspector # interactive UI
npm run mcp:conformance # automated protocol compliance
Coming next
check_blockfor CIDR lookups through AbuseIPDB/check-block.report_ip, hidden unlessABUSEIPDB_ENABLE_WRITE_TOOLS=true.- Bounded concurrency and compact flagged-only output for
bulk_check. - Optional hosted Streamable HTTP transport for team or remote use.
Release process for maintainers: see RELEASING.md.
Safety notes
- This server is read-only today.
- An abuse score of
0means no reports in the selected window, not proof that an IP is safe. - AbuseIPDB quotas depend on your account.
bulk_checkconsumes one lookup per checked IP. - Secrets are read from the environment and are not returned in tool output.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_abuseipdb-0.1.0.tar.gz.
File metadata
- Download URL: mcp_server_abuseipdb-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56c231926c14b9ddadb981236c2ad4ee388ba774bcd5eb989fa438be37028db4
|
|
| MD5 |
cb18736903709fb19b7577601b9e9544
|
|
| BLAKE2b-256 |
a8b8c84fce9bb8609eb3fbbe9746042fe5ed0b59819340ceed11dcee0ef26fee
|
File details
Details for the file mcp_server_abuseipdb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_abuseipdb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9abe7c815e9c00f37fafeff86a6c433a9eecd08f92fa968509dcc0d00aa30d5
|
|
| MD5 |
b421f9cc99fc08ed2b1f4017c70d80ba
|
|
| BLAKE2b-256 |
936975ff4eef2d932b010aa68b6877b95866179f9113b003e22a6b5060439de1
|