flask-production-mcp
v0.1.0Static production-readiness auditor for Flask apps: architecture, templates, deployment, testing, security, database, dependencies and code quality.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
inspect_flask_project
Inspect a Flask application's structure and technology stack. Args: project_path: Absolute or relative path to the Flask project. Returns: Structured information about the discovered project.
| Parameter | Type | Description |
|---|---|---|
project_path * | string |
audit_flask
Audit a Flask application's architecture for production-readiness issues. Unlike ``inspect_flask_project`` (which only describes the application), this returns structured findings and a score. It currently detects explicitly enabled debug mode and duplicate route declarations. The project is inspected statically and is never imported or executed.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_architecture
Check a Flask project for architecture-level mistakes. Detects extensions bound to an app at import time, a module-level Flask() app competing with an app factory, hardcoded SECRET_KEY fallbacks, db.create_all() used instead of migrations, unguarded app.run(), and blueprints that are never registered. The project is inspected statically and is never imported or executed.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_templates
Audit a Flask project's Jinja/HTML templates. Detects state-changing forms with no CSRF field, autoescaping bypassed with ``| safe`` or ``{% autoescape false %}``, and ``url_for()`` calls that point at endpoints which do not exist. Templates are inspected as text; the project is never rendered.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_security
Audit a Flask project for common production security issues. This is the MCP boundary. Validation and analysis are delegated to the security-audit service.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_database
Analyze a Flask project's database architecture and performance. The underlying analyzer performs static AST analysis only. The target Flask application is never imported or executed. The response follows the standard audit shape (``success``, ``score``, ``summary``, ``findings``, ``recommendations``, ``errors``) plus the database-specific keys ``models``, ``queries``, ``raw_sql``, ``sqlalchemy_detected`` and ``flask_sqlalchemy_detected``.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_dependencies
Scan a Flask project's ``requirements*.txt`` files for dependencies with known vulnerabilities (via pip-audit / the PyPI and OSV advisory databases). The response adds ``manifests`` (files scanned) and ``scanned`` (False when no scan could run - no requirements file, pip-audit missing, or the advisory database was unreachable) so a clean result is never confused with an unchecked one. Requires network access. The project is never imported or executed.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_deployment
Check a Flask project's deployment configuration. Scans the Dockerfile, docker-compose, the Gunicorn config, a Procfile and entrypoint scripts for: containers running as root, the Flask development server used as the container command, debug mode enabled via the environment, secrets baked into an image or compose file, database ports published to the host, and Gunicorn auto-reload. Files are inspected as text; nothing is executed.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_testing
Assess whether a Flask project has an adequate test suite. Static only - the tests are never run. Reports: no suite at all, a low line-rate in an existing coverage.xml, and a test count that looks thin next to the number of routes. The project is inspected statically and is never imported or executed.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_code_quality
Analyze a Flask project's Python files for code-quality issues. The project is inspected statically and is never imported or executed. Virtual environments, caches and build directories are skipped. The response follows the standard audit shape (``success``, ``score``, ``summary``, ``findings``, ``recommendations``, ``errors``) plus ``files_analyzed``.
| Parameter | Type | Description |
|---|---|---|
project_path | string |
audit_flask_production
Run a complete production-readiness audit of a Flask application. This runs every analyzer (architecture, templates, security, database, dependencies, code quality) and returns a single report: - ``overall_score`` (confidence-weighted) and per-category ``score`` - ``production_ready`` with ``blocking_reasons`` - ``blockers`` (high-confidence critical/high - these gate a release), ``advisories`` (other critical/high/medium - need a judgement call), and ``notes`` (low/info cleanups) ``scan_dependencies`` / ``run_bandit`` default to the project's ``…
| Parameter | Type | Description |
|---|---|---|
project_path | string | |
run_bandit | ||
scan_dependencies |