MCP Server

The Threatray MCP server connects your AI agent to Threatray and lets it work with the whole platform: over 100 million analyzed samples, over one billion labeled functions, code-based retrohunting and clustering, the AI Reverser, full behavioral analysis and more. Its answers are grounded in what the code shows and what the sample did, and it can follow a lead through dozens of pivots in minutes.

The MCP server is a service hosted by Threatray and works with Claude Code, Codex, Cursor and other MCP clients. Your agent uses your Threatray account, with the same permissions and quota as the web app and the API.

What your agent can do

  • Triage unknown samples: Works through unknown samples on its own: verdict, family, behavior and IOCs for each one, grounded in code similarity and the AI Reverser, plus related samples and public reporting. You get the evidence, ready to judge.
    Example: "Analyze these five files, tell me which are malicious, what they do and whether they belong together."
  • Hunt and pivot: Start from a few known samples or IOCs. Your agent finds related samples by shared code and behavior and groups them into clusters, with how closely they are related, which ones are new variants and what new IOCs they bring.
    Example: "Here are the samples and IOCs from this report. Find related samples in Threatray and list any new IOCs."
  • Reverse in depth: Get to the bottom of how a sample works. Your agent starts from a map of the binary with library code set aside, reads the decompiled code, diffs functions between variants and explains the result down to the individual function.
    Example: "Find the C2 functions in <hash>, explain how the protocol works, and check which other samples share the same C2 code."

Anything you can do in Threatray, your agent can do too, and it can chain the steps on its own.

Capabilities

  • Code detections: identify malware families from code similarity against over one billion labeled functions, so new variants with new hashes are still recognized.
  • Goodware and library identification: separate known library and runtime code from unknown code, so your agent focuses on the functions that matter.
  • Retrohunt: find code-wise similar samples across over 100 million samples, by whole sample or with function-level retrohunting.
  • AI Reverser: AI code explanations, AI capabilities and AI verdicts for every code region and function, including unpacked and injected code, each claim pointing to function addresses.
  • Function diffing and decompilation: what was added, removed or changed between samples, and the decompiled code of any function.
  • OSINT Hunt: surface public reporting through code similarity, even when hashes and IOCs differ.
  • Analyses, search and submission: dynamic analysis results with behavior, IOCs and memory regions, plus strings and file metadata; search by IOCs, families, YARA rules and hashes; submit files and URLs.

Before you start

  • MCP URL: https://api-<instance-name>.analysis.threatray.com/mcp, where <instance-name> is the first part of the address you use to open Threatray in your browser: <instance-name>.analysis.threatray.com.
  • Prerequisites: a Threatray account on an instance where the MCP server is enabled.

You can connect in two ways:

  • OAuth (recommended): your client opens a browser, and you sign in to Threatray and approve access.
  • API key: your client sends the key in an HTTP header. Use it for scripts, CI and headless machines, or clients without OAuth. Your API key is described in Authentication.

In the API key examples, replace <api-key> with your key.

Install

OAuth (recommended)

claude mcp add --transport http --scope user threatray https://api-<instance-name>.analysis.threatray.com/mcp
claude mcp login threatray

To check the connection, run claude mcp list. If the tools don't appear right after your first sign-in, restart Claude Code.

API key

Each client sends your key in the header Authorization: apikey <api-key>.

claude mcp add --transport http --scope user threatray https://api-<instance-name>.analysis.threatray.com/mcp --header "Authorization: apikey <api-key>"

To check the connection, run claude mcp list.

Other MCP clients

Any client that supports remote MCP servers over Streamable HTTP can connect. OAuth works if the client registers itself without a client secret and returns to a web address or to localhost with a port. Otherwise use an API key, if the client lets you set the header Authorization: apikey <api-key>.

Check the connection

Ask your assistant: "Call threatray_connection and summarize the result." It reports who you're signed in as and the available tools. Then try a read-only question, such as "Look up 79d0b4b169e9be3e6b794106b424086f in Threatray."

Upload and download files

Threatray's tools never pass file contents through the AI model. To upload or download a file, your agent runs a command, typically curl or a short Python script, that transfers the file between your computer and Threatray. Coding agents do this once you approve the command.

If the agent runs in a sandbox, allow network access to api-<instance-name>.analysis.threatray.com. Each upload or download uses a one-time link that is valid for 10 minutes. If a download fails, ask the agent to try again. If an upload fails, have the agent check your latest submissions before submitting again, so the sample isn't submitted twice.

In chat apps, upload and download files in the Threatray web app.