vanta-auditor-api-mcp 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,667 @@
1
- # Temporary Holding Version
1
+ # Vanta Auditor API MCP server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This [MCP](https://modelcontextprotocol.io) server is for audit firms that use
4
+ Vanta. It lets your firm's AI agents work with the audits that your customers
5
+ run in Vanta, through the
6
+ [Vanta Auditor API](https://developer.vanta.com/docs/quickstart/conduct-audit).
7
+ Agents can read audits, information requests, evidence, controls, comments,
8
+ people and assets. If you allow it, they can also comment, update information
9
+ requests, review evidence and assess controls.
10
+
11
+ Vanta checks your firm's permissions and audit access on every call. The server
12
+ gets and renews its own access token, and it doesn't put your credentials in
13
+ tool results or errors.
14
+
15
+ > **⚠️ Important disclaimer:** This server is experimental. You may encounter
16
+ > bugs, errors or unexpected results. Always verify the accuracy and
17
+ > appropriateness of AI-generated responses before you rely on them in audit
18
+ > work or let an agent change audit data. You are responsible for reviewing all
19
+ > outputs and for ensuring that they meet your firm's professional standards
20
+ > and audit methodology.
21
+
22
+ **Setting this up with an AI agent?** Point it at this README and have it follow
23
+ [Instructions for setup agents](#instructions-for-setup-agents).
24
+
25
+ ## Contents
26
+
27
+ - [Before you start](#before-you-start)
28
+ - [Quick start](#quick-start)
29
+ - [Choose how to run the server](#choose-how-to-run-the-server)
30
+ - [Client setup](#client-setup)
31
+ - [Check that it works](#check-that-it-works)
32
+ - [Instructions for setup agents](#instructions-for-setup-agents)
33
+ - [Use the tools](#use-the-tools)
34
+ - [Allow writes](#allow-writes)
35
+ - [Reference](#reference)
36
+ - [Security and data](#security-and-data)
37
+ - [Versions and upgrades](#versions-and-upgrades)
38
+ - [Troubleshooting](#troubleshooting)
39
+ - [Get help](#get-help)
40
+
41
+ ## Before you start
42
+
43
+ You need:
44
+
45
+ - **A Vanta auditor account** at a firm with an active Vanta Audit Partner
46
+ registration, and at least one audit assigned to your firm.
47
+ - **Auditor API credentials**: a client ID and client secret.
48
+ [Quick start](#quick-start) step 1 shows how to create them.
49
+ - **Node.js 20.19 or later**, with `npx`, on the machine that runs the server.
50
+ If you run the server as a separate service, you need Docker or another
51
+ container runtime instead.
52
+ - **Network access** from the server to the Vanta API (`https://api.vanta.com`)
53
+ and, the first time it runs, to the npm registry.
54
+
55
+ ## Quick start
56
+
57
+ 1. **Create Auditor API credentials.** Sign in to Vanta with your auditor
58
+ account. In the left navigation, open **Auditor API**, then select
59
+ **Create**. Enter a name and description, then select **Create**. Select
60
+ **Generate client secret**, and copy the client ID and secret. If you don't
61
+ see **Auditor API**, contact your Vanta representative.
62
+
63
+ Create a separate application for this server, and don't use it for other
64
+ integrations. Vanta can invalidate an application's previous token when
65
+ anything requests a new one; see
66
+ [Vanta's Auditor API quickstart](https://developer.vanta.com/docs/quickstart/conduct-audit).
67
+
68
+ 2. **Store the credentials** in your secret manager. The server reads them from
69
+ the environment variables `VANTA_CLIENT_ID` and `VANTA_CLIENT_SECRET`.
70
+
71
+ 3. **Choose how to run the server**, beside the agent or as a private service.
72
+ See [Choose how to run the server](#choose-how-to-run-the-server).
73
+
74
+ 4. **Add the server to your agent.** Find your client in
75
+ [Client setup](#client-setup). Replace `<version>` with an exact published
76
+ version; `npm view vanta-auditor-api-mcp version` shows the latest one.
77
+ Every example starts a read-only server and reads the credentials from the
78
+ environment, so give the agent's environment `VANTA_CLIENT_ID` and
79
+ `VANTA_CLIENT_SECRET` from your secret manager.
80
+
81
+ 5. **Check that it works.** Follow [Check that it works](#check-that-it-works).
82
+
83
+ ## Choose how to run the server
84
+
85
+ | Your agent | Run the server |
86
+ | --- | --- |
87
+ | Has no shell, file or code-execution tools, and runs as one process | [Beside the agent](#run-beside-the-agent-stdio) |
88
+ | Can run commands or read files, runs as several workers, or starts many short sessions | [As a private service](#run-as-a-private-service-streamable-http) |
89
+
90
+ Run only one server process per Auditor API application. When a second process
91
+ gets a token for the same application, the first process's next call can fail.
92
+
93
+ ### Run beside the agent (stdio)
94
+
95
+ The agent's MCP client starts the server as a child process and talks to it over
96
+ stdio. The server holds the credentials in its environment, and the model never
97
+ receives them. Other processes on the same host can read that environment, so
98
+ use a private service if your agent can run commands or read files.
99
+
100
+ Each new agent session starts a new server process, which requests a new token.
101
+ If you start many short sessions, use a private service instead.
102
+
103
+ ### Run as a private service (Streamable HTTP)
104
+
105
+ The server runs in its own container. Only that container holds the
106
+ credentials, and one process gets and renews the token for all of your agents.
107
+
108
+ **Before you start the service, note this:** the endpoint has no
109
+ authentication of its own, and it allows requests from any browser origin.
110
+ Anything that can reach it acts with the service's Vanta permissions, including
111
+ the Docker host. Keep it on a private network, and don't publish its port.
112
+
113
+ ```sh
114
+ docker network create vanta-agents
115
+ docker run -d --name vanta-auditor-mcp --network vanta-agents \
116
+ -e VANTA_CLIENT_ID -e VANTA_CLIENT_SECRET \
117
+ node:24-slim npx -y vanta-auditor-api-mcp@<version> serve --port 2718 --scope read
118
+ ```
119
+
120
+ `-e VANTA_CLIENT_ID` passes the value of that variable from the shell that runs
121
+ `docker run`, so export both variables from your secret manager first.
122
+
123
+ Run your agents on the same network, for example with
124
+ `docker run --network vanta-agents ...`. Connect each agent's MCP client to
125
+ `http://vanta-auditor-mcp:2718/mcp` with the **Streamable HTTP** transport.
126
+ The server also supports the older SSE transport (`start --transport sse`), but
127
+ some clients, such as Codex, accept only Streamable HTTP.
128
+
129
+ `GET http://vanta-auditor-mcp:2718/` returns a status page that you can use as a
130
+ liveness check. It doesn't check your credentials.
131
+
132
+ To avoid downloading the package from npm at every start, build an image with
133
+ the package installed:
134
+
135
+ ```dockerfile
136
+ FROM node:24-slim
137
+ RUN npm install -g vanta-auditor-api-mcp@<version>
138
+ USER node
139
+ EXPOSE 2718
140
+ ENTRYPOINT ["vanta-auditor-api-mcp", "serve", "--port", "2718"]
141
+ CMD ["--scope", "read"]
142
+ ```
143
+
144
+ ## Client setup
145
+
146
+ The examples use the server name `vanta-auditor`. Tool names in your client then
147
+ start with that name, for example `mcp__vanta-auditor__audits-list-audits` in
148
+ Claude Code.
149
+
150
+ ### Claude Code
151
+
152
+ Add `.mcp.json` to your project. Claude Code expands `${VAR}` from the
153
+ environment that starts it, so the secrets stay out of the file:
154
+
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "vanta-auditor": {
159
+ "command": "npx",
160
+ "args": ["-y", "vanta-auditor-api-mcp@<version>", "start", "--scope", "read"],
161
+ "env": {
162
+ "VANTA_CLIENT_ID": "${VANTA_CLIENT_ID}",
163
+ "VANTA_CLIENT_SECRET": "${VANTA_CLIENT_SECRET}"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ For a private service, use `{"type": "http", "url": "http://vanta-auditor-mcp:2718/mcp"}`
171
+ instead.
172
+
173
+ Claude Code asks you to approve a project's `.mcp.json` servers once. Start
174
+ `claude` in the project and approve `vanta-auditor`, then run `claude mcp list`
175
+ to check that it connects. In headless mode, pass the file and allow the tools:
176
+ `claude -p "..." --mcp-config .mcp.json --allowedTools "mcp__vanta-auditor__*"`.
177
+
178
+ ### Codex
179
+
180
+ Add the server to `~/.codex/config.toml`. `env_vars` forwards the variables
181
+ from the environment that starts Codex:
182
+
183
+ ```toml
184
+ [mcp_servers.vanta-auditor]
185
+ command = "npx"
186
+ args = ["-y", "vanta-auditor-api-mcp@<version>", "start", "--scope", "read"]
187
+ env_vars = ["VANTA_CLIENT_ID", "VANTA_CLIENT_SECRET"]
188
+ ```
189
+
190
+ For a private service, use `url = "http://vanta-auditor-mcp:2718/mcp"` instead
191
+ of `command`, `args` and `env_vars`. Run `codex mcp list` to check the
192
+ configuration. In `codex exec`, set `default_tools_approval_mode = "approve"`
193
+ on the server if the agent must call tools without asking.
194
+
195
+ ### Claude Desktop, Cursor and other clients
196
+
197
+ Clients that use an `mcpServers` JSON file accept this configuration. Restart
198
+ the client after you change the file.
199
+
200
+ ```json
201
+ {
202
+ "mcpServers": {
203
+ "vanta-auditor": {
204
+ "command": "npx",
205
+ "args": ["-y", "vanta-auditor-api-mcp@<version>", "start", "--scope", "read"],
206
+ "env": {
207
+ "VANTA_CLIENT_ID": "${VANTA_CLIENT_ID}",
208
+ "VANTA_CLIENT_SECRET": "${VANTA_CLIENT_SECRET}"
209
+ }
210
+ }
211
+ }
212
+ }
213
+ ```
214
+
215
+ Check whether your client expands `${VAR}`. If it doesn't, you must write the
216
+ values into the file: protect the file like a password, and never commit it.
217
+
218
+ To install the package once instead of with `npx` at every start, run
219
+ `npm install -g vanta-auditor-api-mcp@<version>`, then use
220
+ `"command": "vanta-auditor-api-mcp"` and `"args": ["start", "--scope", "read"]`.
221
+
222
+ ### Claude Agent SDK (Python)
223
+
224
+ Install the SDK with `pip install claude-agent-sdk`. It needs Claude Code and
225
+ Anthropic credentials; see the
226
+ [Agent SDK documentation](https://code.claude.com/docs/en/agent-sdk).
227
+
228
+ ```python
229
+ import asyncio, os
230
+ from claude_agent_sdk import ClaudeAgentOptions, ResultMessage, query
231
+
232
+ options = ClaudeAgentOptions(
233
+ mcp_servers={
234
+ "vanta-auditor": {
235
+ "command": "npx",
236
+ "args": ["-y", "vanta-auditor-api-mcp@<version>", "start", "--scope", "read"],
237
+ "env": {
238
+ "VANTA_CLIENT_ID": os.environ["VANTA_CLIENT_ID"],
239
+ "VANTA_CLIENT_SECRET": os.environ["VANTA_CLIENT_SECRET"],
240
+ },
241
+ }
242
+ # Private service: {"type": "http", "url": "http://vanta-auditor-mcp:2718/mcp"}
243
+ },
244
+ allowed_tools=["mcp__vanta-auditor__*"],
245
+ )
246
+
247
+ async def main():
248
+ async for message in query(prompt="List my firm's audits.", options=options):
249
+ if isinstance(message, ResultMessage):
250
+ print(message.result)
251
+
252
+ asyncio.run(main())
253
+ ```
254
+
255
+ ### OpenAI Agents SDK (Python)
256
+
257
+ Install the SDK with `pip install openai-agents`, and set `OPENAI_API_KEY` for
258
+ the model.
259
+
260
+ ```python
261
+ import asyncio, os
262
+ from agents import Agent, Runner
263
+ from agents.mcp import MCPServerStdio
264
+
265
+ async def main():
266
+ async with MCPServerStdio(
267
+ name="vanta-auditor",
268
+ params={
269
+ "command": "npx",
270
+ "args": ["-y", "vanta-auditor-api-mcp@<version>", "start", "--scope", "read"],
271
+ "env": {
272
+ "VANTA_CLIENT_ID": os.environ["VANTA_CLIENT_ID"],
273
+ "VANTA_CLIENT_SECRET": os.environ["VANTA_CLIENT_SECRET"],
274
+ },
275
+ },
276
+ client_session_timeout_seconds=60,
277
+ ) as vanta:
278
+ agent = Agent(name="Auditor", instructions="Answer questions about our audits.", mcp_servers=[vanta])
279
+ result = await Runner.run(agent, "List my firm's audits.")
280
+ print(result.final_output)
281
+
282
+ asyncio.run(main())
283
+ ```
284
+
285
+ The first `npx` run downloads the package, so set
286
+ `client_session_timeout_seconds` above the SDK's 5-second default. For a
287
+ private service, import `MCPServerStreamableHttp` from `agents.mcp` and use
288
+ `MCPServerStreamableHttp(name="vanta-auditor", params={"url": "http://vanta-auditor-mcp:2718/mcp"})`.
289
+
290
+ ## Check that it works
291
+
292
+ A connection alone doesn't prove that the credentials work, because the server
293
+ requests a token only on the first tool call. After setup:
294
+
295
+ 1. **List the tools.** `audits-list-audits` is present. With `--scope read`,
296
+ every tool has the annotation `readOnlyHint: true`.
297
+ 2. **Call `audits-list-audits`** with `{}`. The call succeeds, and the JSON
298
+ text of the result has `results.data` with audits assigned to your firm.
299
+ The list has pages; see [Use the tools](#use-the-tools).
300
+
301
+ If the call succeeds but returns no audits, check that your firm has an active
302
+ audit in Vanta. If it fails, see [Troubleshooting](#troubleshooting).
303
+
304
+ To check from code before you give the tools to a model, call the server
305
+ directly. With the OpenAI Agents SDK, inside the `async with` block:
306
+
307
+ ```python
308
+ import json
309
+
310
+ tools = await vanta.list_tools()
311
+ assert any(tool.name == "audits-list-audits" for tool in tools)
312
+ assert all(tool.annotations.read_only_hint for tool in tools) # with --scope read
313
+ result = await vanta.call_tool("audits-list-audits", {})
314
+ assert not result.is_error, result.content[0].text
315
+ print(json.loads(result.content[0].text)["results"]["data"])
316
+ ```
317
+
318
+ ## Instructions for setup agents
319
+
320
+ If you are an AI agent that sets up this server for a user:
321
+
322
+ - **Don't ask for secret values in the conversation.** Ask the user to make
323
+ `VANTA_CLIENT_ID` and `VANTA_CLIENT_SECRET` available from their secret
324
+ manager, and check that both are set without displaying them, for example
325
+ with `test -n "$VANTA_CLIENT_ID" && test -n "$VANTA_CLIENT_SECRET"`. If the
326
+ user has no credentials, give them [Quick start](#quick-start) step 1.
327
+ - **Keep secret values out of files and commands.** Refer to secrets by
328
+ environment variable name. Don't print them, put them in command-line
329
+ arguments, or commit them.
330
+ - **Start read-only.** Use `--scope read` and leave `VANTA_SCOPES` unset unless
331
+ the user asks for writes.
332
+ - **Choose the run mode** with [Choose how to run the server](#choose-how-to-run-the-server).
333
+ If you can run commands, recommend the private service, because a stdio
334
+ server's environment is readable by processes like you.
335
+ - **Pin a version.** Use an exact version, not `latest`.
336
+ - **Check the result** with [Check that it works](#check-that-it-works), and
337
+ report what you found to the user.
338
+
339
+ ## Use the tools
340
+
341
+ The server exposes 39 read tools and 22 write tools. The tool list from the
342
+ running server, with each tool's description and input schema, is the
343
+ reference.
344
+
345
+ Each tool calls one Auditor API endpoint, which the
346
+ [Auditor API reference](https://developer.vanta.com/api-reference/audits/list-audits)
347
+ describes. Select a group to see its tools.
348
+
349
+ <details>
350
+ <summary><strong>Audits</strong> (7 tools)</summary>
351
+
352
+ | Tool | What it does | Scope |
353
+ | --- | --- | --- |
354
+ | `audits-list-audits` | List audits | read |
355
+ | `audits-get-audit` | Get audit by ID | read |
356
+ | `audits-get-framework-codes` | Get framework codes for an audit | read |
357
+ | `audits-get-organization-information` | Get organization information for an audit | read |
358
+ | `audits-get-organization-notifications` | Get organization notification settings for an audit | read |
359
+ | `audits-list-integrations` | List integrations for an audit | read |
360
+ | `audits-duplicate` | Duplicate an IRL audit | write |
361
+
362
+ </details>
363
+
364
+ <details>
365
+ <summary><strong>Information requests</strong> (8 tools)</summary>
366
+
367
+ | Tool | What it does | Scope |
368
+ | --- | --- | --- |
369
+ | `audits-list-information-requests` | List information requests for an audit | read |
370
+ | `audits-get-information-request` | Get an information request by ID | read |
371
+ | `audits-list-information-request-activity` | List information request activity | read |
372
+ | `audits-list-information-requests-for-control` | List information requests linked to a control within an audit | read |
373
+ | `audits-create-information-request` | Create a new information request | write |
374
+ | `audits-update-information-request` | Update an information request for an audit | write |
375
+ | `audits-delete-information-request` | Delete an information request for an audit | write, destructive |
376
+ | `audits-share-information-request-list` | Share information request list with customer | write |
377
+
378
+ </details>
379
+
380
+ <details>
381
+ <summary><strong>Evidence</strong> (10 tools)</summary>
382
+
383
+ | Tool | What it does | Scope |
384
+ | --- | --- | --- |
385
+ | `audits-list-information-request-evidence` | List evidence for an information request | read |
386
+ | `audits-get-information-request-evidence` | Get information request evidence by ID | read |
387
+ | `audits-get-information-request-test-snapshot-967` | Get test snapshot detail for an evidence row | read |
388
+ | `audits-list-information-request-test-snapshot-93f` | List raw test data for a test snapshot | read |
389
+ | `audits-get-audit-evidence` | Get an audit evidence item by ID | read |
390
+ | `audits-list-audit-evidence-urls` | List audit evidence url | read |
391
+ | `audits-accept-information-request-evidence` | Accept evidence for an information request | write |
392
+ | `audits-flag-information-request-evidence` | Flag evidence for an information request | write |
393
+ | `audits-update-audit-evidence` | Update audit evidence | write |
394
+ | `audits-create-custom-evidence-request` | Create a custom evidence request for an audit | write |
395
+
396
+ </details>
397
+
398
+ <details>
399
+ <summary><strong>Controls</strong> (3 tools)</summary>
400
+
401
+ | Tool | What it does | Scope |
402
+ | --- | --- | --- |
403
+ | `audits-list-audit-controls` | List audit controls | read |
404
+ | `audits-create-custom-control` | Create a custom control for an audit | write |
405
+ | `audits-upsert-assessment-for-control` | Upsert a control's assessment within an audit | write |
406
+
407
+ </details>
408
+
409
+ <details>
410
+ <summary><strong>Comments</strong> (12 tools)</summary>
411
+
412
+ | Tool | What it does | Scope |
413
+ | --- | --- | --- |
414
+ | `audits-list-audit-comments` | List audit comments | read |
415
+ | `audits-get-audit-evidence-comment` | Get an audit evidence comment by ID | read |
416
+ | `audits-create-comment-for-audit-evidence` | Create a comment for audit evidence | write |
417
+ | `audits-list-comments-for-information-request` | List comments for an information request | read |
418
+ | `audits-get-comment-for-information-request` | Get an information request comment by ID | read |
419
+ | `audits-create-comment-for-information-request` | Create a comment for an information request | write |
420
+ | `audits-update-comment-for-information-request` | Update a comment for an information request | write |
421
+ | `audits-delete-comment-for-information-request` | Delete a comment for an information request | write, destructive |
422
+ | `audits-list-comments-for-control` | List comments for a control within an audit | read |
423
+ | `audits-create-comment-for-control` | Create a comment for a control within an audit | write |
424
+ | `audits-update-comment-for-control` | Update a comment for a control within an audit | write |
425
+ | `audits-delete-comment-for-control` | Delete a comment for a control within an audit | write, destructive |
426
+
427
+ </details>
428
+
429
+ <details>
430
+ <summary><strong>Auditor files</strong> (4 tools)</summary>
431
+
432
+ | Tool | What it does | Scope |
433
+ | --- | --- | --- |
434
+ | `audits-list-information-request-auditor-files` | List auditor files for an information request | read |
435
+ | `audits-initiate-auditor-file-upload` | Start an auditor file upload | write |
436
+ | `audits-finalize-auditor-file-upload` | Complete an auditor file upload and attach the file | write |
437
+ | `audits-delete-information-request-auditor-file` | Delete an auditor file from an information request | write, destructive |
438
+
439
+ </details>
440
+
441
+ <details>
442
+ <summary><strong>People and access</strong> (5 tools)</summary>
443
+
444
+ | Tool | What it does | Scope |
445
+ | --- | --- | --- |
446
+ | `audits-list-personnel-people` | List people for an audit | read |
447
+ | `audits-list-personnel-groups` | List groups for an audit | read |
448
+ | `audits-list-people-in-audit-scope` | List of people who are in scope for this audit | read |
449
+ | `audits-list-personnel-account-access` | List account access records for an audit | read |
450
+ | `audits-list-account-access-services` | List account access services for an audit | read |
451
+
452
+ </details>
453
+
454
+ <details>
455
+ <summary><strong>Vendors, assets, risks and changes</strong> (11 tools)</summary>
456
+
457
+ | Tool | What it does | Scope |
458
+ | --- | --- | --- |
459
+ | `audits-list-vendors` | List vendors for an audit | read |
460
+ | `audits-list-vendors-in-audit-scope` | List of vendors who are in scope for this audit | read |
461
+ | `audits-list-monitored-computers-in-audit-scope` | List monitored computers | read |
462
+ | `audits-list-vulnerabilities` | List vulnerabilities within the scope of a given audit | read |
463
+ | `audits-get-vulnerable-assets` | List assets associated with vulnerabilities | read |
464
+ | `audits-list-vulnerability-remediations-in-audit-9a5` | List vulnerability remediations that are in scope for this audit | read |
465
+ | `audits-list-audit-risks` | List risks for an audit | read |
466
+ | `audits-list-risk-snapshots` | List risk snapshots for an audit | read |
467
+ | `audits-list-audit-issues` | List snapshotted issues for an audit | read |
468
+ | `audits-list-audit-snapshots` | List the issue snapshots shared with an audit | read |
469
+ | `audits-list-code-changes` | List code changes for an audit | read |
470
+
471
+ </details>
472
+
473
+ <details>
474
+ <summary><strong>Auditors</strong> (1 tool)</summary>
475
+
476
+ | Tool | What it does | Scope |
477
+ | --- | --- | --- |
478
+ | `auditors-create-auditor` | Create an auditor | write |
479
+
480
+ </details>
481
+
482
+ The four delete tools also need `--scope destructive`. See
483
+ [Allow writes](#allow-writes).
484
+
485
+ Calling conventions:
486
+
487
+ - **Arguments go in a `request` object**, for example
488
+ `{"request": {"auditId": "<audit ID>", "pageSize": 50}}`.
489
+ - **List tools return pages.** Each response has
490
+ `results.pageInfo.hasNextPage` and `endCursor`. To get the next page, call the
491
+ tool again with `pageCursor` set to `endCursor`.
492
+ - **A typical read flow** is `audits-list-audits` to find an audit ID, then
493
+ `audits-list-information-requests` for that audit, then
494
+ `audits-list-information-request-evidence` for a request.
495
+ - **Some tools work only for classic audits.** Their descriptions say so.
496
+
497
+ Example requests that you can give an agent:
498
+
499
+ - "Which information requests in the Acme SOC 2 audit are still open, and who
500
+ owns them?"
501
+ - "Summarize the evidence submitted for request IR-12 and list anything that
502
+ looks incomplete."
503
+ - "List the people in scope for this audit who don't have a completed security
504
+ training record."
505
+ - With writes allowed: "Add a comment to IR-12 asking for the Q3 access review."
506
+
507
+ All the tool definitions together are large. For models with a small context
508
+ window, use `--scope read`, list only the tools you need with `--tool`, or use
509
+ `--mode dynamic`. Dynamic mode replaces the tools with `list_tools`,
510
+ `describe_tool_input`, `execute_tool` and `list_scopes`. The agent finds a
511
+ tool with `list_tools`, then calls it with `execute_tool` and
512
+ `{"name": "<tool>", "arguments": {...}}`.
513
+
514
+ ## Allow writes
515
+
516
+ Two settings work together:
517
+
518
+ - **`VANTA_SCOPES` controls what the token can do.** The server requests these
519
+ scopes from Vanta. The default is `auditor-api.audit:read`.
520
+ - **`--scope` controls which tools the agent sees.** `--scope read` hides the
521
+ write tools.
522
+
523
+ To allow writes:
524
+
525
+ 1. **Request write scopes.** Set `VANTA_SCOPES`, separated by spaces or commas.
526
+ `auditor-api.audit:write` allows audit writes, and it also covers reads.
527
+ Add `auditor-api.auditor:write` only if agents must create auditors. Your
528
+ application must be allowed to request these scopes; if Vanta answers
529
+ `invalid_scope`, contact your Vanta representative.
530
+ 2. **List the write tools.** Use `--scope read --scope write`. This adds every
531
+ write tool except the four deletes. Add `--scope destructive` to also list
532
+ the delete tools.
533
+ 3. **Restart the server**, and repeat [Check that it works](#check-that-it-works).
534
+ With write tools listed, skip the `readOnlyHint` check.
535
+
536
+ Pass `VANTA_SCOPES` the same way as the credentials:
537
+
538
+ | Setup | How |
539
+ | --- | --- |
540
+ | Claude Code `.mcp.json`, other `mcpServers` files | Add `"VANTA_SCOPES": "auditor-api.audit:write"` to `env`. |
541
+ | Codex | Add `"VANTA_SCOPES"` to `env_vars`. |
542
+ | Agent SDKs | Add `"VANTA_SCOPES": "auditor-api.audit:write"` to the `env` dictionary. |
543
+ | Private service | Add `-e VANTA_SCOPES` to `docker run`. |
544
+
545
+ With client credentials, a write tool that lacks its scope in `VANTA_SCOPES`
546
+ returns an error, and the server sends nothing to Vanta. A bearer token
547
+ (`VANTA_BEARER_AUTH`, or a caller's `bearer-auth` header) skips this check, and
548
+ Vanta allows what that token's scopes allow. If such a token can write, use
549
+ `--scope read` to keep the server read-only.
550
+
551
+ Update tools, the assessment upsert and delete tools are marked destructive,
552
+ because they change or remove existing data. Your client can show this when it
553
+ asks for approval. Update tools and the upsert need only `--scope write`.
554
+
555
+ **Auditor file uploads take three steps.** `audits-initiate-auditor-file-upload`
556
+ returns a temporary `url` and form `fields`. The agent must then send the file
557
+ itself, outside the MCP server: a `multipart/form-data` POST to `url` with every
558
+ returned field unchanged and the file last, under `file`. After a 2xx response,
559
+ the agent calls `audits-finalize-auditor-file-upload` with
560
+ `{"request": {"auditId": "...", "requestId": "...", "body": {"uploadId": "..."}}}`.
561
+ Don't send the Vanta token in the upload POST. Upload before
562
+ `transferExpiresAt` and finalize before `finalizationExpiresAt`, both from the
563
+ first step. Agents without an HTTP tool can't upload files.
564
+
565
+ ## Reference
566
+
567
+ ### Environment variables
568
+
569
+ | Variable | Purpose |
570
+ | --- | --- |
571
+ | `VANTA_CLIENT_ID` | Auditor API client ID. Required with `VANTA_CLIENT_SECRET`. |
572
+ | `VANTA_CLIENT_SECRET` | Auditor API client secret. |
573
+ | `VANTA_SCOPES` | Scopes to request, separated by spaces or commas. Default: `auditor-api.audit:read`. |
574
+ | `VANTA_BEARER_AUTH` | A token you obtained yourself. Takes precedence over client credentials, and expires after an hour. |
575
+ | `VANTA_DEBUG` | Turns on request logging. Don't use it in production; see the warning below. |
576
+
577
+ ### Options
578
+
579
+ `start` runs the server over stdio (or SSE with `--transport sse`). `serve`
580
+ runs it over Streamable HTTP. Run `npx vanta-auditor-api-mcp@<version> start --help`
581
+ for the full list.
582
+
583
+ | Option | Purpose |
584
+ | --- | --- |
585
+ | `--scope read\|write\|destructive` | Lists only tools with these scopes. Repeat it for more than one. Without it, the server lists every tool. |
586
+ | `--server-url <url>` | Vanta API base URL. Default: `https://api.vanta.com/v1`. For Vanta Gov, use `https://api.vanta-gov.com/v1`. The server requests tokens from the same host. |
587
+ | `--mode dynamic` | Replaces the tools with `list_tools`, `describe_tool_input`, `execute_tool` and `list_scopes`. |
588
+ | `--tool <name>` | Lists only the named tools. Repeat it for more than one. |
589
+ | `--port <port>` | `serve`: the HTTP port. Default: `2718`. |
590
+ | `--disable-static-auth` | `serve`: each caller must send its own token in a `bearer-auth` header, and the server never uses its own credentials. The caller must replace that token before it expires. |
591
+ | `--log-level <level>` | `debug`, `info` (default), `warning` or `error`. Logs go to stderr. |
592
+
593
+ **Don't put secrets in command-line options.** Other processes on the host can
594
+ read them. Use environment variables instead of `--bearer-auth` or
595
+ `--env KEY=VALUE` for credentials.
596
+
597
+ **Don't use `--log-level debug` or `VANTA_DEBUG` in production.** Debug logging
598
+ prints request headers, including the access token, and request and response
599
+ bodies. Over stdio, it can also corrupt the connection to the client.
600
+
601
+ ## Security and data
602
+
603
+ - **Credentials.** The server sends the client secret only to `/oauth/token`
604
+ on the API host that `--server-url` sets, which is Vanta's by default. It
605
+ doesn't put the secret or the access token in tool results or errors.
606
+ - **Audit data reaches the model.** Tool results contain your customers' audit
607
+ data. Check that your model provider's data handling meets your firm's
608
+ requirements.
609
+ - **Evidence links.** `audits-list-audit-evidence-urls` returns temporary
610
+ download links for evidence files. The model, and any logs of tool results,
611
+ can see them while they are valid.
612
+ - **Run as little as needed.** Use `--scope read` unless agents must write, and
613
+ rotate the client secret in Vanta if you think it leaked. Restart the server
614
+ after you rotate it.
615
+
616
+ ## Versions and upgrades
617
+
618
+ Pin an exact version in every configuration. To upgrade, change the version,
619
+ restart the server, and repeat [Check that it works](#check-that-it-works). To
620
+ roll back, restore the previous version and restart. See the package's version
621
+ history on npm for what changed.
622
+
623
+ ## Troubleshooting
624
+
625
+ **The server doesn't start, or the client shows it as failed**
626
+
627
+ - `npm warn deprecated @modelcontextprotocol/server-legacy` on start is a
628
+ dependency warning. You can ignore it.
629
+ - `npx` not found: install Node.js 20.19 or later, and check that the client's
630
+ `PATH` includes it.
631
+ - The first start can take longer while `npx` downloads the package. Increase
632
+ your client's connection timeout, or install the package in advance.
633
+
634
+ **No tools appear, or write tools are missing**
635
+
636
+ - Check the `--scope` options. `--scope read` lists only read tools.
637
+ - Restart the client after a configuration change.
638
+
639
+ **The first tool call fails**
640
+
641
+ | Error | Cause and fix |
642
+ | --- | --- |
643
+ | `token request failed with HTTP 401 (invalid_client)` | The client ID or secret is wrong, or the application was deleted or its secret rotated. |
644
+ | `token request failed with HTTP 400 (invalid_scope)` | `VANTA_SCOPES` includes a scope that the application can't request. |
645
+ | `token request failed with HTTP 429 (rate_limit_exceeded)` | Too many token requests for the application, usually from many server processes. Use a private service. After a failed token request, the server waits 5 seconds before it tries again. |
646
+ | `Set both VANTA_CLIENT_ID and VANTA_CLIENT_SECRET to authenticate` | Only one of the two variables reached the server. |
647
+ | `This tool needs auditor-api.audit:write: add it to VANTA_SCOPES` | See [Allow writes](#allow-writes). |
648
+ | `Send a bearer-auth header: ...` | The service runs with `--disable-static-auth`, and the caller sent no token. |
649
+
650
+ **Calls that worked start to fail with 401**
651
+
652
+ - With client credentials: another process requested a token for the same
653
+ application, for example a second server or a script. The server requests a
654
+ new token on the next call. Give each server its own application, or use a
655
+ private service.
656
+ - With `VANTA_BEARER_AUTH` or a `bearer-auth` header: the token expired. Tokens
657
+ last an hour, and the server can't renew one that you supply.
658
+
659
+ **A call fails with 403, or an audit you expect is missing**
660
+
661
+ The token lacks the scope that the tool needs, or your firm can't access that
662
+ audit. Check the audit's assignment in Vanta.
663
+
664
+ ## Get help
665
+
666
+ For access to the Auditor API, credentials, or problems you can't solve with
667
+ this guide, contact your Vanta representative.