Ask Your Attack Surface — Connecting Your CTEM Data to an AI Agent via MCP

PentaTrail Team··6 min read
Table of Contents

"What's our most dangerous vulnerability right now?" "Which hosts appeared last week?"—answers to questions like these, without opening the dashboard and clicking through screens, just by asking an AI in plain language. And those answers are grounded in your own latest attack-surface data.

PentaTrail's CTEM (Continuous Threat Exposure Management) data can now be queried directly from an AI agent. This article introduces how it works, what you can do with it, and why it's safe to use.

Connecting your CTEM data to an AI agent

The key is MCP (Model Context Protocol). MCP is an open standard Anthropic published in 2024—a common "socket" that connects AI applications to external data and tools. Major AI vendors have adopted it one after another, and it's becoming the de facto standard for AI integration.

PentaTrail provides @pentatrail/mcp-server (published on npm), which speaks MCP. Add a little to your AI agent's configuration (Claude Code, Claude Desktop, and so on)—with no integration code to write—and it connects to your CTEM data. What used to require "read the API spec, implement auth, write code to parse the responses" now takes a single block added to a config file.

Here's how you can use it

Once connected, you just ask, in natural language.

  • Ad-hoc questions — "Show me the top 5 unaddressed vulnerabilities," "Which new hosts haven't been validated yet?" Staff who don't know a query language, or short-term external members, can reach the information they need right away.
  • Summarizing the situation — Ask "summarize this week's new detections and resolutions," and the AI reads across your data to summarize it. For how priority is set, see TER bands and TDL.
  • Drafting reports — Board or parent-company reports follow nearly the same structure every week. Have the AI pull the numbers and draft it, and your staff can focus on comments and review.

One operational tip: don't let the AI do the arithmetic. Counts and changes are returned as confirmed values by CTEM; the AI is used only to put them into prose. That avoids the "looks polished but the numbers don't add up" report. The AI is there to prepare the materials—the final call stays with a human. That's the realistic, and most effective, way to use it.

Built to use with confidence

You're connecting your own security data to an AI, so it should be handled carefully. PentaTrail applies exactly the same protections to access via an AI agent as to normal use.

  • You only ever see your own contract's data — every request is bound to your contract, and other organizations' data is completely out of reach (row-level security).
  • API-key authentication, with rate limits — authentication uses a key issued per contract (it starts with ptk_), with rate limiting applied.
  • The powerful keys stay with us — we never place admin-privilege keys in your environment or your agent.

Getting started

Connecting is simple.

  1. Issue an API key from the dashboard (it starts with ptk_).
  2. Add the PentaTrail MCP server—one block—to your AI agent's configuration.
  3. Ask: "Tell me the top vulnerabilities for our domain."

The value of CTEM lies in grasping your attack surface continuously. Being able to ask about that ongoing picture in plain language, before you even open the dashboard, makes the entry point to operations much lighter.

If you'd like to make your attack surface askable by AI, start your 14-day free trial. For the bigger picture of CTEM, see What is CTEM? as well.

Visualize your attack surface with PentaTrail/CTEM

From discovery to vulnerability validation and remediation — all powered by the CTEM framework.

Get Started