Skip to main content

SDK Overview

MCPulse provides official SDKs for easy integration with your MCP servers. Choose the SDK that matches your server's language.

Available SDKs

MCPulse Proxy (Zero-Code Solution)

Transparent analytics proxy for any MCP server - no code changes required!

  • Package: mcpulse-proxy
  • Install: go install github.com/sirrobot01/mcpulse-proxy@latest
  • GitHub: mcpulse-proxy

Features:

  • Zero code changes needed
  • Works with any MCP server (Python, TypeScript, Go, etc.)
  • Multi-transport support (stdio, HTTP, SSE)
  • Automatic metric collection
  • Config file support for easy setup
  • Perfect for Claude Desktop integration

Quick Example:

{
"mcpServers": {
"my-server": {
"command": "mcpulse-proxy",
"args": [
"stdio",
"--server-id", "my-server",
"--command", "python server.py"
],
"env": {
"MCPULSE_URL": "localhost:50051",
"MCPULSE_API_KEY": "your-api-key"
}
}
}
}

Use Case: Perfect for adding analytics to existing MCP servers without modifying code, or when you don't control the server source code.


Python SDK

Official Python SDK with decorator-based tracking and async support.

  • Package: mcpulse
  • Install: pip install mcpulse
  • GitHub: mcpulse-python Features:
  • Decorator-based tracking
  • Async/sync support
  • Automatic buffering
  • Session management
  • Query API client

Quick Example:

from mcpulse import AnalyticsTracker, Config

config = Config(
server_id="my-mcp-server",
grpc_endpoint="localhost:9090",
api_key="your-api-key"
)
tracker = AnalyticsTracker(config)

@tracker.track_tool_call("calculate")
def calculate(a: float, b: float):
return a + b

Go SDK

High-performance Go SDK with middleware pattern and streaming support.

  • Package: github.com/sirrobot01/mcpulse-go
  • Install: go get github.com/sirrobot01/mcpulse-go
  • GitHub: mcpulse-go Features:
  • Middleware pattern
  • gRPC and REST transport
  • Zero-allocation hot path
  • Streaming ingestion
  • Real-time metric streaming

Quick Example:

config := mcpulse.DefaultConfig("my-mcp-server")
config.GRPCEndpoint = "localhost:9090"
config.APIKey = "your-api-key"

middleware, _ := mcpulse.NewMiddleware(ctx, config)
defer middleware.Close(ctx)

result, _ := middleware.TrackToolCall(ctx, "calculate", params, func(ctx context.Context, params map[string]interface{}) (interface{}, error) {
return params["a"].(int) + params["b"].(int), nil
})

MCPulse MCP Server

An MCP server that provides analytics tools for querying MCPulse data directly from any MCP client.

  • Package: mcp-mcpulse
  • Install: go install github.com/sirrobot01/mcp-mcpulse@latest
  • GitHub: mcp-mcpulse Features:
  • Query MCPulse from Claude or any MCP client
  • List servers and view metrics
  • Get tool statistics and timelines
  • Browse errors and sessions
  • Built with official MCP Go SDK

Use Case: Ask Claude questions like "Show me metrics for my-server in the last 24 hours" and get analytics data directly from MCPulse.


TypeScript SDK (Coming Soon)

Official TypeScript/JavaScript SDK for Node.js and browser environments.

  • Package: @mcpulse/sdk (coming soon)
  • Install: npm install @mcpulse/sdk

Planned Features:

  • Promise-based API
  • TypeScript support
  • Browser and Node.js compatibility
  • Automatic batching
  • Session tracking

Direct HTTP/gRPC Integration

For languages without an official SDK, you can integrate directly using HTTP or gRPC.

For languages without an official SDK, you can send metrics directly via HTTP or gRPC.

HTTP Example:

curl -X POST http://localhost:8080/api/v1/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metrics": [{
"id": "metric-1",
"timestamp": "2025-10-10T10:30:00Z",
"server_id": "my-server",
"tool_name": "calculate",
"duration_ms": 42,
"status": "success"
}]
}'

Common Features

All SDKs provide:

  • Automatic buffering - Metrics are batched for efficient ingestion
  • Parameter sanitization - Sensitive data is automatically redacted
  • Retry logic - Failed requests are retried with exponential backoff
  • Session tracking - Group tool calls into sessions
  • Error capture - Exceptions are automatically recorded
  • Sampling - Control metric collection with sample rates

Getting Started

  1. Choose your SDK based on your MCP server language
  2. Install the SDK using your package manager
  3. Get an API key from the MCPulse dashboard
  4. Integrate tracking into your tool handlers
  5. View metrics in the MCPulse dashboard

SDK Documentation

Direct Integration

For direct HTTP/gRPC integration without an SDK, see the examples in each SDK repository.

Contributing

Want to contribute an SDK for another language?

  1. Implement the core functionality
  2. Add tests and examples
  3. Submit a pull request

We'd love SDKs for:

  • Rust
  • Java/Kotlin
  • Ruby
  • PHP
  • C#

See Contributing Guide for details.