Get the FREE Ultimate OpenClaw Setup Guide โ†’

mcpsec

An AI-driven dynamic protocol fuzzer for the Model Context Protocol (MCP). Prove runtime exploitability by discovering state violations, transport crashes, and application-layer logic flaws (SSRF, LFI) before your AI agents do.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio manthanghasadiya-mcpsec python -m mcpsec \
  --env MCPSEC_AI_PROVIDER="Optional: AI provider configuration for AI-powered features" \
  --env MCPSEC_OUTPUT_FORMAT="Optional: default output (json, sarif, etc.)"

How to use

mcpsec is a security scanner and protocol fuzzer designed to assess and exploit MCP servers in a controlled way. It connects to live MCP servers, enumerates their attack surface, and runs a suite of security scanners to identify potential weaknesses. The tool also generates fuzz cases to probe the server behavior under varied inputs, and it offers AI-assisted payload mutations and exploitation workflows to validate findings. Typical workflows include scanning a local or remote MCP server via stdio or HTTP, fuzzing with various intensities, and auditing code or repositories for MCP-related security issues. You can use mcpsec to assemble an evidence-based security assessment with PoC payloads and structured reports. The CLI supports multiple modes such as scan, fuzz, audit, sql, chains, exploit, and rogue-server, enabling a comprehensive security evaluation of MCP-based tools.

How to install

Prerequisites:

  • Python 3.11 or newer
  • pip (comes with Python)
  1. Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # on Unix/macOS
venv\Scripts\activate.bat # on Windows
  1. Install mcpsec from PyPI:
pip install mcpsec
  1. (Optional) Install AI features and providers:
pip install 'mcpsec[ai]'
  1. Verify installation:
mcpsec --help
  1. Run the MCP server using the Python module interface:
python -m mcpsec --help

Additional notes

Tips and notes:

  • Environment variables can customize AI provider usage and output formats; consult the package documentation for supported providers and options.
  • Ensure network access to the target MCP server when using --stdio or --http modes.
  • For large fuzz campaigns, consider using high-intensity settings carefully to avoid overloading the target.
  • When auditing GitHub repositories, you can point mcpsec audit to external sources and optionally enable AI validation for findings.
  • If you encounter permission or path issues, verify your Python environment and that the mcpsec CLI is on your PATH after installation.

Related MCP Servers

mcp-for-security

558

MCP for Security: A collection of Model Context Protocol servers for popular security tools like SQLMap, FFUF, NMAP, Masscan and more. Integrate security testing and penetration testing into AI workflows.

mcp

109

๐Ÿค– Taskade MCP ยท Official MCP server and OpenAPI to MCP codegen. Build AI agent tools from any OpenAPI API and connect to Claude, Cursor, and more.

symfony

26

A Symfony package designed for building secure servers based on the Model Context Protocol, utilizing Server-Sent Events (SSE) and/or StreamableHTTP for real-time communication. It offers a scalable tool system tailored for enterprise-grade applications.

shodan

13

Shodan MCP server for Claude, Cursor & VS Code. 20 tools for passive reconnaissance, CVE/CPE intelligence, DNS analysis, and device search. 4 tools work free without an API key. OSINT and vulnerability research from your IDE.

nmap

9

MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.

MCPlex-AI-v1.0

7

๐— ๐—ผ๐—ฑ๐—ฒ๐—น ๐—–๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜ ๐—ฃ๐—ฟ๐—ผ๐˜๐—ผ๐—ฐ๐—ผ๐—น (๐— ๐—–๐—ฃ) ๐—•๐—ฎ๐˜€๐—ฒ๐—ฑ ๐—–๐—Ÿ๐—œ ๐—”๐—œ | ๐—ง๐—ผ๐—ผ๐—น ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป | ๐—š๐—ฒ๐—บ๐—ถ๐—ป๐—ถ ๐Ÿฎ.๐Ÿฌ

Sponsor this space

Reach thousands of developers โ†—