convez.ai
MCP ServerSegurançaAvançado
MCP-Audit

MCTS - Scanner de Segurança para Servidores MCP

MCP-Audit/MCTS

Scanner local para vulnerabilidades em servidores MCP — sem cloud, pronto para CI

Ver no GitHub
BomPluginScore · de 0 a 100

Ferramenta de segurança local-first que analisa servidores MCP (Model Context Protocol) em busca de vulnerabilidades, riscos de injeção e cadeias de ataque. Oferece descoberta estática e dinâmica de ferramentas, múltiplos analisadores e pontuações auditáveis, com suporte a CI/CD sem dependências de API na nuvem.

Instalação

$npx convez-ai MCP-Audit/MCTS

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
31
Forks
18
Acompanhando
2
Saúde
87%
Último commit
há 2 meses
Versão
v0.1.4
Issues abertas
104
Contribuidores
4

Casos de uso

  • Auditar permissões e capacidades destrutivas em servidores MCP antes da produção
  • Detectar cadeias de ataque multi-etapa e riscos de injeção em ferramentas AI
  • Integrar verificações de segurança em pipelines CI/CD para conformidade

Veredito

Ferramenta especializada e bem-pensada para um problema real em ecossistemas MCP — a segurança de servidores que expõem capacidades a assistentes AI. Implementação robusta com análise estática, dinâmica e detecção de cadeias de ataque, mas voltada a um nicho técnico específico (times que usam/criam servidores MCP).

README

A tradução para o português deste README ainda está na fila.

MCTS

Model Context Threat Scanner

Python License Status Security

Security scanner for Model Context Protocol (MCP) servers — the programs that give AI assistants access to tools, files, databases, and APIs.

Run one command to find permission issues, injection risks, attack chains, and more. Works locally, in CI, with no cloud account required.

New to MCP or MCTS? See the documentation index and glossary.

mcts scan ./server.py   # single entrypoint
mcts scan ./            # entire repository

Demo

Scan the included vulnerable MCP server:

uv run mcts scan examples/vulnerable-mcp-server/server.py
$ mcts scan examples/vulnerable-mcp-server/server.py
[✓] Discovering tools...
[✓] Mapping permissions...
[✓] Detecting attack chains...
[✓] Generating report...

==================== MCTS Security Report ====================
Overall Score:   5/100 (CRITICAL)
Risk Index:      100/100
Scoring basis:   3 Critical, 7 High, 2 Medium (12 scorable findings)

Severity Summary          Top Findings
● Critical    4           [1] CRITICAL Destructive tool: delete_all_users
● High        7           [2] CRITICAL Read → exfiltration attack chain possible
● Medium      2           ...

Tip: Record a terminal GIF of the scan above and add it here as docs/assets/scan-demo.gif for maximum README impact.

Problem

AI assistants connect to the outside world through MCP servers — small programs that expose callable tools (e.g. "delete user", "read file", "query database"). A misconfigured or malicious server can:

  • Grant the AI destructive capabilities it shouldn't have
  • Hide malicious instructions in tool descriptions
  • Chain innocent tools into data theft or remote code execution
  • Leak secrets embedded in server source code

Most teams ship MCP servers without dedicated security review. MCTS makes scanning as routine as running a linter.

Features

