locklens
Allows auditing lockfiles of Gitee repositories by providing the repository URL.
Allows auditing lockfiles of GitHub repositories by providing the repository URL.
Allows auditing lockfiles of GitLab repositories, including private ones using Personal Access Tokens.
Allows auditing dependencies using a configurable npm registry (default https://registry.npmjs.org/).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@locklensaudit ./my-project for vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
locklens
locklens 是一个基于 audit-ci 的 lockfile 审计工具,支持三种运行模式:
CLI /
npxMCP Server(
stdio)Skill
它可以审计本地项目目录或远程 Git 仓库,并支持 npm、yarn、pnpm 的 lockfile。
特性
支持本地项目目录与远程 Git 仓库审计
支持公开仓库与私有仓库审计
支持
package-lock.json、yarn.lock、pnpm-lock.yaml仅基于仓库中已存在的 lockFile 进行审计,保证结果与真实依赖状态一致
支持中文、英文文本报告
支持显式切换为 JSON 输出
Related MCP server: audit-mcp-cli
环境要求
Node >=18(Optional) Yarn ^1.12.3 || Yarn >=2.4.0 && <4.0.0(Optional) PNPM >=4.3.0(Optional) Bun
结果示例
可以直接查看仓库内的示例输出:
中文文本报告示例:audit.md
英文文本报告示例:audit-en_US.md
JSON 输出示例:audit.json
安装与环境
本地仓库、线上仓库审计:
# 本地相对目录审计
npx -y locklens --source ./
# 本地绝对目录审计
npx -y locklens --source /path/to/project
# Github 远程仓库审计
npx -y locklens --source https://github.com/BARMPlus/micro-app > audit.md
# Gitlab 远程仓库审计
npx -y locklens --output-format json --source https://gitlab.com/gitlab-org/gitlab-vscode-extension.git > audit.json 私有仓库审计:
# 对于 GitHub、GitLab、Gitee 的 HTTPS 地址,locklens 会先尝试通过 ssh -T 判断本机 SSH Key 是否可用于该 Git 服务器;
# 如果可用,会自动切换为 SSH 方式执行。其他私有 Git 服务器仍建议直接依赖本机已有权限的 SSH Key。
npx -y locklens --source https://git.company.local/group/repo.git
# 适合 CI 场景,仅支持 私有部署的 GitLab 服务器应用审计,设置 Personal access tokens 权限访问该仓库
LOCKLENS_GITLAB_PRIVATE_TOKEN=your-token npx -y locklens --source https://git.company.local/group/repo.git CLI 使用方法
常见示例
输出英文文本报告:
npx -y locklens --source /path/to/project --output-format-language en输出 JSON:
npx -y locklens --source /path/to/project --output-format json指定阈值为高危:
npx -y locklens --source /path/to/project --threshold high跳过 devDependencies:
npx -y locklens --source /path/to/project --skip-devCLI 参数
参数 | 说明 |
| 必填。本地目录路径或远程 Git 仓库地址 |
| 漏洞过滤阈值,可选: |
| 自定义 npm registry,默认: |
| 跳过 dev dependencies |
| 审计执行重试次数 |
| 输出格式,可选: |
| 文本报告语言,可选: |
| 显示帮助 |
| 显示版本号 |
MCP 使用方法
locklens 支持通过 stdio 方式作为 MCP Server 接入,通过将以下配置添加到mcp服务器配置中。
Windows 平台:
{
"mcpServers": {
"locklens": {
"command": "cmd",
"args": ["/c", "npx", "--yes", "locklens"]
}
}
}其他平台:
{
"mcpServers": {
"locklens": {
"command": "npx",
"args": ["--yes", "locklens"]
}
}
}Tools
package_audit
审计指定项目目录或远程 Git 仓库的 lockfile,并返回统一格式的漏洞结果。
参数:
source必填。本地目录绝对路径,或远程 Git 仓库地址
threshold漏洞过滤阈值,可选:
low、moderate、high、critical;默认:low
registry自定义 npm registry 地址;默认:
https://registry.npmjs.org/
skipDev是否跳过 dev dependencies
retryCount审计执行重试次数
outputFormat输出格式,可选:
text、json;默认:text
outputFormatLanguage文本报告语言,可选:
zh、en;默认:zh
Skill
如果你的客户端支持 Skill,也可以直接使用 dependency-audit,不需要先接入 MCP。
当前仓库内的 Skill 目录位于:
dependency-audit/默认会带上 --skip-dev,优先只带出线上风险;如果你希望带出开发和线上所有依赖风险,可以明确说明取消 --skip-dev。
示例:
1. 使用 dependency-audit 审计当前项目的依赖问题
2. https://github.com/BARMPlus/micro-app 审计这个项目的依赖,告知我开发和线上所有的依赖问题
3. 输出 https://github.com/BARMPlus/micro-app 这个项目严重的依赖问题License
Copyright (c) 2026 chenglin
locklens is released under the MIT License
Available Tools
1 toolpackage_auditB
Audit a local project or remote Git repository lockfile and return normalized package vulnerability results.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Required. Local directory path or remote Git repository URL | |
| skipDev | No | Whether to skip dev dependencies during audit | |
| registry | No | Custom registry URL used during audit execution. Defaults to https://registry.npmjs.org/. | |
| threshold | No | Minimum threshold that controls the returned advisories list. Defaults to low. | |
| retryCount | No | Retry count passed to the audit executor | |
| outputFormat | No | Response format. Defaults to text. | |
| outputFormatLanguage | No | Text report language. Defaults to zh. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'audit' but does not state whether the tool modifies any files, requires authentication, or has side effects. The nature of the audit (read-only) is implied but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, well-formed sentence that conveys the core functionality without extraneous words. It is concise and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does not detail the structure of 'normalized package vulnerability results'. Also, the tool has several options (outputFormat, language, threshold) that affect the output, but the description does not summarize these nuances.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with descriptions for all 7 parameters. The description adds no extra meaning or context beyond what is in the schema, so baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('audit'), the resource ('lockfile from local project or remote Git repository'), and the output ('normalized package vulnerability results'). It is specific and leaves no ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives (no siblings provided). The description does not mention any preconditions, such as requiring a lockfile or network access.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.1.8- First observed
package_audit
TDQS
With only one tool, there is no possibility of ambiguity; the tool's purpose is clearly defined.
The single tool name uses a consistent verb_noun pattern (package_audit), so naming is perfectly consistent.
Having a single tool for lockfile auditing is borderline; it could be sufficient for a narrow scope but feels thin for a dedicated server.
The server offers only an audit operation, lacking obvious supporting tools such as listing supported formats or managing advisories, which may hinder agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Detect malicious or vulnerable npm packages: registry search, OSV.dev and GitHub advisory lookups
Query OSV.dev for package vulnerabilities and batch-audit dependency lists via MCP.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Related MCP Servers
- AlicenseBqualityFmaintenanceAudits npm package dependencies for security vulnerabilities, providing detailed reports and fix recommendations with MCP integration.16257MIT
- AlicenseAqualityDmaintenanceLightweight Node.js dependency vulnerability audit tool with CLI and MCP Server modes. Supports npm/pnpm, full dependency chain tracing, remote GitHub repo auditing, and generates Markdown/HTML reports.1201MIT
- AlicenseAqualityBmaintenanceAn MCP server that scans your lockfiles (npm, PyPI, Go, Rust, Ruby, PHP) for known vulnerabilities, enriches with EPSS exploit probability scores, and recommends fix versions. $14/mo — not per-seat.91MIT
- AlicenseAqualityCmaintenanceMCP server that audits npm dependencies against the live registry, providing per-dependency reports on versions behind, deprecation, and license.217MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BARMPlus/locklens'
If you have feedback or need assistance with the MCP directory API, please join our Discord server