Skip to content

Connect VS Code

Add the Sentrasec MCP server to VS Code so the editor agent can scan and explain findings.

Install the CLI

The MCP server ships inside the sentrasec binary. Skip this if sentrasec --version already works.

macOS / Linux (Terminal)
$ curl -fsSL https://cli.sentrasec.ai/install.sh | bash
Windows (PowerShell)
$ irm https://cli.sentrasec.ai/install.ps1 | iex

On Windows, open a new terminal afterwards. More options are in the CLI installation guide.

Add the server

Create .vscode/mcp.json in your workspace and add the sentrasec server:

.vscode/mcp.json
{  "servers": {    "sentrasec": {      "command": "sentrasec",      "args": ["mcp", "serve"],      "env": {        "SENTRASEC_APP_ID": "app_...",        "SENTRASEC_APP_KEY": "sk_prod_..."      }    }  }}

Replace sk_prod_... with your API key. See Authentication for how to create one.

If VS Code reports that it cannot start sentrasec, it is not seeing your shell's PATH. Run sentrasec mcp config and use the full path it prints as command, for example /Users/you/.local/bin/sentrasec on macOS or C:\\Users\\you\\AppData\\Local\\Sentrasec\\bin\\sentrasec.exe on Windows (backslashes doubled inside JSON).

Use it

Reload the window so VS Code picks up the server. Then ask the agent something like:

Check this repository for security issues and explain anything critical.

See the tools reference for everything the agent can call.