Skip to main content
Glama
Cyber Lens AI MCP Server

Cyber Lens AI MCP Server

by shadoprizm

Cyber Lens AI MCP Server

面向 AI 助手和智能体编码工作流的安全扫描。

MCP Open CLAW License: MIT Node.js

一个 Model Context Protocol (MCP) 服务器,让 AI 助手能够扫描网站、公共仓库和 Open CLAW 技能,以发现安全漏洞。它专为智能体编码时代而构建,原生支持在安装技能包之前对其进行扫描。


它能做什么

当连接到 AI 助手(Claude Desktop、VS Code 等)时,此 MCP 服务器会添加安全扫描工具,供助手在您的对话中使用:

  • 在安装前扫描 CLAW 技能包 -- 服务器会下载技能包、解压并分析实际源代码,查找危险模式、硬编码密钥和权限问题

  • 扫描网站 -- 无需账户即可使用本地快速模式,或在已连接时使用完整云扫描

  • 扫描公共仓库,查找泄露的密钥、依赖项漏洞、可疑代码模式和信任态势问题

  • 在开始批量扫描之前,检查剩余的云扫描配额

  • 获取修复指导,其中包含分步修复说明和代码示例

示例对话

You:    "I want to install this skill: https://clawhub.ai/skills/ontology"

Claude: I'll scan it for security issues first.

        [PASS] CLAW Skill Security Scan: ontology v1.0.4

        Security Score: 95/100
        Files Analyzed: 5

        Skill appears safe to install. Minor issues noted below.

        1. [MEDIUM] File write operation
           File: scripts/ontology.py:399
           Fix: Ensure file writes are limited to expected directories.

        The skill looks safe. It writes to the filesystem for its knowledge
        graph storage, which is expected behaviour for this type of skill.

Related MCP server: securityscan

开始使用

1. 安装

在首次 npm 发布之后,推荐的安装路径如下:

npx -y @shadoprizm/cyberlens-mcp-server

在此之前,或用于本地开发和手动构建时:

git clone https://github.com/shadoprizm/cyberlens-mcp-server.git
cd cyberlens-mcp-server
npm install
npm run build

2. 添加到您的 AI 助手

Claude Desktop -- 添加到 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):

{
  "mcpServers": {
    "cyberlens": {
      "command": "npx",
      "args": ["-y", "@shadoprizm/cyberlens-mcp-server"]
    }
  }
}

如果您是从源代码检出(而非 npm)运行:

{
  "mcpServers": {
    "cyberlens": {
      "command": "node",
      "args": ["/absolute/path/to/cyberlens-mcp-server/dist/index.js"]
    }
  }
}

Claude Code -- 添加到您的 MCP 设置或项目配置中。

VS Code (Copilot/Continue) -- 根据您扩展的 MCP 服务器设置进行配置。

3. 连接您的账户

网站工具在本地快速模式下无需账户即可立即使用。该本地模式涵盖约 15 项核心检查,并会立即返回结果。

关联账户后,网站扫描将升级为完整的 CyberLens 云路径,包含 70+ 项检查、扫描历史和 AI 分析。仓库扫描和仅账户工具在需要时仍通过浏览器流程连接。

当仓库扫描或仅账户工具需要账户时,MCP 服务器会:

  1. 自动打开 CyberLens 浏览器流程

  2. 将用户引导至 cyberlensai.com 进行注册或登录

  3. 在本地接收安全回调

  4. 将 API 密钥保存到 ~/.cyberlens/mcp/config.json

  5. 自动继续原始工具调用

您也可以显式触发相同的流程:

You: "Connect my CyberLens account"

这会在您的浏览器中打开 cyberlensai.com,您可以在其中注册(免费)或登录。您的 API 密钥会保存在本地 ~/.cyberlens/mcp/config.json 中,并用于所有未来的扫描。

免费账户每月包含 5 次扫描。无需信用卡。

您也可以在 MCP 配置中设置 CYBERLENS_API_KEY 环境变量,而不使用浏览器流程。

