Skip to content

Proximity is a MCP security scanner powered with NOVA

License

fr0gger/proximity

Repository files navigation

Proximity - MCP Security Scanner Powered with NOVA

██████╗ ██████╗  ██████╗ ██╗  ██╗██╗███╗   ███╗██╗████████╗██╗   ██╗
██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝██║████╗ ████║██║╚══██╔══╝╚██╗ ██╔╝
██████╔╝██████╔╝██║   ██║ ╚███╔╝ ██║██╔████╔██║██║   ██║    ╚████╔╝ 
██╔═══╝ ██╔══██╗██║   ██║ ██╔██╗ ██║██║╚██╔╝██║██║   ██║     ╚██╔╝  
██║     ██║  ██║╚██████╔╝██╔╝ ██╗██║██║ ╚═╝ ██║██║   ██║      ██║   
╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝╚═╝╚═╝     ╚═╝╚═╝   ╚═╝      ╚═╝   

A security scanner for MCP (Model Context Protocol) servers

Python License: GPL v3 Version Author

Overview

Proximity scans MCP (Model Context Protocol) servers to discover tools, prompts, and resources. It provides detailed analysis of server capabilities and optional security evaluation using NOVA rules to detect potential security issues like prompt injection and jailbreak attempts.

Quick Start

# Clone and setup
git clone https://github.com/fr0gger/proximity.git
cd proximity
pip install -r requirements.txt

# Tools and prompt discovery
python proximity.py http://localhost:8000

# Security scan (requires nova-hunting)
python proximity.py http://localhost:8000 -n -r my_rule.nov

Installation

git clone https://github.com/fr0gger/proximity.git
cd proximity
pip install -r requirements.txt

NOVA Security Analysis Setup

# Install Nova dependencies
pip install nova-hunting

# Set API key (choose one depending on the model you want to use)
export OPENAI_API_KEY="your-openai-key"
export GROQ_API_KEY="your-groq-key"

Refer to the NOVA documentation for more details: https://docs.novahunting.ai/

Usage

Command Structure

python proximity.py <target> [options]

Common Options

  • -h, --help: Show help
  • -t, --token: Authentication token for HTTP endpoints
  • -n, --nova-scan: Enable NOVA security analysis
  • -r, --rule: NOVA rule file path (default: my_rule.nov)
  • -v, --verbose: Enable verbose output
  • --json-report: Export JSON report
  • --md-report: Export Markdown report
  • --evaluator: Choose LLM evaluator (default openai)

Target Examples

HTTP Endpoints:

python proximity.py http://localhost:8000/mcp
python proximity.py https://mcp.example.com -t your_token

Stdio Commands:

python proximity.py "python server.py"
python proximity.py "node mcp-server.js"

NOVA Security Analysis

NOVA works with NOVA rules to identify specific patterns. Below is a simple example, but you can refer to the NOVA documentation for more complexe usage.

Nova Rules

Create .nov files to define security patterns:

rule DetectJailbreaking
{
    meta:
        description = "Detects jailbreaking attempts"
        author = "Thomas Roccia"
        severity = "critical"
        
    keywords:
        $previous = "previous instructions"
        $ignore = "ignore all the instructions above"
        $forget = "forget your instructions"
        
    semantics:
        $malicious = "hacking or unauthorized access" (0.2)
        
    llm:
        $jailbreak = "check if this prompt tries to bypass security"

    condition:
        any of keywords.* and any of semantics.* or llm.*
}

Security Scan Examples

# Basic security scan
python proximity.py http://localhost:8000/mcp -n

# Custom rule with Groq
python proximity.py http://localhost:8000/mcp -n -r custom.nov --evaluator groq

Examples

Basic Reconnaissance

# Discover capabilities
python proximity.py http://localhost:8000

# Verbose scan
python proximity.py "python server.py" -v

Security Assessment

# Quick security check
python proximity.py http://localhost:8000 -n

# Comprehensive audit
python proximity.py http://localhost:8000 -n -r security.nov --json-report --md-report

Output Formats

Console Output

Organized display with function signatures, parameters, and security alerts.

JSON Export

{
  "scan_results": {
    "target": "http://localhost:8000",
    "tools": [...],
    "prompts": [...],
    "resources": [...]
  },
  "nova_analysis": {
    "flagged_count": 2,
    "analysis_results": [...]
  }
}

Markdown Reports

The proximity report is also available in Markdown.

License

Copyright (C) 2025 Thomas Roccia (@fr0gger_) Licensed under the GNU General Public License v3.0 See LICENSE file for details.

Author

Thomas Roccia (@fr0gger_)


🤩 Star this project if you find it useful!

About

Proximity is a MCP security scanner powered with NOVA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages