Thank you for helping make MCP security testing accessible to everyone.
New to the project? Read Getting Started and the Glossary first.
A minimal path from zero to your first merged PR:
| Step | What to do |
|---|---|
| 1. Find an issue | Browse open issues. Good entry points: priority:P3, type:docs, type:task, or issues tagged good first issue if present. For larger work, pick an item from Part 11 of the Feature Expansion Plan and open a feature request first. |
| 2. Label the work | New issue: apply one type:*, one priority:P*, and at least one component:* before you start — see Issue labeling guide. Existing issue: confirm labels match the scope you plan to implement; comment that you are working on it to avoid duplicate PRs. |
| 3. Set up locally | Fork → clone → uv sync --all-extras → pre-commit install (details below). |
| 4. Create a branch | git checkout -b fix/short-description or feat/short-description off latest main. |
| 5. Implement + test | Keep the change focused. Run uv run pytest and uv run ruff check src tests before pushing. |
| 6. Submit a PR | Open a PR against main with a clear summary, link the issue (Fixes #123), and note any doc or CHANGELOG updates. CI must pass the test check. |
git clone https://github.com/YOUR_USER/MCTS.git
cd MCTS
uv sync --all-extras
pre-commit install
git checkout -b feat/my-first-contribution
uv run pytest
uv run mcts scan examples/vulnerable-mcp-server/server.py # sanity check
# … make changes …
uv run pytest && uv run ruff check src tests
git push -u origin feat/my-first-contribution
# Open PR on GitHubWhere code usually lives: see Codebase overview below.
MCTS is a pipeline: discover MCP surfaces → run analyzers → score → report. Most feature work touches one layer.
flowchart TB
CLI["CLI / API\ncli/main.py · api/app.py"]
CFG["ScanConfig\ncore/config.py"]
DISC["Discovery\nmcp/client.py · discovery/*"]
INFO["MCPServerInfo\nmcp/models.py"]
ANA["Analyzers\nanalyzers/*.py"]
COMP["Compliance\ncompliance/checks.py"]
GRAPH["Attack graph\nscoring/graph.py"]
V1["Legacy score\nengine.py"]
V2["v2 score\nengine_v2.py"]
OUT["ScanReport\nreporting/models.py"]
TERM["Terminal / JSON / SARIF / HTML"]
CLI --> CFG
CFG --> DISC
DISC --> INFO
INFO --> ANA
ANA --> COMP
COMP --> GRAPH
GRAPH --> V1
V1 --> V2
V2 --> OUT
OUT --> TERM
Orchestrator: Scanner in src/mcts/core/scanner.py wires discovery, analyzers, compliance, attack graph, legacy scoring, and optional v2 scoring (scoring_mode default both).
| Layer | Directory | Typical contribution |
|---|---|---|
| CLI & config | cli/, core/config.py |
New flags, subcommands, presets |
| Discovery | discovery/, mcp/client.py, probe/ |
New languages, live/remote transport, inventory |
| Analyzers | analyzers/ |
New security checks (subclass BaseAnalyzer) |
| SAST / rules | sast/, taxonomy/sigma/ |
Tree-sitter taint, Semgrep rules, Sigma metadata |
| Scoring & reports | scoring/, governance/, reporting/, report/ |
v1/v2 engines, corpus stats, gates, SARIF, HTML dashboard |
| Tests | tests/, tests/fixtures/regression/ |
Unit tests, technique regression fixtures |
Adding an analyzer (common task):
- Create
src/mcts/analyzers/your_analyzer.py— subclassBaseAnalyzer, implementanalyze(). - Register in
Scanner._build_analyzers()(core/scanner.py). - Add tests and, when applicable, a fixture under
tests/fixtures/regression/MCTS-T-*/. - Document in Security Checks and assign a
technique_id.
Full pipeline detail: Architecture · Scoring guide · Extension points
If you skipped the quick start commands above:
- Fork and clone the repository
- Install uv
- Run
uv sync --all-extras - Install pre-commit hooks:
pre-commit install
See Getting Started (user guide) and CLI Reference for scan usage beyond development.
# Run tests
uv run pytest
# Lint & format
uv run ruff check .
uv run ruff format src tests
# Try the CLI locally
uv run mcts scan examples/vulnerable-mcp-server/server.py
# Generate the HTML security dashboard
uv run mcts scan examples/vulnerable-mcp-server/server.py -o report.json
uv run mcts report report.json -o security-report.htmlBefore opening a GitHub issue:
- Search existing issues for duplicates
- Reproduce on the latest
mainbranch - Apply the label taxonomy: one
type:*, onepriority:P*, and at least onecomponent:*
Full guide: Issue Labeling & Creation — types, priorities, components, finding labels, status workflow, body template, and examples.
Use the repo templates when possible: bug report · feature request
- Keep PRs focused — one feature or fix per PR
- Add tests for new behavior
- Update
CHANGELOG.mdunder[Unreleased]for user-facing changes - Follow existing code style (ruff enforces this in CI)
- Update documentation when adding user-facing features
| Branch | Who can update | Policy |
|---|---|---|
main (current release) |
Maintainers (maintain) and Admins |
PRs required; test + scoring-v2 must pass; branch up to date; no force-push or deletion |
main_* (pinned releases, e.g. main_0.1.2) |
Maintainers and Admins | Same as main — for version-specific hotfix lines |
develop (integration) |
Admins only | test + scoring-v2 must pass; no force-push or deletion; contributors land work via PRs from feature branches |
Contributors typically have Write (feature branches only). Assign Maintain to release maintainers who merge into main. Assign Admin to owners who push integration work to develop.
Definitions live in .github/rulesets/ (main.json, develop.json). See rulesets README for bypass actors and role IDs.
Option A — Script (recommended)
./scripts/enable-branch-protection.sh MCP-Audit/MCTSThe script is idempotent: re-running it updates existing rulesets (Protect release branches, Protect develop) instead of creating duplicates. Use --dry-run to preview without applying changes.
Option B — GitHub UI
- Go to Settings → Rules → Rulesets → New branch ruleset
- Target: default branch (
main) ordevelop - Add rules: Restrict updates (role bypass), Require pull request (
mainonly), Require status checks, Block force pushes, Restrict deletions - Bypass actors:
main→ Maintain (PR merge) + Admin;develop→ Admin only - Required checks:
test,scoring-v2 - Save and enable enforcement
Before large features, read:
| Document | What it covers |
|---|---|
| Documentation index | All user and contributor docs |
| Glossary | Term definitions |
| Feature Expansion Plan | Gap analysis, implementation how-to, prioritized backlog |
| Product Roadmap | Phased deliverables and success criteria |
| Product Positioning | Positioning, differentiation, and roadmap gaps |
When proposing parity with another MCP security tool, cite the capability layer (static scan, supply chain, runtime, governance, graph) and confirm it fits MCTS's local-first MCP-boundary scope — see Feature Expansion Plan Part 8.
Pick a phase item from Part 11 or the full GAP appendix and open a feature request or Discussion to align on design.
See Codebase overview — Adding an analyzer for the short checklist. Extended steps:
- Create a module under
src/mcts/analyzers/ - Subclass
BaseAnalyzerand implementanalyze() - Register it in
Scanner._build_analyzers()(src/mcts/core/scanner.py) - Add benchmark fixture in
examples/bench/when applicable - Assign
technique_id(MCTS-T-*) — see Threat Taxonomy - Add tests under
tests/and regression fixtures when applicable - Document the check in Security Checks Reference
Full guide: Architecture — Extension points
This project follows the Contributor Covenant.
Open a GitHub Discussion or an issue using the labeling guide.