Skip to main content

dole

summary & introduction

this package provides some helper classes needed for using fastmcp with azure authentication. in particular, fastmcp 2.12.5 has certain problems when trying to use the provided fastmcp.server.auth.AzureProvider with a py-key-value-aio RedisStore as described in the fastmcp documentation.

usage

from fastmcp import FastMCP
from dole.azure import azure_auth
from dole.health import add_health_endpoint, add_logging_health_filter

add_logging_health_filter()

tenant_id = 'my entra tenant id'
client_id = 'my entra app client id'
client_secret = '.......'
redis_host = 'redis'
redis_db = '0'
redis_port = '6379'
base_url = 'http://localhost:8000' # note that we do not include the mcp suffix
auth = azure_auth(
    tenant_id, client_id, client_secret, base_url,
    redis_host, redis_db, redis_port)

mcp = FastMCP(
    name="my-mcp-server",
    instructions="""
    """,
    auth=auth,
)
add_health_endpoint(mcp)

n.b., the following environment variables can also be used in lieu of parameters to azure_auth:

env var description
TENANT_ID the entra tenant id
CLIENT_ID found on the entra app registration overview
CLIENT_SECRET from the app registration certificates & secrets
REDIS_HOST the redis host or ip address
REDIS_PORT the redis port
REDIS_DB the redis db
BASE_URL the base url of the mcp server (without the /mcp suffix)
FERNET_ENCRYPTION_KEY the optional encryption key to encrypt values in redis

powered by angry penguins.

Metadata

Release files for dole 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dole 0.2
File Size Uploaded Provenance Actions
dole-0.2.tar.gz 6.9 kB Without provenance Details for dole-0.2.tar.gz

Release files / dole-0.2.tar.gz

Download URL dole-0.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
df40d465c1ca1caa3f93339b8831fb903fe6d6f36c6a300810ec2edf45822f37
BLAKE2b-256 checksum
How to use checksums
9fcab1e122441b5980688f0ac2629a5492e23cdf7161f8c7c6bfe1333f107fc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for dole 0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page