This is an example of a Python Worker that uses the FastMCP package.
Note
Due to the size of the Worker, this example can only be deployed if you're using the Workers Paid plan. Free plan users will encounter deployment errors because this Worker exceeds the 3MB size limit.
To develop your Worker run:
uv run pywrangler devTo deploy your Worker run:
uv run pywrangler deployTo test run:
uv run pytest testsThis project uses Ruff for linting and formatting:
uv ruff format . --check
uv ruff check .To have good autocompletions in your IDE simply select .venv-workers/bin/python as your IDE's interpreter.