如果云网站扫描达到每月配额,MCP 服务器会自动打开 CyberLens 定价页面,并回退到本地快速扫描,而不是直接失败。仓库扫描仍然需要云配额。


可用工具

账户

工具

描述

需要 API 密钥

connect_account

打开浏览器进行注册/登录,并在本地保存您的 API 密钥

否

get_account_quota

显示当前套餐及剩余的网站/仓库扫描配额;首次使用时如需要会自动连接

是

CLAW 技能扫描

工具

描述

需要 API 密钥

scan_claw_skill

下载并分析来自 CLAW Hub 或直接链接的技能包以发现安全问题

否

validate_claw_skill

根据安全最佳实践验证技能清单

否

网站与仓库扫描

工具

描述

需要 API 密钥

scan_website

无需账户即可进行本地快速网站扫描;已连接时进行完整云扫描;如果网站云配额耗尽则使用本地回退

本地不需要,完整云需要

scan_repository

对 GitHub、GitLab、Bitbucket 及受支持的 ZIP 目标进行公共仓库安全扫描;首次使用时如需要会自动连接

是

get_scan_results

从已完成的云扫描中检索详细发现;首次使用时如需要会自动连接

是

get_security_score

无需账户即可获得本地快速网站评分;已连接时获得完整云评分

本地不需要,完整云需要

情报与指导

工具

描述

需要 API 密钥

get_remediation_guide

针对常见 CWE 和漏洞类别的内置本地修复手册

否

get_scan_transparency

关于 MCP 服务器本地检查和实时云端点的如实报告

否


技能扫描的工作原理

