MCP Shield Runtime
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Shield Runtimeapprove the pending write_file call from my MCP client"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Shield Runtime
Control every MCP tool call before it executes.
MCP Shield Runtime is a local-first security gateway for Model Context Protocol clients and servers. It provides parameter-level policies, tool visibility filtering, approval gates, emergency deny rules, secret redaction, tool-contract drift detection, rate limiting, and tamper-evident audit records.
Project status: production-oriented preview. The core gateway and controls are working and tested, but the project has not yet completed an independent security audit. Use staged rollout and least-privilege upstream credentials for production environments.
Why this project exists
An allowlist that says an agent may use read_file or send_email is not enough. Security decisions must consider the concrete path, recipient, repository, branch, URL, command, environment, identity, detected data, and prior approval.
AI client
|
v
MCP Shield Runtime
| policy, approval, DLP, contract lock, audit
v
MCP serverArchitecture

Related MCP server: cordon
How it works

Features
Stdio proxy for local MCP servers
Streamable HTTP reverse proxy
MCP 2026 routing-header validation and generation
Client-independent parameter-level policy decisions
Built-in emergency blocks for secret paths, private metadata URLs, and destructive commands
Human approval with retry grants
Tool discovery filtering
Tool schema and description lockfile
Response secret redaction
Tamper-evident hash-chained audit log with optional HMAC signatures
Per-user, per-server, per-tool token-bucket rate limiting
Local dashboard and approval queue
Zero runtime npm dependencies
Docker hardening example
Node built-in test suite and CodeQL workflow
Requirements
Node.js 22 or newer
An existing MCP server
JSON policy and configuration files
Quick start
git clone https://github.com/your-org/mcp-shield-runtime.git
cd mcp-shield-runtime
npm install
npm run check
node src/cli.js init --dir .mcp-shieldProtect a local stdio server
node src/cli.js run \
--config .mcp-shield/config.json \
-- node examples/risky-demo-server.jsExample MCP client configuration:
{
"mcpServers": {
"protected-demo": {
"command": "node",
"args": [
"/absolute/path/mcp-shield-runtime/src/cli.js",
"run",
"--config",
"/absolute/path/mcp-shield-runtime/.mcp-shield/config.json",
"--",
"node",
"/absolute/path/mcp-shield-runtime/examples/risky-demo-server.js"
]
}
}
}Protect a remote Streamable HTTP server
node src/cli.js gateway \
--config config/default.config.json \
--upstream https://upstream.example.com/mcpPoint the MCP client to http://127.0.0.1:7777/mcp. The local dashboard is at http://127.0.0.1:7777/.
Approval flow
When a call requires approval, the gateway returns JSON-RPC error -32070 with an approval ID.
node src/cli.js approvals list --config .mcp-shield/config.json
node src/cli.js approvals approve apr_ID \
--config .mcp-shield/config.json \
--ttl 300Retry the identical tool call. The approval is scoped to the request fingerprint and expiration.
Example policy
{
"version": 1,
"defaults": { "decision": "deny" },
"rules": [
{
"id": "allow-repository-read",
"priority": 100,
"match": {
"methods": ["tools/call"],
"tools": ["read_file"],
"arguments": {
"path": {
"within": ["${workspace}"],
"exclude": ["**/.env", "**/.ssh/**", "**/*.pem"]
}
}
},
"effect": { "decision": "allow" }
},
{
"id": "approve-write",
"priority": 90,
"match": {
"methods": ["tools/call"],
"tools": ["write_file", "push_files"]
},
"effect": {
"decision": "require_approval",
"approvalTtlSeconds": 300
}
}
]
}See Policy reference.
Security model
The gateway enforces what it can observe at the MCP boundary. A protocol proxy cannot fully constrain a local server process after launch. Strong filesystem and network isolation requires a container, operating-system sandbox, or workload boundary.
Important deployment rules:
Keep upstream credentials least-privileged.
Bind the dashboard to localhost unless an API token and TLS termination are configured.
Enable HMAC audit signing.
Use a container or operating-system sandbox for untrusted local servers.
Set
allowSseWithoutInspectiontofalsefor tools requiring response DLP.Pin upstream package and container versions.
Review tool-contract changes before enabling
blockSchemaDrift.
Read SECURITY.md and Threat model.
Commands
mcp-shield init
mcp-shield gateway
mcp-shield run -- COMMAND
mcp-shield policy test
mcp-shield approvals list|approve|deny
mcp-shield audit list|verify
mcp-shield contracts list|approve
mcp-shield scan
mcp-shield doctorProtocol compatibility
The proxy is protocol-neutral for JSON-RPC messages and can forward legacy and modern MCP traffic. The HTTP gateway validates or generates modern Mcp-Method and Mcp-Name routing headers. Stateful legacy HTTP servers may require upstream session handling specific to their deployment.
The project intentionally keeps policy logic separate from the official MCP SDK. SDK-backed client and server adapters can be added without moving the trusted policy core.
Documentation
License
Apache License 2.0.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceSecurity gateway that wraps any MCP server with per-tool policies, approval gates, and optional Ed25519-signed decision receipts. Shadow mode logs every tool call without blocking; enforce mode applies block, rate-limit, and minimum-tier rules. Receipts are independently verifiable offline with no accounts needed.Last updated54109MIT
- Alicense-qualityAmaintenanceSecurity gateway for MCP tool calls. Sits between your LLM client and MCP servers, enforcing per-tool policies (allow/block/approve/read-only), logging every call, and pausing dangerous operations for human approval in terminal or Slack.Last updated1MIT
- Flicense-qualityCmaintenanceSafety-first local MCP tool gate with control plane, runtime security, and observability for managing MCP backends.Last updated
- Alicense-qualityBmaintenanceSelf-hosted MCP gateway that applies deterministic, compiled policy to tool discovery, invocation, and outbound data flow, with no model in the enforcement path. Every decision emits a hash-chained receipt sealed with Ed25519 and verifiable using public keys only.Last updatedApache 2.0
Related MCP Connectors
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/samsgates/mcp-shield-runtime'
If you have feedback or need assistance with the MCP directory API, please join our Discord server