Share a single MCP client
Instantiate the official SDK once and pass the client handle to each assistant. Centralizing credentials reduces the blast radius of a leaked token.
Create a shared MCP client
import { createMcpClient } from "@sourceparts/mcp-sdk";
const client = createMcpClient({
apiKey: process.env.SOURCEPARTS_API_KEY!,
});