# safenode mcp gateway

> Implement a secure proxy gateway to enforce policies, audit logs, and human-in-the-loop approvals for MCP tools.

safenode mcp gateway is a free AI agent skill on Agensi by Steve Peak, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Steve Peak](https://www.agensi.io/creators/steve-peak)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 1
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/safenode-mcp-gateway
- Tags: llm-ops, mcp, security, api-proxy, governance

## 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
1. **Inventory existing servers** by reading configuration files from Claude Desktop, Claude Code, or Cursor.
2. **Generate gateway configuration** including server definitions, fail modes, and data redaction levels.
3. **Perform dry runs** to verify what metadata is sent for policy evaluation without making actual network calls.
4. **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

- Safenode Gateway MCP
- Node.js

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the safenode mcp gateway skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Why should I use a proxy gateway instead of just telling my AI agent to be careful?

Standard agents have direct access to tools, making them prone to 'hallucinating' dangerous actions. This gateway acts as a mandatory structural proxy that intercepts every tool call, ensuring they follow your specific safety policies before they can execute.

### Which AI agents and MCP servers is this gateway compatible with?

The SafeNode MCP Gateway is compatible with any MCP-compliant host, including Claude Desktop, Claude Code, and Cursor, and can manage multiple MCP servers (filesystem, database, or API) through a single centralized proxy.

### How difficult is it to set up the gateway for my existing MCP tools?

Setup involves three main steps: scanning your existing server configurations, generating a gateway config file with your desired safety rules, and updating your client settings to route traffic through the proxy.

### What happens if the policy evaluation service goes offline?

By default, you can configure 'fail-safe' modes that automatically block any tool execution if the safety API is unreachable, ensuring your system never defaults to an unprotected state.

### Can I prevent sensitive data from leaving my local environment during the safety check?

Yes, the gateway includes a local redaction feature that allows you to scrub PII or secrets from tool arguments before the metadata is ever sent for policy evaluation.

### Does this skill include a SafeNode API subscription?

This skill provides the implementation logic and configuration templates to deploy the gateway; however, you will need a SafeNode API key and an active internet connection to perform the actual policy evaluations.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
