Metadata-Version: 2.4
Name: mcp-preflight
Version: 0.1.0
Summary: See what an MCP server exposes before you trust or connect it.
Author: jordanstarrk
License: MIT License
        
        Copyright (c) 2026 jordanstarrk
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/jordanstarrk/mcp-preflight
Project-URL: Repository, https://github.com/jordanstarrk/mcp-preflight
Project-URL: Issues, https://github.com/jordanstarrk/mcp-preflight/issues
Project-URL: Changelog, https://github.com/jordanstarrk/mcp-preflight/releases
Keywords: mcp,security,cli,ai,agents
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.26.0
Dynamic: license-file

# mcp-preflight

See what an MCP server exposes before you trust or connect it.

## TLDR

Run one command and get a quick capability + risk report for an MCP server (tools, resources, prompts).

## Install

Recommended (CLI):

```bash
pipx install mcp-preflight
```

Alternative:

```bash
pip install mcp-preflight
```

## Usage

```bash
mcp-preflight "uv run server.py"
```

### Quick “real server” smoke test

```bash
mcp-preflight "npx @modelcontextprotocol/server-filesystem /tmp"
```

### Other examples

```bash
mcp-preflight "npx my-mcp-server"
mcp-preflight "python3 /path/to/server.py"
```

### Save a report (JSON)

```bash
mcp-preflight --save report.json "uv run server.py"
```

### Diff two saved reports

```bash
mcp-preflight diff before.json after.json
```

### JSON output

```bash
mcp-preflight --json "uv run server.py"
```

### Example output

```text
my-server (MCP 2025-03-26)

  Note: this runs the server locally; it does not sandbox the process.

  Tools:
    🟢 list_items     "List all items in the database"
    🟢 get_item       "Get a single item by ID"
    🟡 create_item    "Create a new item"
    🟡 update_item    "Update an existing item"
    🔴 delete_item    "Permanently delete an item"

  Resources:
    📄 my-server://items
    📄 my-server://items/{id}

  Prompts:
    💬 analyze_items (project_name)

  Signals (heuristic):
    ⚠️  system prompt mention: prompt analyze_items
    (may be false positives/negatives)

  Notes:
    ℹ️  timeout: mcp list_resources

  Risk: 2 write, 1 destructive, 2 read-only
```

## Risk classification

Based on tool names and descriptions (conservative by default):

- 🟢 **read-only**: `get`, `list`, `search`, `read`, `fetch`, `find`, `show`, `view`
- 🟡 **write**: `create`, `add`, `update`, `set`, `send`, `write`, `upload`
- 🔴 **destructive**: `delete`, `remove`, `destroy`, `drop`, `purge`, `clear`, `reset`
- Unknown → 🟡 (assume write until proven otherwise)

## Non-goals

- No sandboxing
- No policy enforcement
- No runtime analysis

This tool inspects exposed MCP capabilities. It does not call tools (`call_tool`).

## Support

- Bugs / feature requests: `https://github.com/jordanstarrk/mcp-preflight/issues`
