Use the MCP server¶
JAVV has an MCP server for AI agents. An agent can read the findings of JAVV for you, and with a
token of a higher level it can also triage them. The agent connects to the MCP endpoint of JAVV,
/api/v1/mcp, with an MCP token. This page tells how to turn on the endpoint, how to make a
token, and how to connect Codex, VS Code or Cursor.
For AI agents
Obey these rules when you call the tools of JAVV:
- Call
list_clustersfirst. Most other tools need acluster_idfrom its answer. - A finding is one CVE in one package version for one scanner. The results of Trivy and Grype stay apart. Do not add them together, and do not merge them.
- To get the next page of
search_findingsoraudit_log, sendnext_cursorback ascursor. - An answer with a
cutfield does not have all the rows. Ask for fewer rows. When a tool error tells you to ask for a smaller size, send a smallersize. - Each write tool has the hint
destructiveHint. Ask the user before each write. - When a tool error has the words "the tool made the change", do not call the tool again.
- A tool error with
403tells you that the level of the token does not allow the tool. Tell the user that the token needs a higher level.
Before you start¶
- You need the address where you open JAVV, for example
https://javv.example.com. The URL of the endpoint is this address with/api/v1/mcpafter it. - To turn on the endpoint, you change a setting of the JAVV backend.
- To make a token, your role must allow you to manage tokens. Of the default roles, only
adminallows it. - The agent sends the token in each request. Use
httpsin front of JAVV. Over plainhttp, each system on the network path can read the token (http or https).
Turn on the endpoint¶
The endpoint is off by default. When it is off, a request to it gets 404.
With docker compose:
-
Add this line to
.env, in the folder ofcompose.yaml:JAVV_MCP_ENABLED=true -
Run
docker compose up -d. Compose starts the backend again with the new value.
With Helm:
-
Add the setting to your values file for the
javvchart:backend: config: JAVV_MCP_ENABLED: "true" -
Set
VERSIONto the version of JAVV that you run now, and upgrade the release:helm upgrade javv oci://ghcr.io/danube-labs/charts/javv --version "$VERSION" \ -f my-javv-values.yamlThe chart starts the backend again with the new value.
To see the result, open Settings › AI agents (MCP) in JAVV. The Endpoint card shows on and the URL of the endpoint.
Make a token¶
- Open Settings › AI agents (MCP), and select Make token.
- Type a name. The name has 3 to 64 lower-case letters, digits, dots, underscores or hyphens.
The Audit log names the agent
mcp:and this name, for examplemcp:weekly-report. - Select the level of the token. The table in The levels of a token tells what each level can do.
- Select the expiry. It is a day from tomorrow to 90 days from today. The token stops at 00:00 UTC on that day.
- Select Make token. JAVV shows the token one time only. Copy it, and keep it in a safe place, for example a password manager.
To stop a token, select Revoke on its row. To get a new token for the same name, select Rotate and pick a new expiry. The old token then stops at once.
Connect Codex¶
We tested these settings with Codex 0.144.1.
-
Add the server to
~/.codex/config.toml:[mcp_servers.javv] url = "https://javv.example.com/api/v1/mcp" bearer_token_env_var = "JAVV_MCP_TOKEN" -
Put the token in the variable
JAVV_MCP_TOKEN, in the shell that starts Codex. - Run
codex mcp list. The list showsjavvwith the auth "Bearer token".
Connect VS Code¶
We did not test this client with JAVV. Its settings come from its own documentation.
-
Add the server to
.vscode/mcp.jsonin your workspace. VS Code asks for the token when the server starts for the first time, and it hides what you type:{ "inputs": [ { "type": "promptString", "id": "javv-token", "description": "JAVV MCP token", "password": true } ], "servers": { "javv": { "type": "http", "url": "https://javv.example.com/api/v1/mcp", "headers": { "Authorization": "Bearer ${input:javv-token}" } } } }
Connect Cursor¶
We did not test this client with JAVV. Its settings come from its own documentation.
-
Add the server to
~/.cursor/mcp.json, or to.cursor/mcp.jsonin your project:{ "mcpServers": { "javv": { "url": "https://javv.example.com/api/v1/mcp", "headers": { "Authorization": "Bearer ${env:JAVV_MCP_TOKEN}" } } } } -
Put the token in the variable
JAVV_MCP_TOKENbefore you start Cursor.
The levels of a token¶
| Level | What the agent can do |
|---|---|
| Read | Read the data of all clusters. It changes nothing. |
| Write | Read. Also set the state, the assignee and the note of findings, also in bulk. Make, change and revoke "Not affected" decisions. |
| Write and risk accept | Write. Also accept a risk, and change or revoke a risk acceptance. |
No token can change users, roles, settings or tokens. No token can delete data. A change by an agent gets the same checks as the same change on a screen. For example, a Write token cannot change the state of a finding with an accepted risk.
An agent in the Audit log¶
- A change by an agent writes the same rows as the same change on a screen, with the user
mcp:<name>. - Each tool call writes one row with the action MCP tool call. Only a user who can manage users sees these rows.
- Settings › AI agents (MCP) shows who made each token, and when an agent last used it.
If the agent cannot connect¶
| What the agent gets | Cause | What to do |
|---|---|---|
| 404 | The endpoint is off. | Turn on the endpoint. |
401 invalid token |
The token is wrong, revoked or expired. A scanner token also gets 401. | Make a token, or rotate the token. |
| 403 | The request has an Origin header. A browser sends this header, so a web page cannot use the endpoint. |
Use an agent client. |
| 429 | The token sent more requests in one minute than JAVV_MCP_RATE_LIMIT_PER_MINUTE allows (60 by default). |
Wait one minute. |
| A tool error: the level of this token does not allow this tool | The tool needs a higher level. | Make a token with a higher level. |
An answer with a cut field |
The answer was longer than JAVV_MCP_MAX_ANSWER_CHARS (50,000 characters by default). JAVV kept the first rows, and cut gives the number. |
Ask for fewer rows. |
| A tool error: ask for a smaller size | A page of rows with a next page was longer than JAVV_MCP_MAX_ANSWER_CHARS. |
Ask for a smaller page. |
The settings of the endpoint are in MCP endpoint. The tools of each level are in The MCP endpoint.