MCP Server

How to read and change PentaTrail CTEM data from an AI tool you have approved. This page covers connecting and approving, and what each tool does with a worked example.

Updated 2026-10-14

Use PentaTrail from your own AI tool.

Connect an AI tool you have approved via MCP to review PentaTrail’s asset information and remediation guidance in your conversation. You can also use the available operations to change asset importance settings and mark remediation tasks as requiring no action or undo that decision.

  • Check your exposed assets

    Retrieve information on your registered domains and exposed assets, and narrow down what you want to look at.

  • Review priorities and remediation options

    Retrieve vulnerability risk levels and remediation guidance to help you assess what action to take.

  • Apply the decisions you’ve made

    Set asset importance and record decisions that remediation tasks require no action in PentaTrail.

Connecting

Endpoint
https://api.pentatrail.co/mcp
  1. 1. Register the endpoint

    Add https://api.pentatrail.co/mcp to your MCP-capable AI tool as a remote server. No key or user name is needed.

  2. 2. Approve it in your browser

    When the tool connects, your browser opens the PentaTrail sign-in and approval screen. The screen lists what that connection can actually do. Read it and choose “Approve”.

  3. 3. The tools become available

    Once approved, the tools on this page are callable from your AI tool. If you hold more than one contract, use ctem_list_my_contracts to find the contract_id and pass it to the other tools.

  4. 4. You can revoke it at any time

    Approved tools can be revoked at any time from Settings in the admin console (admin.pentatrail.co). Once revoked, that tool can read nothing.

Read tools

Tools that answer questions about the current state, bundled so one call is usually enough.

This page lists the required arguments and what each action needs. Optional arguments such as filters and sort keys are described by the tools themselves — the tool list your AI client receives (tools/list) is the authority for the full set.

ctem_list_domains

The registered domains and their observation state. discovery_allowed says whether your current plan covers a domain for monitoring (not whether a run is in progress). Start here — every id in the default result can be passed to the other tools as domain_id.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
include_archivedoptionalAlso return domains removed from monitoring (default false). Ids that are not active cannot be used as domain_id elsewhere.
domain_idoptionalWhen given, the WHOIS registration facts for that domain are included.
Success
ctem_list_domains()

{
  "data": { "domains": [ … ], "plan": { … } }
}
ctem_get_domain_overview

The current state of one domain: asset counts, open findings by Threat Discovery Level, and what changed recently — in one call.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idrequiredThe domain to work on. Pass an id returned by ctem_list_domains.
Success
ctem_get_domain_overview({ domain_id: "…" })

{
  "data": {
    "assets_counts": { … },
    "findings_severity": { … },
    "changes": [ … ]
  }
}
ctem_list_assets

Lists discovered assets. Pick what to look at with kind (hosts, IPs, URLs, ports, technologies, buckets, and exclusions).

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idrequiredThe domain to work on. Pass an id returned by ctem_list_domains.
kindrequiredWhich assets to list: host / ip / url / port / port_group / tech / tech_group / bucket / exclusion. exclusion is the only place exclusion ids come from.
pageoptionalPage number (default 1).
limitoptionalItems per page (default 20).
searchoptionalKind-specific search. Filters a kind does not accept are rejected rather than silently ignored.
Success
ctem_list_assets({ domain_id: "…", kind: "host" })

{
  "data": { "assets": [ { "fqdn": "…", "ip_addresses": [ … ], "ip_address_count": 16, "ip_addresses_truncated": true } ] },
  "pagination": { "page": 1, "limit": 20, … },
  "notes": [ … ]
}
ctem_list_findings

Lists findings, highest Threat Discovery Level first. With status omitted you get open findings only, excluding informational ones.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idrequiredThe domain to work on. Pass an id returned by ctem_list_domains.
pageoptionalPage number (default 1).
limitoptionalItems per page (default 20).
statusoptionalFilter by status. Pass all to see every status.
Success
ctem_list_findings({ domain_id: "…" })

