Skip to main content
Glama
urldna

urlDNA MCP Server

Official
by urldna

urlDNA MCP Server

Blog

Claude Prompt

The urlDNA MCP Server enables native tool use for security-focused LLM agents like OpenAI GPT, Google Gemini and Claude Desktop, providing a direct interface to interact with the urlDNA threat intelligence platform via API.

The repository exposes the same toolset over two transports:

  • stdio for local desktop integrations such as Claude Desktop.

  • streamable-http for hosted deployments such as Cloud Run.


Installation & Setup

This project uses uv for fast Python package management.

Prerequisites

Install uv if you haven't already:

# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Or with pip
pip install uv

Quick Start

  1. Clone and setup the project:

git clone <repository-url>
cd urlDNA-mcp-server
uv sync
  1. Run the MCP server locally (stdio mode):

uv run python urldna_mcp/run.py
  1. Run the MCP server in streamable HTTP mode:

uv run python urldna_mcp/server.py

The hosted server reads these environment variables:

  • PORT: HTTP port to bind to. Defaults to 8080.

  • MCP_PATH: Public MCP endpoint path. Defaults to /.

Development

# Install development dependencies
uv sync --dev

# Run tests (when available)
uv run pytest

# Format code
uv run black .

# Type checking
uv run mypy .

# Lint code
uv run flake8 .

Related MCP server: unphurl-mcp

Hosted MCP Server

The urlDNA MCP server is already hosted and available at:

https://mcp.urldna.io/

This server is accessible over streamable HTTP, which makes it suitable for Cloud Run and other request-driven platforms.

You can use it directly with any platform or LLM that supports the MCP specification (e.g., Claude Desktop, OpenAI GPT, Google Gemini).


Supported Tools

Scanning

Tool

Description

fast_check

Instantly check if a URL has been scanned. Returns SAFE / MALICIOUS / UNRATED.

new_scan

Submit a URL for a full scan and wait for the result (~30–60s).

get_scan

Retrieve a complete scan result by ID.

Tool

Description

search

Search scans using CQL (Custom Query Language) across domain, IP, technology, malicious flag, and more. Supports AND and OR expressions plus pagination (page 2+ requires PREMIUM).

Saved Queries

Tool

Description

list_queries

List all saved queries for the authenticated user.

get_query

Retrieve a specific saved query and its filters by ID.

create_query

Create a new saved query with one or more CQL filter conditions.

update_query

Update an existing query's name and filters (full replacement).

delete_query

Permanently delete a saved query by ID.

query_scans

Retrieve all matching scans for a saved query.

Brand Monitoring

Tool

Description

list_brands

List available brands with optional name search and visibility filter (ALL / FREE / PREMIUM / USER_BRANDS).

get_brand

Retrieve full details of a specific brand by ID.

brand_scans

Get all scans associated with a brand. Supports additional CQL filtering.

API Reference

Tool

Description

search_docs

Fetch the full urlDNA OpenAPI and documentations.


Integration with Claude Desktop

To integrate the urlDNA MCP server in Claude Desktop, update your claude_desktop_config.json:

{
  "mcpServers": {
    "urlDNA": {
      "command": "uv",
      "args": [
        "--directory",
        "<YOUR_PATH>\\urldna_mcp",
        "run",
        "urldna_mcp\\run.py"
      ],
      "env": {
        "x-api-key": "<urlDNA_API_KEY>"
      }
    }
  }
}

Replace <YOUR_PATH> with the parent directory that contains this repository and <urlDNA_API_KEY> with your API key from https://urldna.io.

For hosted MCP clients, point them at https://mcp.urldna.io/ or your own deployed MCP_PATH.

Once configured, you can prompt Claude with natural language, for example:

"Search in urlDNA for malicious scans with title like paypal"

"Create a saved query for mobile scans from Italy that are flagged as malicious"

"Show me all scans associated with the Google brand"

Claude will automatically call the correct tool and return results from the urlDNA platform.


Using the MCP Server with OpenAI GPT

from openai import OpenAI

# Initialize OpenAI client (assumes OPENAI_API_KEY is set via environment variable)
client = OpenAI()

response = client.responses.create(
    model="gpt-3.5-turbo",  # Note: MCP tool use requires a Responses API-compatible model
    input=[
        {
            "role": "system",
            "content": [{"type": "input_text", "text": "You are a cybersecurity analyst using urlDNA."}]
        },
        {
            "role": "user",
          "content": [{"type": "input_text", "text": "Search in urlDNA for malicious scans with title like paypal or login"}]
        }
    ],
    text={"format": {"type": "text"}},
    reasoning={},
    tools=[
        {
            "type": "mcp",
            "server_label": "urlDNA",
            "server_url": "https://mcp.urldna.io/",
            "headers": {
                "x-api-key": "<URLDNA_API_KEY>"  # Replace with your urlDNA API key
            },
            "allowed_tools": [
                # --- Scanning ---
                "new_scan",       # Submit a URL for a full scan and wait for the result
                "get_scan",       # Retrieve a scan result by ID
                "fast_check",     # Lightweight instant safety check (SAFE / MALICIOUS / UNRATED)

                # --- Search ---
                "search",         # Search scans using CQL (Custom Query Language, AND/OR supported)

                # --- Saved Queries (PREMIUM) ---
                "list_queries",
                "get_query",
                "create_query",
                "update_query",
                "delete_query",
                "query_scans",

                # --- Brand Monitoring (PREMIUM) ---
                "list_brands",
                "get_brand",
                "brand_scans",

                # --- API Reference ---
                "search_docs",
            ],
            "require_approval": "never"
        }
    ],
    temperature=0.7,
    top_p=1,
    max_output_tokens=2048,
    store=True
)

