Skip to main content

within-sdk (Python)

Within usage capture for Python MCP servers — official FastMCP, community FastMCP v2/v3, and low-level mcp servers.

from mcp.server.fastmcp import FastMCP
from within_sdk import track, WithinOptions, UserIdentity

server = FastMCP("acme")

track(server, "acme", WithinOptions(
    api_key=os.environ["WITHIN_SDK_API_KEY"],
    identify=lambda request, extra: UserIdentity(
        user_id=current_user_uuid(extra), user_name=None, user_data=None
    ),
))

The user identifier is hashed locally (SHA-256, byte-identical to the TypeScript SDK and the outcomes connector) before anything leaves the process; raw identifiers never go on the wire. Events publish to https://api.getwith.in/v1/ingest/events (override with WITHIN_SDK_INGEST_BASE_URL).

Forked from mcpcat-python-sdk (MIT).

Download files

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

Source Distribution

within_sdk-0.1.0.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

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

within_sdk-0.1.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file within_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: within_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 65.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.4

File hashes

Hashes for within_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 337f9a15a83725956d2420c721fd82eb3eab9d6fe20f9ef905c83d3798fa4c33
MD5 1ef63cd6a8b19e3d0c3d193051c420c6
BLAKE2b-256 33ebd88fbb8ae421c07e706893606d9623c2028220271d57d2d87622e8193295

See more details on using hashes here.

File details

Details for the file within_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: within_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 79.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.4

File hashes

Hashes for within_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 708d1e6dc90ab650685ea9bec5b10d98635445564e66a728da5458d982faabfc
MD5 7ea4091f9cd2b0676832c5744964e569
BLAKE2b-256 7ea06b22d281d22190a770fa43047e88f9574040bf619c1fd79705a5c47d0cd3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

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