Skip to main content

Installation

1

Install the MCPcat Agent

Run the following command to install the open source MCPcat SDK:
npm i mcpcat
2

Track your MCP server

import * as mcpcat from "mcpcat";

/*
Example MCP server
const mcpServer = new Server({
  name: "my-mcp-server",
  version: "1.0.0"
});
mcpServer.tool("my-tool", ...)
*/

// Call .track() AFTER tool call registering
mcpcat.track(mcpServer, "proj_YOUR_PROJECT_ID")

You can grab your project ID from MCPcat’s dashboard.

Using without an MCPcat account

You can forward events directly to your observability platform:
mcpcat.track(server, null, {
  exporters: {
    otlp: {
      type: "otlp",
      endpoint: "http://localhost:4318/v1/traces"
    }
  }
})
Learn more about integration options →

Next steps

Identify Users

Know which user is behind each session

Debug Mode

Turn on extra logging when things aren’t working right

Customize Tool Context

Control what context MCPcat captures from each tool call

Custom Events

Track your own events alongside the ones MCPcat captures