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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
337f9a15a83725956d2420c721fd82eb3eab9d6fe20f9ef905c83d3798fa4c33
|
|
| MD5 |
1ef63cd6a8b19e3d0c3d193051c420c6
|
|
| BLAKE2b-256 |
33ebd88fbb8ae421c07e706893606d9623c2028220271d57d2d87622e8193295
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
708d1e6dc90ab650685ea9bec5b10d98635445564e66a728da5458d982faabfc
|
|
| MD5 |
7ea4091f9cd2b0676832c5744964e569
|
|
| BLAKE2b-256 |
7ea06b22d281d22190a770fa43047e88f9574040bf619c1fd79705a5c47d0cd3
|