About Guard
Guard is an MCP server published by General-Analysis in the Finance category: mCP Guard secures your MCP client from prompt injection attacks and more.
The repository has 57 stars and 5 forks, with the last commit 4 months ago. Recent commit activity is the strongest signal that reported issues will get attention.
Install
git clone https://github.com/General-Analysis/mcp-guardThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Guard
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 21 hours ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
1 check has not been run yet.
Releases
README

MCP Guardrail
An MCP (Model Context Protocol) guardrail with built-in AI-powered moderation that aggregates multiple MCP servers into one secure interface.
Overview
The MCP Guardrail provides AI-powered security and easy configuration for your MCP (Model Context Protocol) setup. It automatically detects your existing MCP configuration files and adds a protective layer with intelligent moderation capabilities.
Key features:
- AI-powered moderation to prevent prompt injection attacks
- Automatic configuration - CLI tool detects and updates MCP config files for Cursor, Claude Desktop, and Claude Code
- Dual connectivity - supports both local and remote MCP servers
- Transparent proxying - tools, prompts, and resources are automatically prefixed and made available
Quick Start
The easiest way to get started is using the General Analysis CLI tool:
# Install the CLI tool
pip3 install generalanalysis==0.1.7
# Login to your account
ga login
# Configure MCP settings for Cursor, Claude Desktop, and Claude Code
ga configure
This will automatically update your MCP configuration files with the guardrail setup.
How It Works
graph LR
A[MCP Client] --> B[MCP Guard]
B --> C[MCP Server]
C --> D[Tool Output]
D --> B
B --> E{GA Guardrail}
E -->|Safe| A
E -->|Blocked| F[Alert]
Usage
Direct Usage with npx
No installation required! Use directly in your Cursor or Claude Desktop MCP configuration:
{
"mcpServers": {
"protected_server": {
"command": "npx",
"args": [
"-y",
"@general-analysis/mcp-guard",
"[{\"name\":\"server1\",\"command\":\"path/to/server\",\"args\":[\"arg1\"]}]"
]
}
}
}
Standalone Usage
npx -y @general-analysis/mcp-guard '[{"name":"server1","command":"path/to/server","args":["arg1"]}]'
Configuration
Local Servers (Stdio)
For local MCP servers that communicate via stdio:
{
"mcpServers": {
"protected_server": {
"command": "npx",
"args": [
"-y",
"@general-analysis/mcp-guard",
"[{\"name\":\"my-local-server\",\"command\":\"node\",\"args\":[\"path/to/server.js\"]}]"
],
"env": {
"API_KEY": "your-general-analysis-api-key",
"ENABLE_GUARD_API": "true"
}
}
}
}
Remote Servers (HTTP/SSE)
For remote MCP servers accessible via HTTP or Server-Sent Events:
{
"mcpServers": {
"protected_server": {
"command": "npx",
"args": [
"-y",
"@general-analysis/mcp-guard",
"[{\"name\":\"my-remote-server\",\"url\":\"https://api.example.com/mcp\"}]"
],
"env": {
"API_KEY": "your-general-analysis-api-key",
"ENABLE_GUARD_API": "true"
}
}
}
}
Environment Variables
API_KEY- Your General Analysis API key for the moderation serviceENABLE_GUARD_API- Set to"true"to enable AI-powered moderation (requires API_KEY)
Complete Example for Cursor/Claude Desktop
Add this to your MCP configuration file:
{
"mcpServers": {
"guardrail": {
"command": "npx",
"args": [
"-y",
"@general-analysis/mcp-guard",
"[{\"name\":\"local-filesystem\",\"command\":\"npx\",\"args\":[\"@modelcontextprotocol/server-filesystem\",\"/path/to/files\"]},{\"name\":\"remote-api\",\"url\":\"https://api.example.com/mcp\"}]"
],
"env": {
"API_KEY": "your-general-analysis-api-key",
"ENABLE_GUARD_API": "true"
}
}
}
}
Standalone Command Line Example
# Set environment variables
export API_KEY="your-general-analysis-api-key"
export ENABLE_GUARD_API="true"
# Run with mixed local and remote servers
npx -y @general-analysis/mcp-guard '[
{
"name": "local-filesystem",
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/path/to/files"]
},
{
"name": "remote-api",
"url": "https://api.example.com/mcp"
}
]'
Requirements
- Node.js >= 18.0.0
- Valid General Analysis API key (when moderation is enabled)
License
MIT
README fetched from the repository 21 hours ago. The original is authoritative.