{
  "data": { "findings": [ … ] },
  "pagination": { … },
  "notes": [ … ]
}
ctem_get_finding

One finding in detail, together with its detection history.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
finding_idrequiredThe finding to read. Pass an id returned by ctem_list_findings. This tool takes no domain — the finding id is enough.
Success
ctem_get_finding({ finding_id: "…" })

{
  "data": {
    "finding": { … },
    "detection_history": { "first_detected": "…", "events": [ … ] }
  }
}
ctem_get_prioritization

What to work on next: risk bands, the hosts behind them, owners, and attack-path chokepoints — in one call.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idrequiredThe domain to work on. Pass an id returned by ctem_list_domains.
fqdnoptionalOptional. When given, the detail for that host is included as well.
vuln_idsoptionalOptional. Narrows bands to these vuln_ids — pass a task's affected_vuln_ids straight through (matching ignores case). Only bands is narrowed; the counts in the same answer still cover the whole domain.
Success
ctem_get_prioritization({ domain_id: "…" })

{
  "data": {
    "bands": [ … ],
    "hosts": [ … ],
    "host_owners": [ … ],
    "chokepoints": { "rows": [ … ], "uncovered_finding_count": … }
  }
}
ctem_list_groups

Groups, their members, and the people on the contract. Pass group_id to include that group’s members as well.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idoptionalOmit for hosts and triage across active origins in the contract; pass for one origin.
group_idoptionalOptional. When given, that group’s members are included as well.
Success
ctem_list_groups({ domain_id: "…" })

{
  "data": {
    "groups": [ … ],
    "contract_members": [ … ],
    "triage_summary": { … }
  }
}
ctem_list_tasks

Remediation tasks and counts by status. Pass task_id to also learn which page a single task is on.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
domain_idrequiredThe domain to work on. Pass an id returned by ctem_list_domains.
pageoptionalPage number (default 1).
limitoptionalItems per page (default 20).
task_idoptionalOptional. When given, the location of that one task is included as well.
Success
ctem_list_tasks({ domain_id: "…" })

{
  "data": { "tasks": [ … ], "progress": { … } },
  "pagination": { … }
}
ctem_get_mail_settings

Read mobilization mail recipients, current settings and assigned hosts in pages.

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
sectionoptionalrecipients (default) or subdomains.
user_idoptionalRequired for subdomains: recipient id from the settings list.
pageoptionalPage number (default 1).
limitoptionalItems per page (default 20).
Success
ctem_get_mail_settings({})

{ "data": { "timezone": "Asia/Tokyo", "recipients": [ … ] }, "pagination": { … }, "notes": [ … ] }

Write tools

Tools that change state. Related operations share one tool; pick the operation with action.

ctem_manage_domain

Remove a domain from monitoring (archive). register does not register anything: it returns a link to the web registration screen with the domain filled in. Registration and monitoring start only after you press Register on the confirmation screen in the web app. A registered domain cannot be changed for 30 days after registration.

actionregisterarchive

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredWhich operation to perform: register / archive. Each action needs its own arguments; when one is missing the tool tells you which.
domainoptionalFor action="register": the domain name to fill in on the web registration screen (nothing is registered here).
origin_domain_idoptionalFor action="archive": which monitored domain.
Success
ctem_manage_domain({ action: "register", domain: "example.com" })

{
  "data": { "registered": false, "domain": "example.com", "web_registration_url": "https://app.pentatrail.co/dashboard/ctem/assets?manage=domains&register_domain=example.com", "contract": { "contract_id": "…", "name": "…" } },
  "notes": ["The domain has NOT been registered. …"]
}
ctem_manage_exclusions

Exclude assets from monitoring, or restore them — one at a time or in bulk. The exclusion ids you need to restore come from ctem_list_assets({ kind: "exclusion" }).

