@aiclude/mcp-guard 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ In 2026, **MCP (Model Context Protocol)** has become the de facto standard for A
|
|
|
19
19
|
- **92% exploit probability** with just 10 MCP plugins installed ([VentureBeat](https://venturebeat.com))
|
|
20
20
|
- **OWASP MCP Top 10** published — Tool Poisoning, Prompt Injection, Context Spoofing confirmed as real attack vectors
|
|
21
21
|
|
|
22
|
-
Existing security tools (WAF, SAST, DAST) don't
|
|
22
|
+
Existing security tools (WAF, SAST, DAST) don't understand MCP protocol semantics. A WAF can see HTTP requests, but it cannot detect MCP-specific attacks like zero-width character hiding in tool descriptions, tool name spoofing, or prompt injection embedded in tool definitions. In stdio mode, traffic doesn't even use HTTP — it's completely off the radar.
|
|
23
23
|
|
|
24
24
|
> **MCP Guard** inspects all messages in real-time and **blocks dangerous tool calls before they reach the server**.
|
|
25
25
|
|
|
@@ -75,6 +75,25 @@ Add to `.cursor/mcp.json`:
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
### Claude Code (CLI) Integration
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
claude mcp add my-server-guarded -- npx -y @aiclude/mcp-guard -- npx -y @some/mcp-server
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or edit `~/.claude/claude_code_config.json` directly:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"fetch-guarded": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@aiclude/mcp-guard", "--", "npx", "-y", "@modelcontextprotocol/server-fetch"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
78
97
|
---
|
|
79
98
|
|
|
80
99
|
## Key Features
|
|
@@ -106,24 +125,21 @@ Works out of the box with built-in default policies. Customize with YAML policy
|
|
|
106
125
|
|
|
107
126
|
## Protection Coverage
|
|
108
127
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
CWE: CWE-22, CWE-78, CWE-79, CWE-89, CWE-94, CWE-200, CWE-209
|
|
125
|
-
OWASP MCP Top 10: Tool Poisoning, Prompt Injection, and more
|
|
126
|
-
```
|
|
128
|
+
| Tool Definitions (server → client) | Tool Call Arguments (client → server) | Tool Responses (server → client) |
|
|
129
|
+
|:-----------------------------------|:--------------------------------------|:---------------------------------|
|
|
130
|
+
| Zero-width steganography | SQL Injection | Credential exposure |
|
|
131
|
+
| Prompt injection phrases | Command Injection | System path leaks |
|
|
132
|
+
| Homoglyph spoofing | Path Traversal | Stack trace exposure |
|
|
133
|
+
| HTML comment hiding | XSS | Command exec evidence |
|
|
134
|
+
| Base64 encoding hiding | Template Injection | Template injection results |
|
|
135
|
+
| Name shadowing | Prompt injection | Credential leaks |
|
|
136
|
+
| Multilingual injection | Multilingual injection | |
|
|
137
|
+
| Agent manipulation patterns | Zero-width char hiding | |
|
|
138
|
+
| InputSchema validation | | |
|
|
139
|
+
|
|
140
|
+
**CWE Coverage:** CWE-22, CWE-78, CWE-79, CWE-89, CWE-94, CWE-200, CWE-209
|
|
141
|
+
|
|
142
|
+
**OWASP MCP Top 10:** Tool Poisoning, Prompt Injection, and more
|
|
127
143
|
|
|
128
144
|
---
|
|
129
145
|
|
|
@@ -133,21 +149,15 @@ MCP Guard operates as a **transparent proxy** between client and server.
|
|
|
133
149
|
|
|
134
150
|
### stdio Mode
|
|
135
151
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
|
140
|
-
Rule Engine
|
|
141
|
-
```
|
|
152
|
+
> **MCP Client** → *stdio* → **MCP Guard (Proxy)** → *stdio* → **MCP Server (Local)**
|
|
153
|
+
>
|
|
154
|
+
> All messages pass through the **Rule Engine** for real-time inspection.
|
|
142
155
|
|
|
143
156
|
### HTTP Mode
|
|
144
157
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
|
149
|
-
Rule Engine
|
|
150
|
-
```
|
|
158
|
+
> **MCP Client** → *HTTP POST* → **MCP Guard (:9090)** → *HTTP POST* → **MCP Server (Remote)**
|
|
159
|
+
>
|
|
160
|
+
> Responses (JSON or SSE stream) are inspected before forwarding back to the client.
|
|
151
161
|
|
|
152
162
|
**Default behavior: Fail-Close.** If the policy engine errors, all traffic is blocked for safety.
|
|
153
163
|
|