Metadata-Version: 2.4
Name: smithery
Version: 0.1.7
Summary: SDK for using Smithery with Python
Author-email: Smithery Team <contact@smithery.ai>
License-Expression: MIT
Project-URL: Homepage, https://github.com/smithery-ai/python-sdk
Project-URL: Bug Tracker, https://github.com/smithery-ai/python-sdk/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.13.1
Provides-Extra: dev
Requires-Dist: ruff==0.12.11; extra == "dev"

# Smithery Python SDK

FastMCP servers with session-scoped configuration support.

## Installation

```bash
pip install smithery
```

## Usage

```python
from smithery import from_fastmcp
from mcp.server.fastmcp import FastMCP
from pydantic import BaseModel

class ConfigSchema(BaseModel):
    debug: bool = False

server = from_fastmcp(FastMCP("My Server"), config_schema=ConfigSchema)

@server.tool()
def hello(name: str) -> str:
    ctx = server.get_context()
    config = ctx.session_config
    return f"Hello, {name}!" + (" (debug)" if config.get("debug") else "")

server.run(transport="streamable-http")
```

Configuration is passed via URL query parameters: `http://localhost:8000/mcp?debug=true`

See [scaffold](scaffold/) for a complete example with Docker support.
