MCP Server Integration

Connect Mustel to your AI IDE in 30 seconds. A single JSON configuration block provides instant Python static analysis guardrails inside your agent chat loop.

The Auto-Setup Prompt (Fastest)

Copy and paste this guided instruction prompt directly into Cursor Chat, Claude Code, or Windsurf. Your AI agent will automatically configure the MCP server and run the installation:

Please set up the Mustel static analysis MCP server in this workspace:

1. Run `pip install mustel` to install the linter core.

2. Locate or create the MCP configuration file for this editor environment.

3. Add a new server named "mustel" with command "mustel" and args ["serve"] under "mcpServers".

4. Confirm once the server is successfully registered.

Manual Installation Setup

1

Install Mustel core dependency

Install the PyPI package globally or directly inside your active virtual environment.

terminal
pip install mustel
2

Configure your AI editor settings

.cursor/mcp.json
{  "mcpServers": {    "mustel": {      "command": "mustel",      "args": ["serve"],      "description": "Python bug and security detection"    }  }}
💡 Note: Place in your project root or global Cursor config.
3

Start coding with guardrails

Your AI editor will communicate with the MCP server over stdio. Scans will run silently in the background on every file save to alert the agent to errors or security anti-patterns immediately.

Exposed MCP Server Tools

AI agents can invoke the following tools exposed by the Mustel server to read codebase maps and scan files:

review

Arguments:path (optional)
Returns:Full JSON scan report

review_file

Arguments:file_path
Returns:Single-file scan report

env

Arguments:None
Returns:Python version, venv status, pip info

check_package

Arguments:package_name
Returns:Availability, version, vulnerability status
Created & maintained by the authors.