Skip to main content
The Vidoc Model Context Protocol (MCP) server lets a coding agent read security findings and pull request results. The agent can get a fix prompt and change the status of an issue. The server reads the scan results stored in Vidoc. To start a scan, use the CLI, the REST API, or the web app.

How it works

Your MCP client connects to the Vidoc API at /mcp with Streamable HTTP. It sends a user API key in the Authorization: Bearer <key> header. The server checks your project access and role on each request.
  • Each connection has access to one project: the project of the key. For another project, create another key and add a server with a different name.
  • The server lists only the tools that your role permits.
  • Findings include validated true positives. False positives and findings that still need validation do not appear. Experiment pull requests do not appear.
  • The agent changes files in your local repository through its editor. The MCP server can change only the status of an issue in Vidoc.

Set up the connection

1. Create a user API key

  1. Open app.vidoc.dev or your custom deployment URL.
  2. Select the project that has the repositories you want to read.
  3. Open Project switcher > API keys and select Create new key.
  4. Enter a name, such as MCP local development, and select an expiry.
  5. Create and copy the key. Refer to API Keys for key management.
MCP accepts only keys that belong to a user. System, GitHub, and legacy tokens get 403 MCP accepts user tokens only. A read_only member cannot create a key. The roles developer, security_engineer, and admin can create keys and change issue status.
The default expiry is 1 month. For a connection that you use over a longer period, select 6 months or 1 year and plan to replace the key before it expires. The whoami tool reports the expiry date.
Set the key in the environment of your MCP client:

2. Select the API URL

Set VIDOC_API_URL without a trailing slash or /v1. Use the API address, not the web app address.
The MCP URL is ${VIDOC_API_URL}/mcp. It does not include /v1.
Self-hosted: your operators must enable MCP on the API with MCP_ENABLED=true. The flag is off by default. If it is off, POST /mcp returns 404. Ask your operators to check the flag and the route in the supplied release runbook.

3. Configure your client

For one local connection, run this command from your repository:
This command stores the key in your local Claude Code configuration. To share the configuration with your team, use environment variables in .mcp.json at the root of the repository instead:
Start Claude Code from the shell where you exported both variables. Run /mcp in Claude Code to check the connection. Approve the project server when Claude Code asks.Refer to the Claude Code MCP documentation for client configuration.
Keep the key out of shared configuration files. The Claude Code and Cursor JSON examples contain variable references, so you can commit them without the key.

4. Check the connection

Ask your agent:
The result reports the user, organization, project, role, and key expiry. Check the project before you ask the agent to read or change an issue.

5. Read or fix an issue

Open the repository in your client and ask:
The agent uses these steps:
  1. Call whoami to check the project.
  2. Call list_codebases. Match the local Git remote with the scmRepoSlug or url of a repository and get its codebaseId.
  3. Call list_issues with that codebaseId. The list has the most severe issues first.
  4. Call get_issue for the finding details or get_fix_prompt for a fix prompt.
  5. Change the local code and check the fix. Then call update_issue_status with closed.
For a pull request, ask:
The agent gets the codebaseId with list_codebases, then calls get_pull_request_issues with pullRequest: "#412". If you do not know the number, ask it to search with list_pull_requests first.

Available tools

The read tools need issue:view. The status tool needs issue:update_status and is hidden from a read_only connection.

Filters and result fields

  • list_issues uses the default branch when you omit branch. Without codebaseId, it reads the default branches of all project repositories.
  • The issue lists default to status: "open". They also accept ignored, fixed, closed, and all. The closed filter includes findings that a scan marked fixed.
  • list_issues, list_pull_requests, and get_pull_request_issues return 20 rows by default and at most 50 rows. Use nextOffset as the next offset until it is null.
  • list_codebases and list_branches return all their rows.
  • hiddenByPolicy reports findings hidden by the triage policy, such as duplicates or deferred findings. Pass codebaseId to get the triaged list of one repository. In a project with more than 50 triaged branches, a list without codebaseId returns the raw list.
  • The tool fields line, rangeStart, and rangeEnd count from zero. Add 1 for editor line numbers. Line numbers inside a fix prompt already count from 1.
  • If snippetTruncated is true, get_issue cut the source snippet. Read the local file for more context.

Status changes

update_issue_status records your user as the author of the change. It can change only a finding that the connection can read. Use closed after you fix the code. The tool does not accept fixed: a scan sets that status when it confirms that the finding is gone. To ignore a finding, provide a reason of at least 5 characters. The reason starts a learning that affects how later scans judge similar code. The tool tells the agent to get your approval before it ignores a finding. If the learning cannot start, the tool can report an error after the status has changed. Read the issue again before you retry an ignored status change.

Troubleshooting

API Keys

Create and replace user API keys.

Findings

Read and manage findings in the web app.

API Authentication

Configure REST API access.

CLI Scanning

Scan code from your terminal.