npx or a system-installed endorctl and communicates with it over stdio. When the AI agent needs security context, the server calls the Endor Labs cloud platform and returns the results. The server uses the stdio transport only, so configure it with a command and args entry rather than an HTTP (type: http) URL.
What you can do
With the Endor Labs MCP server, you can:- Check dependency safety before adding a new package, with separate vulnerability and malware results
- Scan for vulnerabilities and malware in your open source dependencies, including Conan and segment-matched C/C++ projects
- Find leaked secrets in your working tree, branch diff, or Git history
- Run SAST and AI SAST scans on your full repository or changed files with the
scantool - Inspect schemas and fetch resources using
describe_resource_schemaandget_resourcewith field projections - Run AI security reviews on your code changes (Enterprise Edition)
scan tool runs in quick-scan summary mode without function-level reachability analysis. For full reachability and admission policy enforcement, run a full Endor Labs scan or use the Endor Labs platform.
Node.js: 18 or later required, 24 LTS recommendedThe Endor Labs MCP server runs This is a Node.js runtime notice, not an error from
endorctl through npx, which requires Node.js 18 or later. npm is included with Node.js, so no separate npm installation or version is required. On Node.js versions older than 24, you may see a harmless warning printed before scan output.endorctl or the MCP server, and it does not affect scan results. To silence it, upgrade Node.js to 24 LTS or later, then restart your IDE or CLI. Verify with node --version.Install the MCP server
OpenCode reads MCP server definitions from anopencode.json (or opencode.jsonc) configuration file. Add the file to your project root to scope the server to that project, or to ~/.config/opencode/opencode.json to make it available across all projects.
Verify the installation
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_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.
The following video shows the Endor Labs MCP server in action.
Manage MCP server tools
Useopencode mcp list to view your configured servers and their connection status. To temporarily disable the Endor Labs MCP server without removing it from your configuration, set "enabled": false on its entry in opencode.json.
To disable specific tools instead of the entire server, add a tools key to opencode.json. Tool names are prefixed with the server name.
How to use the Endor Labs MCP server
The Endor Labs MCP server provides the following tools:check_dependency_for_vulnerabilities: Check if a dependency version in your project (python,java,go,npm, ormaven) has known vulnerabilities.check_dependency_for_risks: Check a dependency version for security risks. Returns confirmed vulnerability IDs (vulnerability_ids) and malware IDs (malware_ids) separately, excluding disputed or withdrawn CVEs and contested malware records.get_endor_vulnerability: Get the details of a specific vulnerability (CVEorGHSAID) from the Endor Labs vulnerability database.describe_resource_schema: Inspect the validsnake_casefield paths for a supported resource type (Project,PackageVersion,Vulnerability,Finding,Metric,ScanRequest,ScanResult, orPolicy), optionally scoped withpath_prefixandmax_depth. Use these paths to request a subset of fields withget_resource.get_resource: Retrieve an Endor Labs resource (Project,PackageVersion,Vulnerability,Finding,Metric,ScanRequest,ScanResult, orPolicy) byuuidor exactname. Accepts an optionalfieldslist of field mask paths to return only the requested fields and avoid timeouts on large resources, and an optionalnamespaceoverride.scan: Run an Endor Labs security scan (vulnerabilities,dependencies,secrets,sast,ai-sast, orghactions). Requires an absolute repositorypathand rejects relative paths. Supports the following options:namespace: Override the server’s configured namespace for a single scan call.scan_options.summary: Returns severity counts and the top five findings by default (true). Setscan_options.summarytofalseto return the full list of findings.scan_options.diff_scope: Limitsast,ai-sast,secrets, orvulnerabilitiesscans to uncommitted local changes (local) or changes relative to the default branch (baseline). Cannot be combined withpr_incremental,pr_baseline,include_path, orexclude_path.scan_options.languages: Limit dependency scanning to specific languages. Passing"c"selects Conan C/C++ dependency scanning only.scan_options.segment_match_languages: Run source-level segment matching, such as["c"]for C/C++ projects that don’t use Conan.
security_review: Perform security review analysis on code diffs (local_changesormain_vs_last_commit). The tool sets the--diff-scopescan option automatically based on the review type, and accepts an optionalnamespaceoverride. Requires the Enterprise Edition and AI security code review enabled for your namespace. See AI security code review for setup instructions.
Configure AGENTS.md
To enhance the MCP server integration, you can add instructions inAGENTS.md at the root of your repository. OpenCode reads AGENTS.md files to guide AI development with your project-specific instructions.
- Navigate to the root of your repository.
-
Create or edit the
AGENTS.mdfile in the root of your repository. - Add appropriate rules for your project. For example, you can add a rule to check if the code is free from vulnerabilities.
Example AGENTS.md instructions
You can use the followingAGENTS.md instructions as a quick start for the Endor Labs MCP server. Modify the instructions to meet your specific organization’s needs. For more information, refer to the OpenCode rules documentation.
- SCA Rule Example
- Secrets Rule Example
- SAST Rule Example
Keep endorctl up to date
The default configuration runsnpx -y endorctl, which downloads the latest published endorctl into the npx cache (~/.npm/_npx/) and reuses it on later runs. If you are not getting the latest version, do one of the following:
- Clear the npx cache (
~/.npm/_npx/), then restart your IDE or CLI so the next run downloads the current endorctl. - Pin a specific version by changing
endorctltoendorctl@<version>in yourargs. - Install endorctl yourself and call it directly, with
commandset toendorctlandargsset to["ai-tools", "mcp-server"]. Updates are then managed by your package manager, for examplebrew upgrade endorctl. See Install endorctl.
Troubleshooting
Use the following troubleshooting steps to resolve common issues with the Endor Labs MCP server.MCP server shows disconnected
MCP server shows disconnected
Run
npx --version in your terminal. If the command fails, install Node.js version 18 or later (Node.js 24 LTS recommended). After installing, restart your IDE or CLI to reload the MCP server configuration.Browser auth window does not open
Browser auth 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 with SSO, verify that
ENDOR_MCP_SERVER_AUTH_MODE and ENDOR_MCP_SERVER_AUTH_TENANT are set correctly in your MCP configuration.npx times out behind a corporate proxy
npx times out behind a corporate proxy
Install endorctl using your preferred method and configure the MCP server to call it directly instead of using npx. In the Enterprise Edition install wizard, select No under Using npx? to generate the correct configuration. Alternatively, replace the For installation options, see Install endorctl. For more details on how npx and a system-installed endorctl differ, see the FAQ entry below.
command and args entries in your MCP configuration manually, using your client’s configuration format.Understanding npx vs. a system-installed endorctl
Understanding npx vs. a system-installed endorctl
The default MCP server configuration uses With this approach, updates are managed by your existing package manager (for example,
npx -y endorctl to run endorctl. This command downloads endorctl from the npm registry into a temporary cache (~/.npm/_npx/) and runs it from there. It does not install endorctl globally and does not interact with any existing endorctl binary on your system.If you have endorctl installed separately (for example, through Homebrew or a direct download), the npx command runs its own copy and ignores the system-installed version. These two copies are completely independent.To use your existing endorctl installation instead of npx, select No under Using npx? in the Enterprise Edition install wizard. This generates a configuration that calls endorctl directly, in your client’s configuration format.brew upgrade endorctl).Tools return errors (Enterprise)
Tools return errors (Enterprise)
Verify your namespace is correct and your user has
Read-Only permissions in Endor Labs. See Authorization policies for details. Also ensure endorctl is on your PATH if you installed it globally instead of using npx.MCP server fails to start on Windows
MCP server fails to start on Windows
On Windows, ensure the following prerequisites are met:If this returns a version number, your Windows setup is complete and the MCP server can use
- Node.js is installed
- npm global bin directory is in your PATH
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.
This 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 to run endorctl.