ShieldClaw-MCP
A permission layer for AI agent tool calls. Wrap any MCP
server so every tools/call is checked against a policy — allowed, denied,
or held for approval — and audited. We don't ask models to behave. We
technically restrict what they can do.
agent (Claude / GPT / any MCP client)
│ tools/call: shell_exec "rm -rf /"
▼
┌───────────────┐
│ ShieldClaw-MCP│ ──► 🚫 blocked by policy (never reaches the server)
└───────────────┘
│ tools/call: read_file
▼
your real MCP server
Install
pip install shieldclaw-mcp
Use
Write a policy (policy.json):
{
"default": "deny",
"rules": {
"read_file": "allow",
"web_search": "allow",
"db_delete": "deny",
"shell_exec": "deny",
"send_email": "ask",
"*_secret": "ask"
}
}
Wrap your MCP server. Wherever your agent/client launches the server, put
shieldclaw-mcp wrap in front of it:
shieldclaw-mcp wrap --policy policy.json -- python my_mcp_server.py
For example, in a Claude Desktop mcpServers config, change the command
from python my_mcp_server.py to
shieldclaw-mcp wrap --policy /path/policy.json -- python my_mcp_server.py.
Decisions
| Decision | Effect |
|---|---|
allow |
Forwarded to the server unchanged |
deny |
Blocked; the agent gets a JSON-RPC error, the server never sees it |
ask |
Blocked too (fail-closed) and tagged "requires approval" |
Rules match exact tool names first, then glob patterns (db_*, *_secret),
then fall back to default. The default default is deny.
Audit
Every decision is appended to ~/.shieldclaw-mcp/audit.jsonl. Tool
arguments are never logged in full — only a short sha256 fingerprint,
so you can correlate without leaking secrets. Set SHIELDCLAW_CONTROL_PLANE
(or --control-plane URL) to also stream events to a dashboard.
Other commands
shieldclaw-mcp check --policy policy.json shell_exec # -> deny
shieldclaw-mcp version
How it works
ShieldClaw-MCP is a transparent stdio proxy. The client launches it instead
of the real server; it spawns the real server as a child and relays the
newline-delimited JSON-RPC traffic both ways, intercepting only
tools/call. Everything else (initialize, tools/list, notifications)
passes through untouched, so it works with any compliant MCP server.
Develop
pip install -e ".[dev]"
pytest -q
License
MIT
Metadata
Release files for shieldclaw-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shieldclaw_mcp-0.2.0.tar.gz | 13.1 kB | Without provenance | Details for shieldclaw_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shieldclaw_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for shieldclaw_mcp-0.2.0-py3-none-any.whl |
Total release size: 24.7 kB
Release files / shieldclaw_mcp-0.2.0.tar.gz
| Download URL | shieldclaw_mcp-0.2.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06c8448465eb67e9b9322aff3522262574e922cdfa3cc11f1bb1f8f6a393bddb
|
|
BLAKE2b-256 checksum How to use checksums |
8cd009ef9ab9e581957e77c84b58d4f02144874b5d7675a6eae08601482a6db9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / shieldclaw_mcp-0.2.0-py3-none-any.whl
| Download URL | shieldclaw_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc948d2f6deb2a594aaa9dfaf027d51aac103aa7dba658bbabceb0fb3b12bf1c
|
|
BLAKE2b-256 checksum How to use checksums |
164b81eaa2fa8f237e9cbb9e4c22b57cea650d972384d33d9067344d9adb0ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for shieldclaw-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.