Skip to main content
Glama
KasperskyLab

Kaspersky OpenTIP MCP Server

Official
by KasperskyLab

search_url

Analyze URLs for security threats using Kaspersky's threat intelligence database to identify malicious websites and protect against cyber risks.

Instructions

Get threat intelligence data about a URL

Input Schema

NameRequiredDescriptionDefault
urlYes

Input Schema (JSON Schema)

{ "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ], "type": "object" }

Implementation Reference

  • The handler function implementing the search_url tool. It takes a URL string, prepares parameters, and calls opentip_request to query the OpenTIP API endpoint.
    async def search_url(url: str) -> dict[str, Any] | None: """Get threat intelligence data about a URL Args: url: the web address that you want to investigate """ params = {"request": url} return await opentip_request(Endpoints.search_url, "get", params)
  • Registers the search_url tool with the FastMCP server, providing description and ToolAnnotations for MCP protocol.
    @mcp.tool( description="Get threat intelligence data about a URL", annotations=ToolAnnotations( title="Investigate a URL", readOnlyHint=True, openWorldHint=True, ), )
  • Input schema defined by function signature: url (str) input, returns dict[str, Any] | None output.
    async def search_url(url: str) -> dict[str, Any] | None: """Get threat intelligence data about a URL Args: url: the web address that you want to investigate """ params = {"request": url} return await opentip_request(Endpoints.search_url, "get", params)
  • API endpoint path constant for search_url used in opentip_request.
    search_url = "search/url"
  • Shared helper function that performs HTTP requests to OpenTIP API, used by search_url handler.
    async def opentip_request( endpoint: str, request_type: RequestType = "get", params: Optional[dict[str, Any]] = None, content: Optional[bytes] = None, headers: Optional[dict[str, str]] = None, ) -> dict[str, Any]: """Make a request to the OpenTIP API with proper error handling.""" headers = headers or {} headers = { "user-agent": "opentip-mcp-client", "x-api-key": OPENTIP_API_KEY, **headers } async with httpx.AsyncClient() as client: try: url = f"{OPENTIP_API_BASE}{endpoint}" if request_type == "get": response = await client.get( url, headers=headers, params=params, timeout=OPENTIP_API_TIMEOUT ) elif request_type == "post": response = await client.post( url, headers=headers, params=params, content=content, timeout=OPENTIP_API_TIMEOUT ) response.raise_for_status() return response.json() except httpx.HTTPStatusError as e: if e.response.status_code == 400: return {"result": "error", "error_message": "Invalid parameters. Please check your input and try again."} elif e.response.status_code == 401: return {"result": "error", "error_message": "Authentication failed. Please ensure that you have provided the correct credentials and try again."} elif e.response.status_code == 403: return {"result": "error", "error_message": "Quota or request limit exceeded. Check your quota and limits and try again."} else: return {"result": "error", "error_message": str(e)} except Exception as e: # noqa return {"result": "error", "error_message": str(e)}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KasperskyLab/threat-intelligence'

If you have feedback or need assistance with the MCP directory API, please join our Discord server