Endor Labs MCP server in Augment Code
The Endor Labs MCP server helps developers and AI agents in the following ways:
- Provide guardrails for agents before code review: Reduce the number of known vulnerabilities entering your code and save developers time by checking AI agent suggestions in real time. Integrate security before an issue is discovered in CI or in production.
- Improve the speed of remediating security risks: Agents use vulnerability context from Endor Labs to help implement secure changes, from writing more secure code to upgrading dependencies.
The Endor Labs MCP server integrates directly into Augment Code to scan your code as you write, catching security issues before they reach production.
The following sections walk you through setting up the Endor Labs MCP server:
- Tools in the Endor Labs MCP server
- Prerequisites for Endor Labs MCP server
- Choose your edition
- Developer Edition
- Enterprise Edition
- Manage MCP server tools
- Troubleshooting
Tools in the Endor Labs MCP server
The Endor Labs MCP server provides the following tools:
check_dependency_for_vulnerabilities: Check if a dependency in your project is vulnerable.check_dependency_for_risks: Check a dependency for security risks including vulnerabilities and malware.get_endor_vulnerability: Get the details of a specific vulnerability from the Endor Labs vulnerability database.get_resource: Retrieve additional context from commonly used Endor Labs resources about your software, such as findings, vulnerabilities, and projects.scan: Run an Endor Labs security scan to detect risks in your open source dependencies, find common security issues, and spot any credentials accidentally exposed in your Git repository.security_review: Perform security review analysis on code diffs. Analyzes local uncommitted changes (both staged and unstaged) compared to HEAD, or diffs between the main branch and the last commit. Requires the Enterprise Edition. You must specify your namespace in the MCP server configuration. You must also enable AI security code review for your namespace in the Endor Labs platform. See AI security code review for setup instructions.
After you set up the MCP server, you can choose to disable the tools that you do not want to use.
Prerequisites for Endor Labs MCP server
Ensure that the following prerequisites are met:
- Augment Code extension installed in Visual Studio Code
- Node.js version 18 or later (required if you don’t have
endorctlinstalled) - Windows users: See Prerequisites for Endor Labs MCP server on Windows for additional instructions
Choose your edition
The Endor Labs MCP server has two editions:
- Developer Edition: A free edition that requires no configuration. A browser window opens on first use for authentication via GitHub, GitLab, or Google. The Developer Edition provides access to default security policies from Endor Labs.
- Enterprise Edition: A paid edition that enforces your organization’s specific security policies. Authenticate using GitHub, GitLab, Google, or SSO. You must specify your namespace to access your organization’s policies.
Additionally, if you already have Endor Labs configured locally (for example, from a previous endorctl init command), the MCP server can use your pre-existing configuration.
Developer Edition
The Endor Labs MCP server works out of the box with the Developer Edition. When you use the MCP server for the first time, a browser window opens, and you can authenticate with GitHub, GitLab, or Google. After authentication, the MCP server provides access to the free Developer Edition with the default security policies.
Developer Edition: Import from JSON
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon in the upper right of the Augment panel.
-
In the MCP section, click Import from JSON.
-
Paste the following configuration and click Save.
{ "mcpServers": { "endor-cli-tools": { "command": "npx", "args": [ "-y", "endorctl", "ai-tools", "mcp-server" ] } } }If you already have a local Endor Labs configuration from a previous
endorctl init, use the following configuration instead to reuse your existing credentials:{ "mcpServers": { "endor-cli-tools": { "command": "npx", "args": [ "-y", "endorctl", "ai-tools", "mcp-server" ], "env": { "ENDOR_TOKEN": "automatic" } } } }
Developer Edition: Use the settings panel
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon in the upper right of the Augment panel.
-
In the MCP section, click + to add a new MCP server.
-
Fill in the following fields:
- Name:
endor-cli-tools - Command:
npx -y endorctl ai-tools mcp-server
- Name:
endorctl init, add ENDOR_TOKEN: automatic in the Environment variables section. The MCP server reuses your existing configuration without requiring additional setup.
- Click Save to add the server.
Developer Edition: Verify the installation
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon and confirm that endor-cli-tools appears in the MCP section.
Try a test prompt
After installing the MCP server, try the following prompt in your AI chat or CLI to verify that the tools are working.
Check if the npm package lodash version 4.17.20 has any vulnerabilities
The MCP server uses the check_dependency_for_vulnerabilities tool to check for known vulnerabilities and return the results. If you see a response with vulnerability details, the MCP server is working correctly.
Enterprise Edition
For Enterprise Edition, you need your organization’s Endor Labs namespace and an authentication method. Ensure that your developers have Read-Only permissions to Endor Labs. See Authorization policies for more details.
Enterprise Edition: Import from JSON
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon in the upper right of the Augment panel.
-
In the MCP section, click Import from JSON.
endorctl init, use a minimal config with only "ENDOR_TOKEN": "automatic" in the env section. Do not add ENDOR_NAMESPACE or ENDOR_MCP_SERVER_AUTH_MODE—that causes conflicts. The MCP server reuses your existing configuration.
-
Paste the following configuration and click Save.
{ "mcpServers": { "endor-cli-tools": { "command": "npx", "args": [ "-y", "endorctl", "ai-tools", "mcp-server" ], "env": { "ENDOR_NAMESPACE": "<namespace>", "ENDOR_MCP_SERVER_AUTH_MODE": "<google|github|gitlab|sso>", "ENDOR_TOKEN": "automatic" } } } }Replace
<namespace>with your Endor Labs namespace and choose your authentication mode. If you choosesso, you must also addENDOR_MCP_SERVER_AUTH_TENANTto theenvsection.
Enterprise Edition: Use the settings panel
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon in the upper right of the Augment panel.
-
In the MCP section, click + to add a new MCP server.
-
Fill in the following fields:
- Name:
endor-cli-tools - Command:
npx -y endorctl ai-tools mcp-server
- Name:
-
In the Environment variables section, add:
ENDOR_NAMESPACE: Your Endor Labs namespaceENDOR_MCP_SERVER_AUTH_MODE: Your authentication mode (google,github,gitlab, orsso)ENDOR_TOKEN:automatic
endorctl init, add only ENDOR_TOKEN: automatic. Do not add ENDOR_NAMESPACE or ENDOR_MCP_SERVER_AUTH_MODE—that causes conflicts. The MCP server reuses your existing configuration.
-
If you chose
ssoas the authentication mode, also add:ENDOR_MCP_SERVER_AUTH_TENANT: Your tenant name
-
Click Save to add the server.
The following parameters are used to configure the MCP server. All parameters are optional. If no parameters are provided, the MCP server defaults to the Developer Edition with browser authentication.
ENDOR_MCP_SERVER_AUTH_MODE: (Optional) The authentication mode to use for the MCP server. You can use the following authentication modes:github,gitlab,google,sso. If you choosesso, you must addENDOR_MCP_SERVER_AUTH_TENANTas an additional parameter. If not specified, the MCP server defaults to browser authentication for the Developer Edition.ENDOR_NAMESPACE: (Optional) The namespace to use for the MCP server. Required for Enterprise Edition to access your organization’s specific policies. Not needed for Developer Edition.ENDOR_TOKEN: (Optional) Set toautomaticto reuse an existing localendorctlconfiguration. When set toautomatic, the MCP server skips browser authentication and uses your stored credentials. Do not set this to any other value; the MCP server manages the token internally during authentication.ENDOR_MCP_SERVER_AUTH_TENANT: (Optional) The tenant name for SSO authentication. Required whenENDOR_MCP_SERVER_AUTH_MODEis set tossofor Enterprise Edition access.
Enterprise Edition: Verify the installation
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon and confirm that endor-cli-tools appears in the MCP section.
Try a test prompt
After installing the MCP server, try the following prompt in your AI chat or CLI to verify that the tools are working.
Check if the npm package lodash version 4.17.20 has any vulnerabilities
The MCP server uses the check_dependency_for_vulnerabilities tool to check for known vulnerabilities and return the results. If you see a response with vulnerability details, the MCP server is working correctly.
Manage MCP server tools
-
Open the Augment Code extension in Visual Studio Code.
-
Click the Settings icon in the upper right of the Augment panel.
-
In the MCP section, click the … button next to endor-cli-tools.
-
Edit the configuration or remove the server as needed.
Watch how to use Endor Labs with Augment Code
Troubleshooting
Use the following troubleshooting steps to resolve common issues with the Endor Labs MCP server.
MCP server shows as disconnected or errored
- Verify Node.js and npx are available: run
npx --versionin your terminal. If the command fails, install Node.js version 18 or later. - Restart your IDE or CLI to reload the MCP server configuration.
- Check your config for syntax errors. Use a JSON or TOML validator, or switch to the configuration tool or CLI command instead of manual editing.
Authentication browser window does not open
- Ensure your IDE or CLI can open a browser. Check firewall or security software that might block browser launch.
- For Enterprise Edition, confirm
ENDOR_MCP_SERVER_AUTH_MODEis set correctly (google,github,gitlab, orsso). For SSO, ensureENDOR_MCP_SERVER_AUTH_TENANTis provided.
endorctl download times out
If npx -y endorctl hangs or times out (for example, behind a corporate proxy or firewall), install endorctl globally and update your MCP config to use it. For more information, see Install endorctl.
After installing endorctl, update your MCP config to call endorctl directly instead of npx.
Replace the command and args entries with:
"command": "endorctl",
"args": ["ai-tools", "mcp-server"]
Alternatively, configure your proxy settings for npm.
Tools return errors when invoked
- If you are using the Enterprise Edition, verify whether your namespace is correct and that your user has
Read-Onlypermissions. See Authorization policies for details. - Ensure endorctl is on your PATH if you installed it globally instead of using npx.
- Check that the working directory or project path is valid when invoking tools.
Config file has a syntax error and the IDE gives no useful message
.cursor/mcp.json, .vscode/mcp.json, .mcp.json, or .codex/config.toml) with a JSON or TOML linter. Alternatively, use the configuration tool or CLI command for your platform instead of editing the file manually.
Prerequisites for Endor Labs MCP server on Windows
On Windows, ensure the following prerequisites are met:
Install Node.js
If Node.js is not installed, download and install the LTS version from nodejs.org. During installation, ensure the option to add Node.js to PATH is selected.
Configure the PATH environment variable
After installing Node.js, verify that the npm global bin directory is in your PATH:
-
Run the following command in the command line.
npm config get prefixThis returns the npm global directory path, typically
C:\Users\<YourUsername>\AppData\Roaming\npm. -
Add the npm global directory path to the Path variable under User variables in your system’s environment variables settings.
-
Restart for the PATH changes to take effect.
Verify the setup
Run the following command in your terminal.
npx --version
If this returns a version number, your Windows setup is complete and the MCP server can use npx to run endorctl.
Feedback
Was this page helpful?
Thanks for the feedback. Write to us at support@endor.ai to tell us more.
Thanks for the feedback. Write to us at support@endor.ai to tell us more.