Connecting CTEM data to AI agents over MCP: asking an AI about your own attack surface

PentaTrail Team···8 min read
Contents

"What's the most dangerous vulnerability we have right now?" "Which hosts appeared last week?" You can ask an AI in plain language instead of clicking through a dashboard.

The answers come from your own current attack surface data. What follows covers the mechanism, what it can do, and how the guardrails carry over.

01 / Query your own attack surface in plain language, without navigating a UI

The key is MCP (Model Context Protocol), a common socket between AI applications and outside data. PentaTrail runs a remote server that speaks it.

Diagram of a query travelling from an AI agent to your own CTEM data. A user asks in plain language, the AI agent goes through the MCP socket to PentaTrail's remote server, and the answer comes back from your current attack surface data

Figure 1: The path from question to answer

Deep dive: no integration code to write

Previously this meant reading an API spec, implementing authentication and writing code to parse responses. Registering one endpoint and pressing approve is what MCP replaces all of that with.

02 / Connecting is one URL plus a browser approval

Register https://api.pentatrail.co/mcp as a remote server in your AI agent. When the connection starts, a browser opens so you can read what the connection permits before approving.

Diagram of the three connection steps. Register the remote server URL in your AI agent, read what the connection permits in the browser that opens and approve it, then ask for the highest-priority vulnerability on your domain

Figure 2: Register, approve, ask

Deep dive: each tool carries its own description

Which arguments a tool takes is defined by the list your client receives on connection — that list is the authority. Per-tool usage and the set of errors you can get back are collected in the MCP server guide.

03 / 15 tools: 9 for reading, 6 for making changes

Nine tools retrieve information about assets, vulnerabilities, and more. Six tools let you manage monitored assets, groups, business impact, and email settings. One additional tool helps you identify the contracts you belong to.

9 read tools, 6 write tools, 1 additional tool

Figure 3: 9 read tools, 6 write tools, 1 additional tool

04 / The same guardrails as ordinary use carry over unchanged

Going through an AI agent does not loosen anything. You see your own contract's data and nothing else, and row-level security is what holds that line.

Diagram of the three guardrails on agent access. Requests are bound to a contract so other companies' data is unreachable, approval happens in the browser so no secret is written into local configuration, and calls that come too fast are refused with the time they can resume

Figure 4: A different path, the same guardrails

Deep dive: approval can be revoked at any time

Because the connection is established by a browser approval, no credential has to be written into an external tool's configuration. Approval can be revoked from the admin screen, after which the revoked tool can read nothing. Since no secret was left on your side, revoking is itself the cut-off.

05 / Where it pays: ad-hoc questions, situation summaries, report drafts

The gain shows up wherever the same shape of work repeats. A weekly report with near-identical structure leaves plenty of room to have the numbers fetched and a draft written.

Diagram of three places agent access pays off. Ad-hoc questions let people reach information without knowing a query language, situation summaries pull across your own data, and report drafts fetch the numbers so the owner can concentrate on review

Figure 5: Three places it pays

Having your attack surface answerable by an AI is part of the paid plan.

Appendix: the tools, and how to start

Table 1: Read tools

Tool What comes back
ctem_list_domains Monitored domains and their observation state; the place to start
ctem_get_domain_overview Asset counts, open counts by threat level, recent change
ctem_list_assets Asset list (hosts, IPs, URLs, ports, technologies, buckets and more)
ctem_list_findings Findings, highest threat level first; open only by default
ctem_get_finding One finding in detail, with detection history
ctem_get_prioritization Risk bands, affected hosts, owners, attack-path chokepoints
ctem_list_groups Groups, members, and contract owners. Omit the domain to retrieve host information and summaries across the contract.
ctem_list_tasks Remediation tasks and counts by status
ctem_get_mail_settings View remediation reminder recipients, delivery preferences, and assigned hosts.

Table 2: Write tools

Tool What it does
ctem_manage_domain Add a monitored domain, remove one
ctem_manage_group Create, change and delete groups, assign hosts, add and remove users
ctem_manage_task Mark a task as needing no action, or undo a "no action needed" decision
ctem_manage_exclusions Exclude assets from monitoring, or bring them back
ctem_manage_business_impact Set asset importance to Important, Standard, or Limited, or switch back to AI-based assessment.
ctem_manage_mail_settings Change remediation reminder frequency, language, and the contract's time zone.

The three steps to start

  1. Register https://api.pentatrail.co/mcp with your AI agent as a remote server.
  2. When the tool starts connecting, a browser opens; read what the connection permits and approve it.
  3. Ask "what's the highest-priority vulnerability on our domain?"

Visualize your attack surface with PentaTrail CTEM/ASM

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

See pricing/Compare and choose