Skip to main content

mcpbundles-mcp-connect

Python client library for MCP Connect Auth on MCPBundles.

  • connect_auth_callback_identity() — canonical get-user-info JSON from a verified FastMCP token
  • McpbundlesConnectProvider — FastMCP auth (interim package export until upstream FastMCP merge)
  • mcpbundles_fastmcp() — one-line FastMCP setup (auth + optional origin handshake telemetry)
  • complete_federation() — finish OAuth federation after your sign-in flow
  • McpbundlesHandshakeMiddleware — origin initialize cohort ingest when telemetry is enabled

Identity in tool callbacks

Connect Auth separates who signed in (sub, optional organization_id, email, roles) from which MCP client is calling (client_id). Pass email and roles in federation complete to mint them on access tokens.

In FastMCP tools, use connect_auth_callback_identity(get_access_token()) for the same JSON shape as the mcp-use get-user-info example. See Tool callback identity.

Path B — bundle URL only

Publish with MCP Connect Auth, set your federation sign-in URL, and have clients connect via https://mcp.mcpbundles.com/bundle/{slug}. No pip install required on your MCP server.

Path A — vendor origin (FastMCP)

from mcpbundles_mcp_connect import connect_auth_callback_identity, mcpbundles_fastmcp
from fastmcp.server.dependencies import get_access_token

mcp = mcpbundles_fastmcp(
    "My App",
    listing_slug="my-listing",
    base_url="https://mcp.example.com",
)

@mcp.tool
def get_user_info() -> dict:
    token = get_access_token()
    if token is None:
        return {"error": "Not authenticated"}
    return connect_auth_callback_identity(token)

After sign-in on your web app, complete federation server-side:

from mcpbundles_mcp_connect import complete_federation

await complete_federation(
    listing_slug="my-listing",
    federation_secret=os.environ["MCPBUNDLES_FEDERATION_SECRET"],
    state=state_from_redirect,
    subject=user_id,
    organization_id=organization_id,
    email=user_email,
    roles=user_roles,
)

Full setup guide: https://www.mcpbundles.com/docs/integrations/mcp-connect-auth

pip install mcpbundles-mcp-connect

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpbundles_mcp_connect-0.1.3.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcpbundles_mcp_connect-0.1.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file mcpbundles_mcp_connect-0.1.3.tar.gz.

File metadata

  • Download URL: mcpbundles_mcp_connect-0.1.3.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcpbundles_mcp_connect-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bda7891e6ab403150cceaf61b5a53afc78b441a506b74457c211e1a0e10504c9
MD5 2f50ca1414e464b879580fafa6d73daa
BLAKE2b-256 b8b2d1e229141df13a67f9b09a8f537125795e025c7938c36e1ddb23a21bd457

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpbundles_mcp_connect-0.1.3.tar.gz:

Publisher: release.yml on thinkchainai/mcpbundles-mcp-connect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcpbundles_mcp_connect-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcpbundles_mcp_connect-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4162d5164ed10ec7e04e4471f682c2d30bb41292a72dbad59b78f4a91c3cde
MD5 2c6ad57770b803af31c9d276d6312881
BLAKE2b-256 eb051197fae276ebcc1308e43169a3163d6627d552e22bc5ecb8147c18f9ce07

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpbundles_mcp_connect-0.1.3-py3-none-any.whl:

Publisher: release.yml on thinkchainai/mcpbundles-mcp-connect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.0

2 files

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