ModuleStatusDescription
Repository scanningAlphamcts scan ./repo/ — Python + TypeScript discovery
Multi-surface scanningAlphaTools, prompts, resources, instructions (--surfaces)
Remote HTTP/SSE probingAlpha--url with Bearer/OAuth; streamable HTTP + SSE
Static JSON snapshotAlpha--snapshot for air-gapped CI from tools/list JSON
Permission & metadata analyzersAlphaDestructive tools, poisoning, schema surface (FSP)
Source-aware SASTAlphaSecrets, command execution, path validation, behavioral static
Supply chain CVE scanAlpha--pip-audit, --npm-audit
Runtime telemetry analyzersAlphaOAuth, rug-pull, injection — via --runtime-events / --live
Multi-step attack chainsAlphaCapability-graph chain detection
Live stdio probingAlpha--live merges MCP protocol schemas with static analysis
Config inventoryAlphamcts inventory — Cursor, Claude, VS Code, Windsurf
Protocol fuzzingAlphamcts fuzz — safe read-only probes by default
Readiness scanningAlphamcts readiness — HEUR-001–020 + OPA + LLM judge (opt-in)
Surface subcommandsAlphamcts scan-prompts, scan-resources, scan-instructions
REST APIAlphamcts serve — 10 endpoints (--extra api)
Raw envelope outputAlpha--format raw for CI pipelines
Optional analyzersAlphaYARA, LLM judge, cloud inspect, VirusTotal (opt-in)
Risk scoring engineAlphaExponential score + risk index + category breakdown
MCTS-T taxonomyAlphaTechnique/mitigation IDs + AITech crosswalk on findings
Terminal UIAlphaRich dashboard + --terminal-format table views
SARIF + CI gatesAlpha--format sarif, --min-score, --fail-on-category
GitHub ActionAlphaJSON + SARIF + HTML artifacts (@v1)
HTML security dashboardAlphamcts report — gauge, grades, OWASP, attack chains
Compliance checksAlphaOWASP LLM Top 10 mapping
MCTS AgentRoadmapmcts pentest (stub)

Quick Start

Prerequisites

  • Python 3.11+
  • uv (recommended)

Install

From PyPI (recommended for end users):

Distribution name is mcp-mcts (the generic mcts name is already taken on PyPI). The import package and CLI remain mcts.

pip install mcp-mcts
# or: uv tool install mcp-mcts

# Optional feature extras
pip install "mcp-mcts[mcp]"        # live probing + fuzzing
pip install "mcp-mcts[api]"        # REST API (`mcts serve`)
pip install "mcp-mcts[all]"        # every optional extra

From source (contributors):

git clone https://github.com/MCP-Audit/MCTS.git
cd MCTS
uv sync --all-extras

Scan an MCP server

Single entrypoint — when you know the server file:

mcts scan ./server.py
mcts scan examples/vulnerable-mcp-server/server.py

Entire repository — when tools are spread across multiple files:

mcts scan .
mcts scan ./path/to/mcp-repo
mcts scan examples/bench/multi-file-server/

Repo mode walks Python and TypeScript sources, discovers MCP tools across the tree, and merges them into one report (skips tests/, venvs, and other excluded paths).

Save JSON and generate an executive HTML dashboard:

mcts scan ./server.py -o report.json
mcts scan . -o report.json
mcts report report.json -o security-report.html
open security-report.html

The HTML report includes a dark-themed overview (score gauge, letter grade, severity cards, posture summary), risk breakdown with radar chart, searchable findings, attack chain graph, OWASP mapping, and in-browser export (JSON / HTML / PDF). See docs/reporting/html-report.md.

CI gate (fail on critical or score)

mcts scan ./server.py --fail-on-critical --min-score 70
mcts scan . --fail-on-critical --min-score 70
mcts scan . -o report.sarif --format sarif

See docs/platform/ci-integration.md and action/README.md.

Themes

uv run mcts scan ./server.py --theme cyber    # default
uv run mcts scan ./server.py --theme minimal --no-progress

Architecture

  MCP server (file / repo / config)
              │
              ▼
     Discovery (static Py+TS, live stdio/HTTP, JSON snapshot)
              │
              ▼
     25+ security analyzers + compliance + MCTS-T taxonomy
     (20 enabled by default)
              │
              ▼
        Risk scoring engine
              │
    ┌─────────┼─────────┐
    ▼         ▼         ▼
 Terminal   JSON/     HTML dashboard
 dashboard  SARIF    (mcts report)

Documentation

Full index: docs/index.md · Glossary

Get started

Scanning

Analysis & reporting

Platform

Planning

Project Structure

