GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Pranav63/mcpguard

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
examples/claude-desktop
examples/claude-desktop
 
 
mcpshield
mcpshield
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
Architecture.md
Architecture.md
 
 
README.md
README.md
 
 
config.yaml.example
config.yaml.example
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

MCPShield

A security proxy for the Model Context Protocol (MCP). Sits between your AI agent and MCP tool servers, inspecting every tool call for secrets and policy violations in real time.

How It Works

AI Agent → MCPShield (:4444) → MCP Server
                ↓
          secret detection
          policy enforcement
          audit log

Requests and responses are scanned. Violations are blocked before they reach the upstream server.

Detects

Pattern Examples
Known credentials AWS keys, GitHub tokens, OpenAI/Anthropic keys, GCP API keys, Stripe live keys
Private keys RSA, EC, OpenSSH PEM blocks
Tokens JWTs
Unknown secrets High-entropy strings via Shannon entropy scoring

Actions

Rule match Action
Known credential Block — JSON-RPC error returned, upstream never called
JWT / high-entropy Flag — allowed through, logged as warning

Quickstart

1. Clone and install

git clone https://github.com/yourhandle/mcpshield
cd mcpshield
pip install -e .

2. Configure your upstream MCP server

# config.yaml
proxy:
  host: "127.0.0.1"
  port: 4444

upstream:
  url: "http://localhost:3000"  # your MCP server

3. Run from the project root

# must be run from repo root where config.yaml lives
python -m mcpshield

Proxy is live at http://127.0.0.1:4444. Point your AI agent or Claude Desktop here instead of your MCP server directly.

Test It

Secret blocked:

curl -s -X POST http://127.0.0.1:4444 \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "write_file",
      "arguments": {"content": "key=AKIAIOSFODNN7EXAMPLE"}
    }
  }' | jq

Expected response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32600,
    "message": "Detected 'aws_access_key' in method=tools/call. Request blocked."
  }
}

Clean request (proxied through):

curl -s -X POST http://127.0.0.1:4444 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | jq

Run Tests

pip install -e ".[dev]"
pytest tests/ -v

Architecture

See ARCHITECTURE.md for transports (HTTP + stdio), policy pipeline, and session taint.

stdio mode (Claude Desktop / Cursor):

cp config.yaml.example config.yaml
# set upstream.command / upstream.args and taint.enabled
python -m mcpshield stdio

Roadmap

  • Week 1: Transparent proxy with real-time secret detection
  • Week 2: Policy-as-config, PII detection, redaction
  • Week 3: Session-level taint propagation (v1, in-memory)
  • Week 4: Audit dashboard

Contributing

Pattern contributions welcome — add detection rules to mcpshield/detectors/secrets.py and open a PR.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.