print(response.output)

Using the MCP Server with Google Gemini

Gemini connects to the urlDNA MCP server via fastmcp, and tools are auto-discovered rather than passed as an allowed_tools list.

import os
import asyncio
from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport
from google import genai

async def main():
    # 1. Connect FastMCP client directly to streamable-http
    transport = StreamableHttpTransport(
        "https://mcp.urldna.io/",
        headers={"x-api-key": os.getenv("URLDNA_API_KEY", "YOUR_KEY")},
    )
    client_mcp = Client(transport)

    async with client_mcp:
        ai = genai.Client(vertexai=True, project=os.getenv("GOOGLE_CLOUD_PROJECT", "YOUR_PROJECT_ID"))
        response = await ai.aio.models.generate_content(
            model="gemini-2.5-flash",
            contents="Search in urlDNA for malicious scans with title like paypal",
            # Pass the live MCP session (not just tool declarations) so Gemini
            # can automatically call tools and receive their results.
            config=genai.types.GenerateContentConfig(tools=[client_mcp.session]),
        )

        print(response.text)


if __name__ == "__main__":
    asyncio.run(main())

Container Deployment

Build and run with Docker:

# Build the container
docker build -t urldna-mcp-server .

# Run the server
docker run -p 8080:8080 -e x-api-key=<URLDNA_API_KEY> urldna-mcp-server

# Optional: override the public MCP path if you do not want /
docker run -p 8080:8080 -e MCP_PATH=/custom-path -e x-api-key=<URLDNA_API_KEY> urldna-mcp-server

# Cloud Run example
gcloud run deploy urldna-mcp-server \
  --source . \
  --allow-unauthenticated \
  --set-env-vars MCP_PATH=/

Search Syntax

The search and brand_scans tools forward the provided CQL directly to the urlDNA API. You can combine conditions with either AND or OR.

Examples:

malicious = true AND technology LIKE wordpress
domain = google.com OR domain = youtube.com
(domain = paypal.com OR title LIKE paypal) AND country_code = IT

Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature-name

  3. Install development dependencies: uv sync --dev

  4. Make your changes and ensure tests pass

  5. Format code: uv run black .

  6. Submit a pull request


Contact & Support

For support or API access, visit https://urldna.io or email urldna@urldna.io.

Available Tools

4 tools
fast_checkB

Fast check if a URL has already been scanned.

Args: url (str): URL to be verified. Returns: dict: Fast check result JSON. Raises: RuntimeError: If check fails.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

B3.3/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 'Fast check' (implying speed) and 'Raises: RuntimeError: If check fails' (indicating error handling), but lacks details on performance characteristics (e.g., rate limits), authentication needs, or what constitutes a 'fail.' This leaves significant gaps for a tool with mutation-like implications (checking might involve external calls).

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, starting with the core purpose. The 'Args:' and 'Returns:' sections add structure without redundancy. However, the 'Raises:' section, while useful, could be integrated more seamlessly, and the overall text is slightly verbose for such a simple tool, preventing a perfect score.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally complete. It covers the purpose, parameter, return type, and error handling, but lacks details on the 'Fast check result JSON' structure or behavioral traits like idempotency or side effects. This makes it adequate but with clear gaps for informed usage.

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

Parameters4/5

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

The description adds meaningful context beyond the input schema, which has 0% coverage. It specifies that 'url' is a 'URL to be verified,' clarifying the parameter's purpose and format (a string representing a URL). Since there's only one parameter, this adequately compensates for the schema's lack of descriptions, though it doesn't detail validation rules (e.g., URL format requirements).

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Fast check if a URL has already been scanned.' It specifies the verb ('check') and resource ('URL'), and distinguishes it from siblings like 'new_scan' (which would scan) and 'get_scan' (which might retrieve detailed results). However, it doesn't explicitly differentiate from 'search' (which might also check for scanned URLs), keeping it from a perfect score.

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 context: use this for a quick verification of prior scanning, as opposed to 'new_scan' for initiating a scan. However, it lacks explicit guidance on when to use this versus 'get_scan' or 'search' (e.g., for speed vs. detail), and no exclusions or prerequisites are mentioned, making it only adequate.

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

