A Model Context Protocol server that provides network analysis tools for security professionals, enabling AI models like Claude to perform tasks such as ASN lookups, DNS analysis, WHOIS retrieval, and IP geolocation for security investigations.
A comprehensive Model Context Protocol (MCP) server providing incident response and network analysis tools for security professionals. This server allows AI agents like Claude to perform various network-related lookups and analyses to assist with security investigations.
The IR Toolshed MCP Server provides a suite of networking and security tools accessible via the Model Context Protocol. It's designed to be a general-purpose service for network incident responders, enabling them to perform basic lookups using:
Each tool is accompanied by detailed documentation as a resource, making it easy for AI systems to understand how to use the tools and what output to expect.
The ASN lookup tool returns information about an IP address including:
The DNS lookup tool provides DNS record information for domains:
The WHOIS lookup tool retrieves domain registration information:
The IP geolocation tool provides location information using MaxMind's GeoLite2 database:
Note: The geolocation tool requires a MaxMind license key. You can:
More tools will be added in future releases.
git clone cd ir-toolshed-mcp-server
uv venv
.venv\Scripts\activate
source .venv/bin/activate
uv pip install -e .
Start the MCP server with:
uv run mcp dev src/mcp_server.py
This will launch the server in development mode, making it available to MCP clients like Claude Desktop.
When connected to an MCP client such as Claude Desktop, you can use the ASN lookup tool by providing an IP address:
asnlookup("8.8.8.8")
Example output:
{ "ip_addr": "8.8.8.8", "as_number": "15169", "as_name": "GOOGLE - Google LLC" }
When connected to an MCP client such as Claude Desktop, you can use the DNS lookup tool by providing a domain:
dnslookup("example.com")
Example output:
{ "domain": "example.com", "record_type": "A", "record_value": "93.184.216.34" }
When connected to an MCP client such as Claude Desktop, you can use the WHOIS lookup tool by providing a domain:
whoislookup("example.com")
Example output:
{ "domain": "example.com", "ownership_details": "Google LLC", "registration_date": "2004-04-26", "nameserver_information": "ns1.google.com", "registrar_details": "MarkMonitor Inc." }
When connected to an MCP client such as Claude Desktop, you can use the geolocation tool by providing an IP address:
geolocation("8.8.8.8")
Example output:
{ "ip_addr": "8.8.8.8", "country": "US", "city": "Mountain View", "latitude": 37.40599, "longitude": -122.078514, "network": "AS15169 Google LLC", "timezone": "America/Los_Angeles" }
Each tool follows a consistent error handling pattern:
General error response format:
{ "status": "error", "error": "Detailed error message", "query": "Original query value" }
Tool-specific error examples:
ASN Lookup:
{ "ip_addr": "", "status": "error", "error": "Invalid IP address format" }
DNS Lookup:
{ "domain": "", "record_type": "", "status": "error", "error": "DNS resolution failed" }
WHOIS Lookup:
{ "domain": "", "status": "error", "error": "WHOIS server not available" }
Geolocation:
{ "ip_addr": "", "status": "error", "error": "MaxMind database not found or license key invalid" }
The project follows a standard Python package structure:
irtoolshed_mcp_server/ # Main package directory
├── __init__.py # Package initialization
├── asnlookup.py # ASN lookup functionality
├── dnslookup.py # DNS lookup functionality
├── geolookup.py # Geolocation functionality
├── mcp_server.py # Main MCP server implementation
└── whoislookup.py # WHOIS lookup functionality
tests/ # Test directory
├── test_asnlookup.py # ASN lookup tests
├── test_dnslookup.py # DNS lookup tests
├── test_geolookup.py # Geolocation tests
└── test_whoislookup.py # WHOIS lookup tests
git clone cd ir-toolshed-mcp-server
uv venv source .venv/bin/activate # On Windows use: .venv\Scripts\activate uv pip install -e ".[dev]"
To run the test suite:
uv run pytest
This will:
tests/
directoryNote: Some tests require additional configuration:
The project uses several tools to maintain code quality:
uv run black .
uv run isort .
uv run mypy .
uv run ruff .
Completed: ✓ ASN lookups ✓ DNS record lookups (A, AAAA, MX, etc.) ✓ WHOIS record retrieval ✓ IP geolocation services
Future tools planned for inclusion:
Contributions to add new IR tools or improve existing ones are welcome. Please follow these steps:
Apache 2.0
This server is intended for legitimate security research and incident response. Users must ensure they comply with all applicable laws and regulations when using these tools.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!