Sign In

@pentatrail/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pentatrail/mcp-server

Retired — PentaTrail MCP moved to a remote server at https://api.pentatrail.co/mcp. This package only prints the hand-off notice.

latest
Source
npmnpm
Version
0.9.0
Version published
Weekly downloads
601
237.64%
Maintainers
1
Weekly downloads
 
Created
Source

@pentatrail/mcp-server

⚠ Retired — the server moved to a remote endpoint

PentaTrail MCP は遠隔サーバへ移りました。このパッケージ(stdio + API キー)はもう動きません。

新しい繋ぎ先: https://api.pentatrail.co/mcp 認可は初回接続時にブラウザで承認します。API キーの設定は不要です。

The PentaTrail MCP server is now hosted by us and reached over Streamable HTTP at the URL above. This npm package no longer contains a server: installing it and running it prints this notice and exits. Point your MCP client at the remote URL instead — it opens a browser on first connect so you can approve access, and there is no API key to create, paste, or store anywhere.

API keys (ptk_...) are no longer accepted, so a client still configured the old way fails to authenticate rather than falling back to anything. Nothing you configure by hand carries over; set the server up again from the remote URL.

The endpoint above is the same for every MCP client — point your client at it and approve the request in the browser when prompted.

⚠ Per-client setup instructions are not published yet, and the admin console does not link to them. Both land with the customer-facing documentation rewrite that ships in the same release as this hand-off.

PentaTrail MCP gives an AI agent access to your CTEM (Continuous Threat Exposure Management) data via Model Context Protocol. The tool surface it serves is read-only. The 16 read tools carried over unchanged; the remote adds one more — ctem_list_my_contracts, for picking which contract a call reads when you belong to several. What else changed is how you connect.

The retired configuration

Everything below this line describes the setup that no longer works. It is kept so that anyone who finds an old configuration on their machine can recognise it and knows what to replace. Do not follow it as instructions.

Run

npx @pentatrail/mcp-server

This is the command your MCP client runs for you. Running it by hand exits immediately, because the environment variables below are not set. Configure your client instead — the command belongs in the client's config, not in your terminal.

⚠ On this version it exits immediately no matter what you set: it prints the hand-off notice above and returns a non-zero status, so an MCP client configured this way reports a failed server rather than a working one.

Configure

The two clients read their MCP configuration from different places. Neither of the configurations below works any more; find yours and replace it with the remote URL.

Claude Code

claude mcp add pentatrail -s user -e PENTATRAIL_API_KEY='${PENTATRAIL_API_KEY}' -e PENTATRAIL_API_URL=https://api.pentatrail.co -- npx @pentatrail/mcp-server

⚠ Do not put the API key itself in this command. ${PENTATRAIL_API_KEY} is a reference, not a value: no API key is written to the config file (~/.claude.json), and Claude Code reads it from the environment when it starts the server. Keep the quotes — without them your shell expands the reference first and the value is written into the file. This command uses bash / zsh syntax. If it does not work on Windows, run claude mcp get pentatrail and check whether the environment line remains PENTATRAIL_API_KEY=${PENTATRAIL_API_KEY}. Set PENTATRAIL_API_KEY in the environment that starts your MCP client, and supply the value to that environment from an OS credential store (Keychain on macOS, Credential Manager on Windows, or a secrets manager on Linux / WSL). Shell profile settings may not apply to a client launched from the desktop.

-s user registers the server for your user account, so it is available in every project. Without it the server is registered only for the directory you ran the command in, so it will not appear when you start Claude Code somewhere else.

Confirm the server registered:

claude mcp get pentatrail

The reference is registered for your user account when the output says "User config" and the environment line remains PENTATRAIL_API_KEY=${PENTATRAIL_API_KEY}. If it shows a value shaped like ptk_..., the API key is stored in plain text in the configuration file. Revoke that API key in the admin console and register it again with the quotes. claude mcp get displays saved values on screen, so do not run it while sharing or recording your screen. "✔ Connected" does not prove that the API key is valid.

Claude Desktop

Add this block to claude_desktop_config.json:

⚠ The Claude Desktop configuration file keeps the value you write, so treat the API key as stored there in plain text. Avoid it on shared machines, configure API IP Allowlist under User Management, and revoke the API key from the admin console when you no longer need it.

{
  "mcpServers": {
    "pentatrail": {
      "command": "npx",
      "args": ["@pentatrail/mcp-server"],
      "env": {
        "PENTATRAIL_API_KEY": "ptk_your_api_key_here",
        "PENTATRAIL_API_URL": "https://api.pentatrail.co"
      }
    }
  }
}

Environment Variables

⚠ Neither variable is read any more, and the API keys they carried are no longer accepted. Remove them from your client configuration and from wherever you stored the key.

VariableStatusDescription
PENTATRAIL_API_KEYNo longer usedWas your API key (ptk_...). Authorization now happens in the browser on first connect.
PENTATRAIL_API_URLNo longer usedWas https://api.pentatrail.co. The MCP endpoint is https://api.pentatrail.co/mcp.

Tools

These are served by the remote server at https://api.pentatrail.co/mcp. The surface is read-only. The 16 tools below carried over unchanged. ⚠ The remote adds one that is not listed below — ctem_list_my_contracts — which returns the contracts you belong to; other tools name it when a call is ambiguous because you belong to more than one.

CTEM Read

ToolDescription
ctem_list_domainsList your monitored domains. Start here — by default it returns active domains only, and every domain in that default result can be passed straight to the other tools as domain_id. include_archived: true drops the status filter, so the result then also contains non-active domains (archived, and legacy paused) whose ids the other tools reject with PT_API_NOT_FOUND
ctem_list_hostsList hosts with enrichment (port/tech/finding counts, sortable)
ctem_list_findingsList vulnerabilities sorted by Threat Discovery Level (TDL)
ctem_get_asset_countsGet asset type counts (hosts, IPs, ports, tech, buckets, URLs)
ctem_get_tdl_countsGet open finding counts grouped by TDL (tdl5=most critical)
ctem_get_scoresGet live domain scores (asset counts + findings breakdown)
ctem_get_score_trendGet security score trend over time (7-365 days)
ctem_list_portsList open ports grouped by port/protocol, filterable by source type
ctem_list_techList detected technologies grouped by category and name
ctem_list_port_groupsHost counts per (port, protocol, service)
ctem_list_tech_groupsTech hierarchy: category → name → host count
ctem_list_ipsPaginated list of discovered IP addresses
ctem_list_urlsPaginated list of discovered URLs
ctem_list_buckets_paginatedPaginated cloud storage buckets, one row per bucket
ctem_list_buckets_mergedCloud buckets de-duplicated by (cloud_type, bucket_name)
ctem_summarize_findingsRollup per vuln_id with max CVSS/EPSS, KEV count, affected hosts

Usage Examples

Once configured, ask your AI assistant:

  • "Show me all monitored domains"
  • "List critical findings for domain X"
  • "What's the security score trend for the last 30 days?"
  • "How many assets do we have?"
  • "Show my threat exposure risk level for this domain"

Requirements

  • An MCP client that can connect to a remote server over Streamable HTTP
  • A browser, to approve access on first connect
  • A PentaTrail account with an active contract

⚠ No Node.js runtime and no API key are needed any more — nothing runs on your machine.

License

UNLICENSED - Proprietary software. All rights reserved.

Keywords

mcp

FAQs

Package last updated on 14 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts