TRUSTIVAN is a Model Context Protocol server. An assistant that speaks MCP can search your findings, explain a risk score, look a rule up in the check catalogue, read your posture and compliance status, and, if you let it, suppress a finding, set an asset’s owner or open a fix pull request. There are two ways to connect, with the same tools and the same rules:
  • Hosted endpoint: the assistant connects to https://app.trustivan.com/api/v1/mcp with an API key. Nothing to install.
  • Local server: the assistant starts trustivan mcp, from the trustivan CLI, as a subprocess.
This is TRUSTIVAN serving your security data to your assistant. It is not the NHI Security feature that governs other MCP servers your agents call; for that, see MCP server guardrails.

How it works

Both are one server (tools only), built from the same code, and a client of the public API and nothing else: each tool makes ordinary API requests with your key. The hosted endpoint sends those requests to the API it runs in, without a network hop; the local server sends them over HTTPS. Neither holds a database credential or adds authority of its own:
  • The API key decides what the assistant can see and do. Every tool calls the API with the key you configure. A tool whose scope the key lacks is refused by the API, and the assistant is told which scope is missing.
  • The API’s per-credential rate limit applies. It is 600 requests a minute per key by default (RATE_LIMIT_PER_MINUTE, enforced when Redis is configured). A refused call tells the assistant when to retry.
  • Every change is recorded as the key. A suppression made through the assistant appears in the finding’s history with the API key as the actor, exactly as one made with curl would.
  • No tool starts a scan, so an assistant cannot point TRUSTIVAN at a target you have not verified.

Hosted endpoint

POST https://app.trustivan.com/api/v1/mcp (on a self-hosted deployment, /api/v1/mcp on its address). It speaks MCP’s streamable HTTP transport, protocol revisions 2025-06-18 and 2025-03-26.
  1. Under Settings, API keys, create a key with the scopes of the tools you want. For read-only use, findings:read and assets:read are enough. The endpoint takes an API key only: a signed-in session or a workload credential is refused.
  2. Add the server to your assistant, sending the key as Authorization: Bearer twk_...:
What is different from the local server:
  • No --read-only. Every tool is listed; give the key no write scope and the API refuses every write. tools/list shows all sixteen tools whatever the key holds, as the local server does.
  • The rate limit counts more. Each request to the endpoint counts against the key’s per-minute limit, and so does each API call a tool makes (one to three), where the local server counts only the API calls.
  • Stateless. No Mcp-Session-Id is issued and every request is authenticated on its own. Answers are always JSON; there is no event stream (GET and DELETE answer 405).
  • Browsers are refused by origin. A request carrying an Origin header other than your dashboard’s is refused with 403, which is what stops a web page from driving the endpoint through a visitor’s browser (DNS rebinding). Assistant clients send no Origin.
  • Bounded. A message may be at most 1 MiB; a batch (a JSON array) is refused. A client that sends MCP-Protocol-Version must name 2025-06-18 or 2025-03-26 (or 2024-11-05, which is accepted, though that revision’s own HTTP transport is not offered).
See POST /mcp in the API reference for the exact responses.

Local server

trustivan mcp speaks MCP over standard input and output (protocol revisions 2024-11-05, 2025-03-26 and 2025-06-18).
  1. Install the trustivan CLI. Builds exist for Linux and macOS on amd64 and arm64, and for Windows on amd64.
  2. Under Settings, API keys, create a key with the scopes of the tools you want. For read-only use, findings:read and assets:read are enough.
  3. Add the server to your assistant, as below. Set TRUSTIVAN_URL to your deployment when it is not https://app.trustivan.com.
Add --read-only after mcp to offer no tool that changes anything, whatever the key’s scopes.
These, and the hosted configurations above, follow each client’s documented configuration format. TRUSTIVAN’s tests run the protocol handshake and the tools against the API over both transports; they do not drive the four clients themselves.

Tools

Every argument is checked against the schema the assistant is shown before any request is made. Lists return at most 50 rows (20 by default) with a next_cursor for the next page, and no answer is larger than 200 KiB. Two kinds of “assign”: set_asset_owner routes every finding on an asset to a team, and assign_finding gives one finding to one member of the organization (search_findings with assignee lists what someone holds).

Scopes

The table above names the scopes each tool needs. Grant the fewest that cover what you want the assistant to do: See Scopes for what each one allows over the API.

What the assistant is shown, and what it is not

  • Scanned text is labelled as untrusted. A finding’s title, description, package and path, an asset’s name and owner, a fix pull request’s branch: everything that came from a repository, an image, a cloud account, an advisory or a person sits under an untrusted key in each answer, and the server tells the client at start-up to treat those values as data, never as instructions. Control characters and invisible formatting characters (bidirectional overrides, zero-width characters) are removed, and the text is cut at 300 characters (2,000 for a description) with a visible [truncated].
  • No secret value is returned. TRUSTIVAN never stores a detected credential, only a redacted excerpt and a digest, and the MCP server does not pass on even those. It also leaves out a static-analysis finding’s code snippet and a dynamic scan’s request and response excerpts, which can carry credentials. The API key itself, and anything shaped like a TRUSTIVAN key, is removed from every answer and error.
  • Changes wait for confirm: true. Called without it, a write tool changes nothing and returns what it would do, so the assistant can show you first. This is a speed bump, not a security boundary: a model can be told to set confirm. What bounds the assistant is the key’s scopes, --read-only (local server), and your client’s own approval prompt for each tool call. Keep write scopes off a key you hand to an assistant unless you want it able to write.