get_scanB

Get scan results from urlDNA using the scan ID.

Args: scan_id (str): The unique identifier of the scan. Returns: dict: Truncated scan result JSON. Raises: RuntimeError: If fetch scan fails.

ParametersJSON Schema
NameRequiredDescriptionDefault
scan_idYes

TDQS

B3.3/5.0
Behavior3/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 adds some context: it specifies the source ('urlDNA'), indicates potential failure modes ('Raises: RuntimeError: If fetch scan fails'), and notes the return format ('Truncated scan result JSON'). However, it lacks details on authentication needs, rate limits, or what 'truncated' entails, which are gaps for a tool with no annotations.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by structured sections for Args, Returns, and Raises. Each sentence earns its place by providing essential information, though the 'Raises' section could be slightly more detailed without sacrificing conciseness.

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

Completeness3/5

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

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the basic purpose, parameter semantics, and error handling, but lacks usage guidelines, full behavioral context (e.g., auth), and details on the 'truncated' return format. This is adequate but not fully comprehensive.

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

Parameters4/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'scan_id' is 'The unique identifier of the scan', clarifying its purpose and format (a string ID). This compensates well for the schema's lack of descriptions, though it doesn't cover all potential nuances like ID format examples.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get scan results from urlDNA using the scan ID.' It specifies the verb ('Get'), resource ('scan results'), and source ('urlDNA'), which is clear and specific. However, it doesn't explicitly differentiate from sibling tools like 'fast_check' or 'search', which might also retrieve scan-related data.

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 'fast_check' or 'search'. It mentions using a 'scan ID' but doesn't clarify prerequisites (e.g., that a scan must already exist from 'new_scan') or exclusions. This leaves the agent without context for tool selection among siblings.

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

new_scanB

Submit a URL to urlDNA and wait for the scan result.

Args: url (str): URL to submit for scanning. Returns: dict: Truncated scan result JSON. Raises: RuntimeError: If submission or polling fails.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

B3.3/5.0
Behavior3/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 adds some context: it's a submission tool that waits for results and can raise RuntimeError on failure. However, it lacks details on permissions, rate limits, timeouts, or what 'truncated' means in the return value, leaving gaps for a mutation-like operation.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first. The Args, Returns, and Raises sections are structured but slightly verbose for a single parameter; every sentence adds value, though it could be more streamlined.

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

Completeness3/5

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

Given the tool's complexity (submission with waiting, potential errors) and no annotations or output schema, the description is minimally adequate. It covers the basic operation and error handling but lacks details on output format beyond 'truncated scan result JSON,' which is vague, and doesn't address sibling tool relationships.

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

Parameters4/5

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

The description adds meaningful semantics beyond the input schema, which has 0% coverage. It explains that the 'url' parameter is 'URL to submit for scanning,' clarifying its purpose. Since there's only one parameter, the baseline is high, and this extra detail compensates well for the schema's lack of descriptions.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Submit a URL to urlDNA and wait for the scan result.' It specifies the action (submit and wait) and resource (URL to urlDNA). However, it doesn't explicitly differentiate from sibling tools like 'fast_check' or 'get_scan', which likely have related scanning functions.

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 'fast_check' or 'get_scan'. It mentions waiting for results, which implies this might be a synchronous or blocking operation, but doesn't clarify use cases, prerequisites, or exclusions compared to siblings.

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.

  1. 4 tool updates
    • First observedfast_check
    • First observedget_scan
    • First observednew_scan
    • First observedsearch

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: fast_check verifies if a URL has been scanned, get_scan retrieves results by scan ID, new_scan submits and waits for a new scan, and search performs complex queries. The descriptions clearly differentiate these functions, eliminating any ambiguity.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with clear verb_noun structures: fast_check, get_scan, new_scan, and search. The naming is predictable and readable, with no deviations or mixed conventions.

Tool Count5/5

With 4 tools, this server is well-scoped for its URL scanning domain. Each tool serves a unique and essential function—verification, retrieval, submission, and search—making the count appropriate and efficient for the intended purpose.

Completeness4/5

The tool set covers core workflows for URL scanning: checking existing scans, retrieving results, submitting new scans, and searching through data. A minor gap exists in not having tools for updating or deleting scans, but this is likely intentional for a scanning service, and agents can still perform key operations effectively.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Provides LLMs with access to Threat.Zone's malware analysis capabilities through standardized MCP tools, allowing for file and URL analysis, sandbox execution, and threat intelligence retrieval.
    31
    14
    GPL 3.0
  • A
    license
    A
    quality
    D
    maintenance
    URL intelligence for AI agents. One URL in, structured security and data quality signals out across 7 dimensions. 13 tools, risk score 0-100 with 23 configurable weights.
    16
    63 npm
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to check URL safety before fetching content, using Google Web Risk, URLhaus, PhishTank, and AI analysis to return SAFE/SUSPICIOUS/DANGEROUS verdicts.
    1
    109 npm
    1
    MIT