MCPGuard Core
by qwnzkkldsfai
README.md
# MCPGuard Core (`MIT`)
> **Zero-dependency MCP security scanner, SARIF 2.1.0 auditor, `mcp.lock.json` rug-pull detector, offline 12-case red-team harness, and read-only `stdio` MCP server.**
> [中文文档](./README.zh-CN.md) · [Live Survival Telemetry & Playground](https://qwnzkkldsfai.github.io/operation-self-sustain/) · Official MCP Registry: `io.github.qwnzkkldsfai/mcpguard-core` · Glama: [`mcpguard-core`](https://glama.ai/mcp/servers/@qwnzkkldsfai/mcpguard-core)
[](https://registry.modelcontextprotocol.io/v0/servers?search=mcpguard-core)
[](./LICENSE)
---
## 1-Line Zero-Setup Tryout (`<1s` · `$0 API Spend`)
```bash
uvx --from git+https://github.com/qwnzkkldsfai/mcpguard-core mcpguard-core self-check
```
Both CLI aliases work identically (`mcpguard` and `mcpguard-core`):
```bash
# Scan Claude / Cursor / project MCP configs with CI-ready SARIF 2.1.0 export
uvx --from git+https://github.com/qwnzkkldsfai/mcpguard-core mcpguard-core scan ./claude_desktop_config.json --format sarif
# Pin server commands, tool schemas & descriptions cleanly (no plaintext secrets stored in lockfile)
mcpguard lock init --config ./claude_desktop_config.json --lock ./mcp.lock.json
mcpguard lock verify --config ./claude_desktop_config.json --lock ./mcp.lock.json
# Run the offline 12-case adversarial + control red-team probe suite
mcpguard probe
```
Or run via GitHub Container Registry (OCI) in Docker / MCP clients:
```json
{
"mcpServers": {
"mcpguard": {
"command": "docker",
"args": ["run", "--rm", "-i", "ghcr.io/qwnzkkldsfai/mcpguard-core:0.1.0"]
}
}
}
```
---
## What `mcpguard-core` (`MIT`) Prevents
| Rule | Severity | Target Threat Class | Standards Mapping |
| --- | --- | --- | --- |
| `MG-001` | `CRITICAL` | `<IMPORTANT>` / Base64 covert prompt & credential exfiltration payloads in tool metadata | `CWE-77` · `OWASP LLM01` · `EU AI Act Art. 15` |
| `MG-002` | `HIGH` | Cross-server tool shadowing, override hijacking, duplicate tool collisions | `CWE-94` · `OWASP LLM01` |
| `MG-003` | `HIGH` | Piped `curl\|bash` runners, `0.0.0.0` binds, unpinned `npx -y` ephemeral packages | `CWE-78` · `OWASP LLM05` |
| `MG-004` | `HIGH` | Hardcoded literal API keys/tokens in `env`/`headers` (exempts `${ENV_VAR}` placeholders) | `CWE-798` · `OWASP LLM02` |
| `MG-005` | `MEDIUM` | Plaintext `http://` remote SSE / HTTP endpoints (exempts `localhost`/`127.0.0.1`) | `CWE-319` · `OWASP LLM06` |
| `MG-006` | `MEDIUM` | Missing `additionalProperties: false` & covert exfiltration parameters in schemas | `CWE-20` · `OWASP LLM06` |
| `LOCK` | `EXIT 2` | Post-install rug-pull mutation of server command, args, env hash, or tool schema | `mcp.lock.json` canonical SHA-256 |
- **Bundled Sample Eval (`mcpguard probe`)**: Verifies **9/9 (`100%`) adversarial blocks vs `0.0%` baseline**, **`0.0%` false-positive rate** across 3 hardened benign controls (`${ENV_VAR}`, pinned `@version`, `127.0.0.1` loopback), in **`<10ms` at `$0` API spend**.
---
## Exposed Read-Only MCP Tools (`mcpguard mcp-stdio`)
All tools declare `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: false`, and strict `additionalProperties: false`:
- `mg_scan_config(target)`
- `mg_verify_lock(config_path, lock_path)`
- `mg_probe_sample()`
---
## Commercial Stage-2 Edition & Sister Open-Core Tools
- **Commercial Upgrade — MCPGuard Air-Gapped Security & Red-Team Appliance v1.0 (`$99` Early-Bird / `$149` Standard · coming in Stage 2)**: Expands this MIT open-core CLI/scanner with a 250+ RTX 4090 / Colab calibrated adversarial MCP corpus, live `stdio` runtime intercepting proxy enforcing `mcp.lock.json`, and signed EU AI Act Art. 15 / SOC 2 / SARIF audit bundles.
- **Related Ecosystem Tools**:
- **[`vaultgraph-core`](https://github.com/qwnzkkldsfai/vaultgraph-core)** (`MIT`): Zero-AGPL GraphRAG license scanner & clean-room eval harness (`+50.00 pp Coverage@2` sample; Pro `$79/$149` live).
- **[`Gemini_Hub`](https://github.com/qwnzkkldsfai/Gemini_Hub)** (`MIT`): Cross-platform AI context bridge + MCP server (`v0.1.1`).
- **[Operation Self-Sustain Live Telemetry](https://qwnzkkldsfai.github.io/operation-self-sustain/)**: Public `US$199.99` 29-day autonomous AI survival challenge & interactive VaultGraph browser sandbox.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues