MCP-Guard
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP-Guard
A local human-approval gateway for Model Context Protocol (MCP) tool calls.
MCP-Guard sits between an MCP host and configured upstream MCP servers. It discovers upstream tools, displays each invocation in a desktop approval window, and forwards only approved calls.
Scope: MCP-Guard governs only traffic explicitly routed through it. Claude Desktop can use it as a local stdio MCP server. Claude Web/cloud integrations are not automatically intercepted by a local desktop process; they require a supported remote MCP endpoint that routes calls through an MCP-Guard deployment.
Features
Per-call Allow once / Block decisions.
Requests remain pending until a decision or timeout.
Concurrent pending approvals with independent request IDs.
Displays upstream, tool, arguments, and request ID.
Fail-closed timeout and upstream error handling.
Multiple upstream stdio MCP servers.
JSON configuration and rotating logs.
Full argument payloads are not written to logs.
Related MCP server: ChatGPT Gateway MCP Nyan
Requirements
Python 3.11+
Desktop environment for the approval window
Upstream MCP servers installed and runnable locally
Claude Desktop or another stdio-capable MCP host
Install
git clone https://github.com/Yugandhar194/MCP-Guard.git
cd MCP-Guard
python -m venv .venvActivate the environment:
# Windows
.venv\\Scripts\\activate
# macOS / Linux
source .venv/bin/activateInstall dependencies and create your local config:
pip install -e .
cp config/servers.example.json config/servers.jsonEdit config/servers.json with the command and arguments for each trusted upstream MCP server.
Run
python -m mcp_guard --config config/servers.jsonKeep MCP-Guard running while your MCP host is connected.
Claude Desktop
Back up your Claude Desktop configuration, then add an entry similar to this. Replace paths with absolute paths for your machine:
{
"mcpServers": {
"mcp-guard": {
"command": "/absolute/path/to/MCP-Guard/.venv/bin/python",
"args": [
"-m", "mcp_guard",
"--config", "/absolute/path/to/MCP-Guard/config/servers.json"
]
}
}
}On Windows, use the virtual environment's python.exe path. Restart Claude Desktop after editing the configuration.
Configure the actual MCP servers inside MCP-Guard's servers.json. If you also configure those servers directly in Claude Desktop, those direct connections bypass approval.
Configuration
See config/servers.example.json. Each server entry has a unique name, executable command, argument list, and optional environment variables. Tools are exposed as server__tool. For example, filesystem/read_file becomes filesystem__read_file.
Approval flow
MCP-Guard starts configured upstream stdio servers and discovers their tools.
The host invokes a namespaced tool.
MCP-Guard creates a pending approval and waits.
The desktop window shows the invocation and arguments.
Allow once forwards the original call. Block returns an error without invoking upstream.
If no decision is made before the configured timeout, the call is blocked.
Security notes
Review upstream commands and environment variables before enabling them.
Arguments may contain secrets or personal data. They are displayed locally but omitted from application logs.
Keep configuration private if it contains credentials.
MCP-Guard is an approval boundary, not a sandbox. An approved tool retains all permissions of its upstream server.
Use least-privilege credentials and trusted MCP servers.
Demo video
A demo video has not been recorded or uploaded yet. See demo/README.md for a short recording script covering an allowed call, a blocked call, and concurrent requests. Record with test data and attach the video to a GitHub Release.
Development
pip install -e .[dev]
pytest -qSee docs/architecture.md for the runtime design.
Current limitations
This release supports upstream stdio MCP servers; remote HTTP transports are not included.
Tool names are namespaced as
server__tool.Interactive approval requires a graphical desktop session.
Claude Web is covered only if its integration routes calls through this gateway.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Open-source MCP gateway with per-agent tool permissions, call approvals and tool-change review.
Safety gateway for MCP tools: checks every call, holds risky ones for approval, hides personal data
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to safely access upstream MCP servers through centralized policy enforcement, including allow/deny/approval decisions, schema pinning, circuit breakers, and audit logging.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to govern downstream tool servers by enforcing default-deny authority and attestation on every tool call, with live monitoring, approval, and mid-session revocation.3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceSits in front of any MCP server to enforce allow/ask/block policies on tool calls, paths, shell commands, and network domains, with local approval prompts and an audit log.MIT