copyleftdev/rasn
If you are the rightful owner of rasn and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
RASN is a high-performance ASN reconnaissance tool with native MCP server support, designed to integrate AI agents for enhanced functionality.
High-performance ASN lookup system with SIMD acceleration, multi-level caching, and MCP server for AI agents.
Features
- SIMD Acceleration - Fast IP lookups with AVX2 optimization
- Apache Arrow/Parquet - Columnar storage for IP ranges
- Multi-Level Cache - LRU + RocksDB cold storage
- MCP Server - JSON-RPC 2.0 API for AI agents
- Network Enrichment - DNS, WHOIS, GeoIP integration
- CIDR Operations - /8-/32 range queries
- Parallel Processing - Rayon batch operations
- Production Ready - Rate limiting, metrics, Docker support
Performance
Benchmarked on modern hardware using hyperfine (100 runs):
CLI Lookup (includes startup + data load + lookup):
Time (mean ± Ļ): 218.9 ms ± 4.9 ms
Range (min ⦠max): 207.0 ms ⦠237.5 ms
Note: Cold start time includes TSV parsing (28MB data). For high-throughput workloads, use the MCP server or keep the CLI process warm to amortize startup costs.
Installation
Quick Install (with data - installs to ~/.local)
git clone https://github.com/copyleftdev/rasn.git
cd rasn
make install # Downloads data + installs binary (no sudo!)
# or: ./install.sh
Data is automatically downloaded on first install.
Binary only
cargo install --path crates/rasn-cli
Note: Binary-only install requires manual data setup. See for details.
Docker
Build locally:
docker build -t rasn:latest .
docker-compose up -d
Usage
CLI
# IP lookup
rasn lookup 8.8.8.8
# Batch processing
rasn batch --file ips.txt --workers 10
# JSON output
rasn lookup --output json 1.1.1.1
# MCP server (for Claude Desktop)
rasn mcp stdio
MCP Server
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"rasn": {
"command": "rasn",
"args": ["mcp", "stdio"]
}
}
}
Available MCP Tools:
lookup_ip- IP to ASN lookuplookup_asn- ASN to IP rangeslookup_domain- DNS + ASN resolutionbulk_lookup- Batch processingcidr_analyze- CIDR calculationsreverse_lookup- PTR recordsenrich_data- WHOIS + GeoIP
Docker Usage
# Build image
docker build -t rasn:latest .
# CLI usage
docker run --rm rasn:latest lookup 8.8.8.8
# MCP Server
docker run --rm -it rasn:latest mcp stdio
# Docker Compose
docker-compose up -d
Configuration
Environment Variables:
RASN_API_KEY- API key for external services
Check Status:
rasn auth status
Development
Setup
# Install dev tools and git hooks
make dev-setup
Common Tasks
# Run tests
cargo test --all-features --workspace
# Check format
cargo fmt --all -- --check
# Run clippy
cargo clippy --all-features --workspace -- -D warnings
# Build docs
cargo doc --all-features --no-deps --workspace
# Run all checks (same as pre-commit)
./hooks/pre-commit
Project Structure
rasn/
āāā crates/
ā āāā rasn-core/ # Core types & security
ā āāā rasn-arrow/ # Arrow/Parquet + SIMD
ā āāā rasn-cache/ # Multi-level caching
ā āāā rasn-cidr/ # CIDR operations
ā āāā rasn-client/ # HTTP client + rate limiting
ā āāā rasn-db/ # RocksDB storage
ā āāā rasn-geoip/ # GeoIP integration
ā āāā rasn-mcp/ # MCP JSON-RPC server
ā āāā rasn-resolver/ # DNS resolution
ā āāā rasn-whois/ # WHOIS client
ā āāā rasn-cli/ # CLI interface
āāā examples/ # Usage examples
āāā docs/ # Documentation
License
MIT - see for details.