MCTS/
├── src/mcts/          # Main package (src layout)
│   ├── cli/             # Typer CLI (`scan`, `report`, `inventory`, `fuzz`, `readiness`, `serve`)
│   ├── core/            # Scanner orchestration, ScanConfig
│   ├── discovery/       # Static (Python/TS), live, JSON snapshot, merge
│   ├── probe/           # Stdio + HTTP sessions, auth, protocol checks
│   ├── analyzers/       # 25+ security analyzers
│   ├── readiness/       # Production readiness heuristics
│   ├── api/             # FastAPI REST server
│   ├── inventory/       # Client config discovery
│   ├── fuzz/            # Protocol fuzz runner
│   ├── taxonomy/        # MCTS-T techniques, Sigma rules
│   ├── scoring/         # Risk scoring engine
│   ├── compliance/      # OWASP & MCP compliance checks
│   ├── reporting/       # ScanReport models, SARIF, HTML entry
│   ├── report/          # HTML dashboard (templates, CSS, JS)
│   ├── ui/              # Terminal dashboard (Rich)
│   └── mcp/             # MCPServerInfo models
├── tests/               # pytest suite + regression fixtures
├── examples/            # Sample MCP servers & benchmarks
├── action/              # GitHub Action (`@v1`)
└── docs/                # Documentation
    ├── get-started/     # Install and first scan
    ├── scanning/        # Live, fuzz, TS discovery, inventory
    ├── analysis/        # Pipeline architecture
    ├── reporting/       # Scoring, taxonomy, HTML dashboard
    ├── platform/        # CLI and CI
    └── more/            # Roadmap and planning

Development

uv sync --all-extras
uv run pytest
uv run ruff check src tests
uv run ruff format src tests
pre-commit install

Positioning

MCTS is MCP-boundary security — tool metadata, schemas, handler source, client configs, protocol behavior, and capability-graph attack chains. It complements general AppSec tools; it does not replace Semgrep, Trivy, or enterprise runtime gateways.

Tool categoryDomainMCTS overlap
General SASTApplication code vulnerabilitiesMCP tool poisoning, schema FSP, cross-server shadowing
HTTP DASTWeb application surfaceMCP protocol + live tool manifest probes
Container / dependency scannersImages and packages--pip-audit / --npm-audit at the MCP repo layer
Agent fleet scannersAgent + MCP inventoryAttack chains, MCTS-T taxonomy, readiness/OPA
Trust registriesCloud scan + reputationMCTS is local-first; no account required for CI
Runtime gatewaysRuntime policy & governanceDifferent layer — MCTS scans before deploy; they enforce at runtime

Where MCTS leads today: auditable exponential scoring, capability-graph attack chains, first-party MCTS-T taxonomy with bundled Sigma rules, executive HTML dashboard, readiness + OPA, YARA on metadata, line-jumping detection, local-first default.

Highest-priority gaps: Semgrep SAST adapter (+ Java), skills / SKILL.md scanning, machine-wide config scan, MCP server mode (mcts-mcp), AI-BOM / CycloneDX export, interactive attack-graph UI, runtime stdio proxy, governance YAML policies.

See Product Positioning and Feature Expansion Plan — Part 11.

Roadmap

DocContents
Feature Expansion PlanFull gap analysis, how to implement each capability, module layout, build order
Product RoadmapPhased deliverables: foundation → CI adoption → differentiation → platform

Next up (Phase 2–3): Semgrep SAST layer, skills scanning, mcts-mcp server mode, AI-BOM export, attack-graph dashboard UI, runtime stdio proxy, mcts audit-config, scan history/trends, mcts pentest, remote fuzz (mcts fuzz --url). Phase 0–1 foundation is shipped — see Roadmap.

Contributing

See CONTRIBUTING.md.

License

Apache License 2.0 — see LICENSE.

Security

To report vulnerabilities, see SECURITY.md.

Ver o original no GitHub

Bom para

Relacionados