MCP (Model Context Protocol) server that exposes CytoScnPy's Python static analysis capabilities to LLMs like Claude, GPT, GitHub Copilot, and other AI assistants.
The Model Context Protocol is an open standard that allows AI assistants to use external tools. This server enables LLMs to analyze Python code for:
- Unused code - Functions, classes, imports, variables
- Secrets - Hardcoded API keys, passwords, tokens
- Dangerous patterns -
eval,exec, SQL injection - Code quality - Cyclomatic complexity, maintainability index
The MCP server is available in the standalone CLI binary:
# Install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/djinn-soul/CytoScnPy/main/install.sh | bash
# Run MCP server (standalone CLI)
cytoscnpy mcp-serverThe Python cytoscnpy package does not run mcp-server.
Install the CytoScnPy VS Code extension. It automatically registers the MCP server with GitHub Copilot—no manual configuration required.
Linux / macOS:
# Install
curl -fsSL https://raw.githubusercontent.com/djinn-soul/CytoScnPy/main/install.sh | bash
# Start MCP server
cytoscnpy mcp-serverWindows (PowerShell):
# Install
irm https://raw.githubusercontent.com/djinn-soul/CytoScnPy/main/install.ps1 | iex
# Start MCP server (after restarting terminal)
cytoscnpy mcp-servercargo build --release -p cytoscnpy-cli
# Run MCP server
./target/release/cytoscnpy-cli mcp-serverAdd to your claude_desktop_config.json:
{
"mcpServers": {
"cytoscnpy": {
"command": "cytoscnpy",
"args": ["mcp-server"]
}
}
}Add to Cursor's MCP settings:
{
"cytoscnpy": {
"command": "cytoscnpy",
"args": ["mcp-server"]
}
}The VS Code extension automatically registers the MCP server. Just install the extension and ask Copilot:
"Run a quick security scan on this file using CytoScnPy"
| Tool | Description | Parameters |
|---|---|---|
analyze_path |
Full analysis on files/directories | path, scan_secrets, scan_danger, check_quality |
analyze_code |
Analyze code snippet directly | code, filename |
quick_scan |
Fast security scan (secrets & dangerous patterns) | path |
cyclomatic_complexity |
Calculate complexity metrics | path |
maintainability_index |
Calculate MI scores (0-100) | path |
Quick security scan:
{
"tool": "quick_scan",
"arguments": {
"path": "/home/user/myproject"
}
}Full analysis:
{
"tool": "analyze_path",
"arguments": {
"path": "/home/user/myproject",
"scan_secrets": true,
"scan_danger": true,
"check_quality": true
}
}Analyze code snippet:
{
"tool": "analyze_code",
"arguments": {
"code": "def unused():\n pass\n\ndef main():\n print('hello')\n",
"filename": "example.py"
}
}┌─────────────────────┐
│ Claude / Copilot │
│ (MCP Client) │
└──────────┬──────────┘
│ JSON-RPC over stdio
▼
┌─────────────────────┐
│ cytoscnpy │
│ mcp-server │
└──────────┬──────────┘
│ Direct Rust function calls
▼
┌─────────────────────┐
│ cytoscnpy library │
│ (Core analysis) │
└─────────────────────┘
HTTP/SSE transport is planned for remote LLM integrations. See roadmap.md for details.
Apache-2.0