Token导航 LogoToken导航TokenDH.com
mcpscc (Gensecaihq) logo
安全风控stdio官方级别未说明来源级核验

mcpscc (Gensecaihq)

MCP Server

MCP安全扫描器是一款用于检测Model Context Protocol(MCP)服务器漏洞的工具,支持多语言和多种导出格式,适用于CI/CD集成。

工具数

0

提示词数

0

GitHub Stars

5

资源数

0
安全漏洞检测Python多语言支持

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

gensecaihq

提供方

gensecaihq

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install mscc

详细介绍

MSCC-MCP安全指挥中心

![CI](https://github.com/gensecaihq/mcpscc/actions/workflows/ci.yml) ![Python 3.9+](https://www.python.org/downloads/) ![License: Apache 2.0](https://opensource.org/licenses/Apache-2.0) ![Code style: black](https://github.com/psf/black)

MCP安全之谜 -在MCP服务器成为漏洞之前扫描其漏洞

模型上下文协议(MCP)服务器的安全扫描程序。检测MCP实现中的快速注入、工具中毒、秘密暴露和其他漏洞。

特性

  • 63种检测模式 覆盖OWASP MCP Top 10
  • 支持6种语言 -Python、JavaScript/Node.js、Go、Rust、Java、C#
  • YARA规则引擎 用于自定义检测规则
  • 多种导出格式 -JSON、SARIF、Markdown、HTML、PDF、SVG徽章
  • MCP协议客户端 用于实时服务器扫描
  • CI/CD就绪 与GitHub Actions集成

安装

# Core SDK
pip install mscc

# With API server
pip install mscc[api]

# With PDF export support
pip install mscc[pdf]

# Development
pip install mscc[dev]

快速开始

开发包

from mscc import MSCCClient, scan_local

# Quick local scan
result = scan_local("./my-mcp-server")
print(f"Risk Score: {result.risk_score}/100")
print(f"Found {len(result.findings)} issues")

# Full client usage
client = MSCCClient()
result = client.scan("./path/to/mcp-server", profile="ci-standard")

# Check findings
for finding in result.findings:
    print(f"[{finding.severity.value}] {finding.title}")
    print(f"  Location: {finding.file_path}:{finding.line_number}")

# Export reports
result.to_pdf("report.pdf")
result.to_sarif()  # Returns SARIF dict
result.to_html()   # Returns HTML string

命令行接口

# Scan a local directory
mscc scan ./my-mcp-server

# Scan with specific profile
mscc scan ./src --profile dev-fast

# Scan a Git repository
mscc scan-repo https://github.com/org/mcp-server

# Export to different formats
mscc scan ./src -o report.json
mscc scan ./src -o report.sarif
mscc scan ./src -o report.html

# Fail on high risk score (for CI)
mscc scan ./src --max-risk 70

# Show version
mscc version

GitHub操作集成

name: Security Scan

on: [push, pull_request]

jobs:
  mscc-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - run: pip install mscc
      - run: mscc scan . --max-risk 70 -o results.sarif
      - uses: github/codeql-action/upload-sarif@v3
        if: always()
        with:
          sarif_file: results.sarif

检测能力

OWASP MCP十大覆盖范围

类别图案OWASP ID
提示注入忽略指令、系统标记、角色操纵、越狱、unicode技巧MCP-03
工具中毒隐藏的HTML注释、编码内容、XSS有效载荷MCP-02
权限过多无限制的shell/文件系统/网络,调试模式MCP-01
秘密曝光API密钥、密码、令牌、私钥、连接字符串MCP-01
命令注入Shell执行、eval、不安全的反序列化MCP-04

语言支持

语言检测模式
python子进程、os.system、eval/exec、pickle、yaml.load
JavaScripteval、child_process、innerHTML、原型污染
执行官。命令、不安全、SQL注入、路径遍历
不安全块,命令::new,原始指针,转换
JavaRuntime.exec、ObjectInputStream、XXE、JNDI注入
C过程。开始,BinaryFormatter,SQL注入,XXE

扫描配置文件

简介用例
dev-fast快速本地开发检查
ci-standardCI/CD管道集成(默认)
full-enterprise全面的安全审计

API服务器

# Start the API server
uvicorn mscc.api.app:app --host 0.0.0.0 --port 8000

# Or with Docker
docker build -t mscc .
docker run -p 8000:8000 mscc

端点

方法端点描述
得到/health健康检查
得到/ready准备就绪检查
得到/docsOpenAPI文档
职位/api/v1/scans运行安全扫描

示例请求

curl -X POST http://localhost:8000/api/v1/scans \
  -H "Content-Type: application/json" \
  -d '{"path": "./my-mcp-server", "profile": "ci-standard"}'

项目结构

src/mscc/
├── __init__.py          # Package exports
├── cli.py               # Command line interface
├── client.py            # MSCCClient SDK
├── models/              # Data models
├── scanner/
│   ├── engine.py        # Scan orchestration
│   ├── static.py        # Pattern detection (63 patterns)
│   └── yara_scanner.py  # YARA rules engine
├── mcp/
│   ├── client.py        # MCP Protocol Client
│   └── scanner.py       # Live server scanner
├── api/
│   ├── app.py           # FastAPI application
│   ├── db/              # Database models (PostgreSQL)
│   └── cache.py         # Redis caching
└── worker/
    └── tasks.py         # Celery background tasks

rules/                   # YARA detection rules
├── core/
│   ├── owasp-mcp/       # OWASP MCP Top 10 rules
│   └── secrets/         # Secret detection rules
└── community/           # Community-contributed rules

发展

# Clone and install
git clone https://github.com/gensecaihq/mcpscc.git
cd mcpscc
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,api,pdf]"

# Run tests
pytest tests/ -v

# Run linting
ruff check src/
black --check src/

贡献

欢迎投稿!请阅读 贡献.md 作为指导方针。

安全

有关安全问题,请参阅 安全.md.

许可证

Apache-2.0-见 许可证 了解详情。

目录标签

目录标签

安全漏洞检测Python多语言支持安全扫描本地部署MCP协议CI/CD集成

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP