Developer Tools

TypeScript SDK usage

Use the Source Parts SDK for structured TypeScript bindings, automatic retries, and observability hooks.

Install and initialize

Install `@sourceparts/mcp-sdk` and create a single client per runtime. The SDK manages retries, backoff, and JWT refresh for you.

import { createMcpClient } from "@sourceparts/mcp-sdk";

const client = createMcpClient({
  apiKey: process.env.SOURCEPARTS_API_KEY!,
});

Instrument your calls

Register the `onEvent` hook to stream usage metrics into your observability stack. The SDK publishes timing, rate-limit, and error events.

Source Parts MCP TypeScript SDK