Metadata-Version: 2.4
Name: mcp-bastion-fastmcp
Version: 0.1.0
Summary: MCP-Bastion security middleware for FastMCP servers. Prompt injection, PII, and rate-limit protection.
Project-URL: Homepage, https://github.com/vaquarkhan/MCP-Bastion
Project-URL: Repository, https://github.com/vaquarkhan/MCP-Bastion
Author: Viquar Khan
License-Expression: MIT
Keywords: bastion,fastmcp,llm,mcp,mcp-server,pii,prompt-injection,security
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.10
Requires-Dist: mcp-bastion-python>=1.0.11
Requires-Dist: mcp>=1.0.0
Description-Content-Type: text/markdown

# mcp-bastion-fastmcp

Security middleware for FastMCP servers powered by [MCP-Bastion](https://pypi.org/project/mcp-bastion-python/).

Protect any FastMCP server from prompt injection, PII leakage, and resource exhaustion with a single import.

## Install

```bash
pip install mcp-bastion-fastmcp
```

## Usage

```python
from mcp.server.fastmcp import FastMCP
from mcp_bastion_fastmcp import secure_fastmcp

mcp = FastMCP("My Secure Server")

# Add MCP-Bastion security to your server
secure_fastmcp(mcp)

@mcp.tool()
def get_weather(city: str) -> str:
    return f"Weather in {city}: 22C, sunny"

if __name__ == "__main__":
    mcp.run(transport="streamable-http")
```

## What it protects

- Scans all tool inputs for prompt injection
- Rate limits per session (15 calls, 60s timeout)
- Content filtering on inputs and outputs

## License

MIT
