Smithery Python SDK
Build FastMCP servers with Smithery integration - adds session-scoped configuration, and seamless deployment to the Smithery platform.
Installation
# Recommended: using uv
uv add smithery
# Or using pip
pip install smithery
FastMCP Compatibility
When using with existing FastMCP servers, ensure you have compatible versions:
mcp>=1.6.0ORfastmcp>=2.0.0
Usage
from smithery import Server
from pydantic import BaseModel
class ConfigSchema(BaseModel):
debug: bool = False
@Server("My Server", config_schema=ConfigSchema)
def create_server():
pass
@create_server.tool()
def hello(name: str) -> str:
ctx = create_server.get_context()
config = ctx.session_config
# Access config using dot notation: config.debug
return f"Hello, {name}!" + (" (debug)" if config.debug else "")
if __name__ == "__main__":
create_server.run(transport="streamable-http")
For servers without config schema, just use @Server("My Server")
Configuration is passed via URL query parameters: http://localhost:8000/mcp?debug=true
CLI Commands
The SDK includes a CLI for development and testing:
# Initialize a new project
uvx smithery init
# Run server in development mode
uv run smithery dev
# Run server with playground for testing
uv run smithery playground
# Run with specific transport and port
uv run smithery dev --transport shttp --port 8080 --reload
See scaffold for a complete example
Metadata
Release files for smithery 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smithery-0.4.4.tar.gz | 17.4 kB | With provenance | Details for smithery-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smithery-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for smithery-0.4.4-py3-none-any.whl |
Total release size: 42.8 kB
Release files / smithery-0.4.4.tar.gz
| Download URL | smithery-0.4.4.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18ae19af8405e6476ca4984036d4460822ec1647ad2262addb4909d03387d671
|
|
BLAKE2b-256 checksum How to use checksums |
1e75d0b0fc1a5c10a20f3e01cefd98276ccbe7b44d74eeb6551bd2f42d8b4768
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.
Transparency logRelease files / smithery-0.4.4-py3-none-any.whl
| Download URL | smithery-0.4.4-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
883d060b3ecc73a2972019760e342f5a04b62edf18e3bc03594a41851319808a
|
|
BLAKE2b-256 checksum How to use checksums |
3054a088fa621c9c76a72a70079fac42b822137a1609ec08525168bd8e9f415d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.
Transparency logSecurity for smithery 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for smithery-0.4.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.