Works with the AI Agents you already use
safenode mcp gateway
Implement a secure proxy gateway to enforce policies, audit logs, and human-in-the-loop approvals for MCP tools.
Free
safenode mcp gateway
Example session with this skill installed
I need to secure my filesystem and github MCP tools in Claude Desktop. How do I set up the SafeNode gateway to block dangerous writes but allow read-only tools to fail open?
- Read your context and instructions
- Compiled the safenode mcp gateway
I will now generate the configuration for the SafeNode MCP Gateway and explain how to update your Claude Desktop settings.
SafeNode Gateway Configuration
{
"failMode": "fail_closed",
"payloadMode": "redacted",
"logFile": "./safenode-decisions.jsonl",
"servers": [
{
"name": "filesystem",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/admin/projects"]
},
{
"name": "github",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here" }
}
],
"tools": {
"read_file": { "failMode": "fail_open" },
"list_files": { "failMode": "fail_open" },
"search_repositories": { "failMode": "fail_open" }
}
}
Next steps
- Create a
safenode-gateway.jsonfile using the configuration above, ensuring you use absolute paths for the directories and log files. - Update your
claude_desktop_config.jsonby replacing thefilesystemandgithubentries with a singlesafenodeentry pointing tonpx safenode-mcp-gateway. - Add your
SAFENODE_API_KEYto your system environment variables and restart Claude Desktop to activate enforcement.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop worrying about agents executing dangerous shell commands or deleting database records without oversight. Standard AI agents have direct, unguarded access to your MCP tools, making it impossible to enforce organizational policies or maintain an audit trail.
This skill implements the SafeNode MCP Gateway, a proxy that sits between your agent client and its MCP servers. It evaluates every tool call against your defined policies before execution. If a tool call is risky, the gateway blocks it or holds it for human review. Because it functions as a proxy rather than a tool itself, the agent cannot choose to bypass the check.
What it does
- Enforce guardrails by intercepting tool calls and applying allow, warn, review, or deny logic.
- Configure fail-safe modes to ensure tool calls are blocked by default if the safety API is unreachable.
- Redact sensitive data from tool arguments to ensure PII or secrets never leave your local environment.
- Generate audit logs that record every tool decision and execution attempt for compliance tracking.
- Proxy multiple servers through a single gateway to centralize security across filesystem, database, and API tools.
How it works
- Inventory existing servers by reading configuration files from Claude Desktop, Claude Code, or Cursor.
- Generate gateway configuration including server definitions, fail modes, and data redaction levels.
- Perform dry runs to verify what metadata is sent for policy evaluation without making actual network calls.
- Update client configuration to route all MCP traffic through the proxy for mandatory enforcement.
Frameworks & tools
This skill requires Node.js 18 or newer and uses the safenode-mcp-gateway package. It works with any MCP-compliant host including Claude Desktop, Claude Code, and Cursor.
Why this beats prompting it yourself
Manual prompts asking an agent to "be safe" are easily ignored or bypassed by the model. This skill implements a structural proxy that the agent cannot circumvent, providing a hard boundary that functions even if the model is compromised or confused.
Use cases
- Restrict filesystem access to specific project directories while blocking system-level modifications.
- Require human approval for destructive operations like database drops or production deployments.
- Audit agent activity across team-wide shared tools to maintain security compliance.
Known limitations
Requires an active internet connection for policy evaluation and a SafeNode API key. It is not a code sandbox or a prompt injection detector. Policy evaluations count against a monthly API quota.
Requires Node 18+, internet access for API checks, and a SafeNode account. Does not provide a sandbox environment or detect prompt injection. Call latency is subject to a 5s API timeout.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 1 month ago
- Free with an Agensi account
Requires
Permissions
File Scopes
Reads your existing MCP client config to find your servers, writes safenode-gateway.json, and replaces those entries with a single gateway entry (backing up the original first). Uses the terminal to check Node and dry-run the gateway, which shows exactly what would be sent before anything is. Network access is for npx and the SafeNode policy API. Your API key stays in an environment variable and is never written to a file or requested in chat.