Installation

Requirements, packages, and quickstart

Install MCPeek server/client SDKs and configure the shared AnalyticsConfig used by both integrations.

Requirements

  • - Node.js v20+
  • - pnpm
  • - An MCP server using StreamableHTTPServerTransport
  • - A ChatGPT app widget context with window.openai available
  • - A valid MCPeek API key and organization ID (requires subscription)

Install Packages

Server + client SDK

terminal
pnpm add @mcpeek/server-sdk @modelcontextprotocol/sdk
pnpm add @mcpeek/openai-client-sdk

Shared Config Type

Used by both SDKs

types.ts
type AnalyticsConfig = {
  endpoint: string;
  apiKey: string;
  organizationId: string;
  environment?: "production" | "development";
};

Quickstart sequence

  1. 1Create an API key in Dashboard > Settings > API Keys.
  2. 2Set endpoint, API key, and organization ID in environment variables.
  3. 3Wrap MCP transport with withMcpServerAnalytics(...).
  4. 4Initialize withOpenAiClientAnalytics(...) inside ChatGPT widget runtime.
  5. 5Send a test event and verify data on dashboard pages.

Peer dependency note

@mcpeek/server-sdk expects MCP server transport usage from @modelcontextprotocol/sdk.

Recommended next pages

Continue with API Keys, then Examples.