actionexcludeexclude_bulkrestorerestore_bulk

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredWhich operation to perform: exclude / exclude_bulk / restore / restore_bulk. Each action needs its own arguments; when one is missing the tool tells you which.
domain_idoptionalFor action="exclude": which domain the asset belongs to.
origin_domain_idoptionalFor action="exclude_bulk" / "restore_bulk": which domain the assets belong to.
categoryoptionalFor action="exclude" / "exclude_bulk" / "restore_bulk": the asset category.
category_keyoptionalFor action="exclude": the single asset key.
category_keysoptionalFor action="exclude_bulk" / "restore_bulk": the asset keys.
exclusion_idoptionalFor action="restore": which exclusion to lift.
Success
ctem_manage_exclusions({ action: "restore", exclusion_id: "…" })

{
  "data": null
}
ctem_manage_group

Create, change and delete groups, assign hosts to them, and add or remove people.

actioncreateupdatedeleteassign_hostsadd_memberremove_member

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredWhich operation to perform: create / update / delete / assign_hosts / add_member / remove_member. Each action needs its own arguments; when one is missing the tool tells you which.
group_idoptionalFor every action but create: which group. If you omit it with action="assign_hosts", the assets you list are removed from their current group.
nameoptionalFor action="create" (required) / "update": the group name.
user_idoptionalFor action="add_member" / "remove_member": which person.
asset_typeoptionalFor action="assign_hosts": host or ip.
asset_idsoptionalFor action="assign_hosts": which assets.
Success
ctem_manage_group({ action: "create", name: "Public Web" })

{
  "data": { "group_id": "…" }
}
ctem_manage_task

Mark a remediation task as needing no action, or undo a "no action needed" decision.

actioncompletereopen

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredWhich operation to perform: complete / reopen. Each action needs its own arguments; when one is missing the tool tells you which.
task_idoptionalWhich task. Pass an id returned by ctem_list_tasks.
statusoptionalRequired for action="complete". Only status="accepted" (no action needed) is allowed. Resolution is determined by observation results.
Success
ctem_manage_task({ action: "complete", task_id: "…", status: "accepted" })

{
  "data": null
}
ctem_manage_business_impact

Set a host’s business impact to Important, Standard or Limited, or request a return to AI. The user setting remains until AI succeeds.

actionsetrevert

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredset or revert.
host_idrequiredHost id from the host list.
valueoptionalRequired for set: important / standard / limited. Do not pass for revert.
Success
ctem_manage_business_impact({ action: "set", host_id: "…", value: "important" })

{ "data": { "host_id": "…", "business_impact": "important", "bi_score": 11 }, "notes": [ … ] }
ctem_manage_mail_settings

Change a recipient’s mobilization mail frequency/language or the contract timezone. This does not send mail.

actionset_preferenceset_timezone

Arguments

contract_idoptionalOptional when you belong to a single contract. Required only if you belong to more than one.
actionrequiredset_preference or set_timezone.
user_idoptionalRequired for set_preference: the recipient id.
frequencyoptionalset_preference: daily / weekly / biweekly (Every 2 weeks) / monthly / off. At least frequency or language is required; off has no next delivery.
languageoptionalset_preference: ja / en. Also affects the existing notification language.
timezoneoptionalRequired for set_timezone: IANA name, affecting all recipients’ schedules. Do not combine with recipient preferences.
Success
ctem_manage_mail_settings({ action: "set_preference", user_id: "…", frequency: "biweekly" })

{ "data": { … }, "notes": [ … ] }

Connection helper

One extra tool, separate from the CTEM set, used when you first connect.

ctem_list_my_contracts

Lists the contracts you belong to. Use it to find the contract_id to pass to the other tools when you belong to more than one. If you belong to none it returns an empty list rather than failing.

Success
ctem_list_my_contracts()

{
  "contracts": [
    { "contract_id": "…", "name": "…" }
  ]
}