contextpulse
Back to Docs Overview
SDKs

Python SDK

Complete reference for the contextpulse PyPI package.

Python SDK Usage

The Python SDK supports FastMCP, standard Python MCP servers, asyncio transports, and stdio/SSE connections.

FastMCP Integration
import os
from contextpulse import with_contextpulse
from mcp.server.fastmcp import FastMCP

app = FastMCP("my-service")

# Telemetry is enabled in 1 line
wrapped_app = with_contextpulse(
    app,
    api_key=os.environ["CONTEXTPULSE_KEY"],
    service="my-service",
    redact_keys=["auth_token", "ssn", "secret_passphrase"]
)