当您提供 CLAW 技能 URL 时,MCP 服务器会:

  1. 解析 URL -- 接受 Claw Hub 页面(https://clawhub.ai/skills/skill-name)、直接下载链接(https://*.convex.site/api/v1/download?slug=name)或任何指向技能 zip 包的 URL

  2. 下载技能包到临时目录

  3. 解压并分析包中的每个文件:

    • 检查 _meta.json 和 SKILL.md 的完整性

    • 扫描所有源代码(Python、JavaScript、TypeScript、shell 脚本、配置文件)以查找危险模式

    • 检测硬编码密钥、eval() 使用、shell 命令执行、不安全的 HTTP 请求、文件删除操作、pickle 反序列化等

    • 识别未锁定版本的依赖项

    • 列出该技能通信时使用的所有外部 URL

  4. 返回安全评分(0-100),并附有详细发现、文件位置和修复建议

  5. 清理所有临时文件

整个过程在本地运行 -- 无需 API 密钥,您的代码绝不会发送到外部服务器。

网站扫描模式

scan_website 和 get_security_score 现在有两种透明的模式:

  • 本地快速扫描 -- 无需账户即可运行,立即返回结果,涵盖约 15 项核心网站检查,如 HTTPS、安全标头、服务器信息泄露、不安全表单和内联脚本指示器

  • 完整云扫描 -- 需要关联 CyberLens 账户,运行 70+ 项检查,保留云扫描历史,并包含更丰富的分析

如果用户在没有账户的情况下请求 full 或 database 网站扫描,MCP 服务器仍会返回本地快速扫描,并说明所请求的仅云模式不可用。

如果已连接用户的网站云配额耗尽,CyberLens 会自动回退到本地快速扫描,并打开带升级链接的定价页面。

接受的 URL 格式

https://clawhub.ai/skills/ontology            --> Resolves automatically
https://clawhub.ai/author/skill-name          --> Resolves automatically
https://*.convex.site/api/v1/download?slug=x  --> Direct download

架构

src/
  index.ts          MCP server, tool handlers, output formatting
  auth.ts           Browser-based connect flow, config file management
  client.ts         REST API client for live scan and quota endpoints
  remediation-guides.ts  Local CWE and vulnerability remediation guidance
  schemas.ts        Zod input validation schemas
  skill-scanner.ts  Local CLAW skill analyser (download, extract, scan)
  skill-validation.ts    Local CLAW manifest validation
  transparency.ts        Local transparency report for scan coverage

关键设计决策:

  • 不使用 Supabase SDK -- 通过 fetch 和 X-API-Key 标头进行纯 REST 调用

  • 可信的云接口面 -- MCP 服务器仅暴露实时公共 API(/scan、/scan/{id}、/quota)支持的那些基于云的工具

  • Stdio 传输 -- 作为 AI 助手的子进程运行,通过 stdin/stdout 通信

  • 无需 API 密钥也可用 -- 技能扫描、网站快速扫描、清单验证、修复指导和透明性报告均在本地运行;关联账户可将网站扫描升级到完整云路径,并解锁仓库扫描

  • 基于浏览器的身份验证 -- 与 CyberLens OpenClaw 技能相同的安全连接流程(受 CSRF 保护、短期交换代码、仅 HTTPS)


开发

# Build
npm run build

# Watch mode
npm run dev

# Run directly (for testing)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node dist/index.js

环境变量

变量

必需

默认值

描述

CYBERLENS_API_KEY

否

--

API 密钥(浏览器连接流程的替代方案)

CYBERLENS_API_BASE_URL

否

https://api.cyberlensai.com/functions/v1/public-api-scan

API 端点覆盖


发布

此仓库已为通过 npm + MCP Registry 发布做好准备,具体信息如下:

  • npm 包:@shadoprizm/cyberlens-mcp-server

  • MCP 服务器名称:io.github.shadoprizm/cyberlens-mcp-server

典型发布流程:

# 1. Bump the version
npm version patch

# 2. Publish the package to npm
npm publish

# 3. Authenticate with the MCP Registry
mcp-publisher login github

# 4. Publish server.json to the MCP Registry
mcp-publisher publish

注册表元数据位于根目录的 server.json 文件中,npm 所有权检查使用 package.json 中的 mcpName 字段。


相关项目

  • CyberLens OpenClaw Skill -- 具有相同扫描能力的 OpenClaw 技能版本

  • CyberLens -- 提供基于浏览器的扫描、仪表盘和报告的完整平台

  • OpenClaw -- 面向 AI 代理的开放技能生态系统


许可证

MIT

Available Tools

10 tools
connect_accountA

Connect your CyberLens account to this MCP server.

Opens your browser to cyberlensai.com where you can sign up for free or log in. After authorizing, your API key is securely saved locally.

Free accounts get 5 scans/month. No credit card required.

If you already have an API key, you can also set the CYBERLENS_API_KEY environment variable instead. Cloud tools can also launch this flow automatically the first time repository or account-only tools need an account.

Inputs: no named parameters.

get_account_quotaA

Get your CyberLens account quota and remaining cloud scans.

Returns:

  • Current plan name

  • Total scans used, limit, and remaining

  • Website scan usage

  • Repository or skill scan usage

Use this to confirm your account is connected and check how many cloud scans remain. If no account is connected yet, the MCP server will launch the CyberLens browser flow automatically before checking quota.

Inputs: no named parameters.

get_remediation_guideA

Get detailed remediation guidance for a specific vulnerability or CWE.

Returns:

  • Explanation of the vulnerability

  • Step-by-step fix instructions

  • Code examples (before/after)

  • Testing procedures

  • Prevention strategies

Uses a built-in local guide library, so it still works even when no cloud guidance endpoint is available.

Inputs: cwe_id (required), context.

get_scan_resultsA

Retrieve detailed findings from a completed security scan.

Returns:

  • Overall security score (0-100)

  • List of vulnerabilities with severity levels

  • CWE classifications

  • Specific recommendations for each finding

  • CVE references where applicable

  • Remediation guidance links

Use this after initiating a full cloud scan with scan_website or scan_repository. Local quick website scans return findings immediately and do not produce a scan ID. If no account is connected yet, the MCP server will connect first and then retrieve the cloud scan result.

Inputs: scan_id (required), severity_filter.

get_scan_transparencyA

Get an honest transparency report for this MCP server.

Returns:

  • Current MCP server version

  • Local check inventory and category counts

  • Which live cloud API endpoints this server actually uses

  • Recent changes to the MCP scan surface

Use this to understand exactly what this server checks locally and which cloud features are live.

Inputs: include_changelog.

get_security_scoreA

Get a quick security rating for a website.

Returns:

  • Overall security score (0-100)

  • Grade (A-F)

  • Key metrics summary

  • Quick wins for improvement

Without an account, this uses the local quick website scanner. With an account, this uses the full CyberLens cloud path. If cloud website quota is exhausted, CyberLens falls back to the local quick score automatically.

Inputs: url (required).

scan_claw_skillA

Scan an Open CLAW skill or plugin from CLAUDE Hub before installation.

Runs locally in the MCP server and understands CLAW skill packaging, manifest permissions, and AI agent security models.

Performs comprehensive security analysis on:

  • CLAUDE Hub skill/plugin download links

  • Skill manifest files

  • Embedded code and dependencies

Checks for:

  • Hardcoded secrets and API keys in skill code

  • Vulnerable npm/pip dependencies

  • Insecure file operations

  • Suspicious network requests

  • Unsafe eval() or code injection patterns

  • Privilege escalation risks

  • Data exfiltration patterns

  • Permission scope appropriateness

Use this BEFORE installing any CLAW skill to ensure it's safe for your environment.

Examples:

Inputs: skill_url (required).

scan_repositoryA

Scan a public repository for secrets, dependency risks, and suspicious code patterns.

Uses the live CyberLens cloud repository scanner for:

  • Public GitHub, GitLab, and Bitbucket repositories

  • Supported CLAUDE Hub or direct ZIP download URLs

Checks for:

  • Exposed secrets and credentials

  • Vulnerable dependencies

  • Suspicious or risky code behavior

  • Trust posture and repository hygiene signals

  • Artifact and package reputation issues

Returns a scan ID that can be used with get_scan_results to retrieve findings. If no account is connected yet, the MCP server will open the CyberLens browser flow automatically and then continue the scan.

Inputs: repository_url (required), depth, branch.

scan_websiteA

Scan a website for security vulnerabilities with a local quick mode and a full cloud mode.

Without a connected account, the MCP server runs a local quick scan immediately. That local mode covers roughly 15 core checks such as HTTPS, security headers, basic form issues, inline scripts, and server disclosure.

With a connected account, CyberLens starts the full cloud scan with 70+ checks. That path returns a scan ID you can use with get_scan_results.

If cloud website quota is exhausted, CyberLens falls back to the local quick scan automatically and opens the upgrade page.

Inputs: url (required), scan_type, database_connection.

validate_claw_skillA

Validate a CLAW skill manifest and configuration for security best practices.

Checks:

  • Skill manifest.json structure and required fields

  • Permission scopes (are they minimal?)

  • External API dependencies

  • File system access patterns

  • Environment variable usage

  • Plugin isolation safety

Use this before publishing a skill to CLAUDE Hub or for CI/CD validation.

Inputs: manifest_json (required), skill_code.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation3/5

    Most tools have distinct purposes, but scan_claw_skill and validate_claw_skill both target CLAW skill security and enumerate overlapping checks, making them easy to confuse. scan_website and get_security_score also overlap somewhat since both perform website scanning and return a security rating, though the descriptions do clarify the difference between full findings and a quick score.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: scan_<target> for scanning tools, get_<thing> for retrieval tools, plus connect_account and validate_claw_skill. There are no mixed naming conventions or vague verbs.

    Tool Count5/5

    Ten tools is well-scoped for a security scanning server covering website, repository, and skill scanning along with account management, quota, results, remediation, and transparency. Each tool has a recognizable role and the set does not feel bloated.

    Completeness4/5

    The core scanning lifecycle is covered: account connection, quota checks, initiating scans for websites/repos/skills, retrieving results, getting remediation guidance, and inspecting server transparency. Minor gaps exist, such as no scan history or explicit scan-status polling, but the main workflows are complete enough for agents.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers