# Securitytrails — how to use (mcp.ai)

Connect your Securitytrails account and use 12 tools for security and identity straight from your AI agent. Connect with your own API key. SecurityTrails is a cybersecurity platform providing comprehensive domain, IP, DNS, and WHOIS intelligence data. It offers historical DNS records, subdomain discovery, WHOIS history, associated domains, passive DNS datasets, and website technology detection to support threat hunting, brand protection, cyber forensics, and attack surface management.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_securitytrails?ms=1787291160000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `securitytrails_bulk_static_asset_rules`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/securitytrails`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/securitytrails/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/securitytrails/bulk/static/asset/rules` — Bulk add or remove static asset rules for a SecurityTrails ASI project. Static asset rules define which domains/IPs are included or excluded from the project's monitoring scope. This operation process
  - body: { add?: object[], remove?: object[], project_id: string }
- `POST https://api.mcp.ai/api/securitytrails/get/company/associated/ips` — Tool to retrieve IPs associated with a company domain. Use when you need to find all IP addresses linked to an organization's domain name.
  - body: { domain: string }
- `POST https://api.mcp.ai/api/securitytrails/get/domain` — Retrieves comprehensive domain information from SecurityTrails including current DNS records, infrastructure details, and statistics. This tool fetches detailed DNS data (A, AAAA, MX, NS, SOA, TXT rec
  - body: { hostname: string }
- `POST https://api.mcp.ai/api/securitytrails/get/domain/ssl` — Tool to fetch current and historical SSL certificate details for a hostname. Use when you need to retrieve SSL data after identifying the domain. Coverage limited to certificates indexed by SecurityTr
  - body: { hostname: string }
- `POST https://api.mcp.ai/api/securitytrails/ip/search/statistics` — Fetch aggregated statistics for IP addresses matching a DSL query. Returns top open ports by frequency, common reverse DNS patterns, and total count. Useful for analyzing IP infrastructure patterns, p
  - body: { query: string }
- `POST https://api.mcp.ai/api/securitytrails/list/projects` — Tool to list ASI projects available to the account. Use when you need project IDs for subsequent ASI operations.
- `POST https://api.mcp.ai/api/securitytrails/ping` — Tool to test authentication and connectivity with the SecurityTrails API. Use after configuring API key.
- `POST https://api.mcp.ai/api/securitytrails/scroll` — Tool to continue scrolling through DSL search results. Use after receiving a scroll_id from SECURITYTRAILS_SEARCH_IPS or SECURITYTRAILS_SQL_API_EXECUTE_QUERY to fetch the next batch of data. Call iter
  - body: { scroll_id: string }
- `POST https://api.mcp.ai/api/securitytrails/search/ips` — Tool to search IP addresses via SecurityTrails DSL. Use when you need to filter IPs with custom DSL queries. Results are paginated; use SecurityTrails scroll mechanisms for large result sets to avoid 
  - body: { page?: integer, query: string }
- `POST https://api.mcp.ai/api/securitytrails/sql/api/execute/query` — Execute SQL-like queries against SecurityTrails data. Query the 'hosts' table for domain/DNS information or the 'ips' table for IP address/ASN/port data. Returns up to 100 records per request with a s
  - body: { query: string }
- `POST https://api.mcp.ai/api/securitytrails/sql/api/scroll/results` — Tool to fetch next page of SQL query results. Use after obtaining scroll_id from initial SQL API response.
  - body: { scroll_id: string }
- `POST https://api.mcp.ai/api/securitytrails/temp/scrape/securitytrails/usage` — Retrieve account usage information from the SecurityTrails API. This action fetches the current monthly usage and allowed monthly usage limits for your SecurityTrails API account. Use this to monitor 

## Example prompts
- "What can I do in Securitytrails?"
- "Show me a summary of my Securitytrails account"

## More
- Page: https://mcp.ai/securitytrails
- Agent spec (llms.txt): https://mcp.ai/securitytrails/llms.txt
- Postman collection: https://mcp.ai/securitytrails/postman.json
