Mcpcat Go SDK
MCPcat is an analytics platform for MCP server owners π±
Installation
npx mcpcat-go-sdkAsk AI about Mcpcat Go SDK
Powered by Claude Β· Grounded in docs
I know everything about Mcpcat Go SDK. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Getting Started Β· Features Β· Docs Β· Website Β· Open Source Β· Schedule a Demo
[!NOTE] Looking for the Python SDK? Check it out here mcpcat-python.
Why use MCPcat? π€
MCPcat helps developers and product owners build, improve, and monitor their MCP servers by capturing user analytics and tracing tool calls.
Use MCPcat for:
- User session replay π¬. Follow alongside your users to understand why they're using your MCP servers, what functionality you're missing, and what clients they're coming from.
- Trace debugging π. See where your users are getting stuck, track and find when LLMs get confused by your API, and debug sessions across all deployments of your MCP server.
- Existing platform support π. Get logging and tracing out of the box for your existing observability platforms (OpenTelemetry, Datadog, Sentry) β eliminating the tedious work of implementing telemetry yourself.
Supported MCP Libraries
MCPcat provides first-class support for the two most popular Go MCP libraries:
| Library | Install |
|---|---|
| mcp-go (mark3labs) | go get github.com/mcpcat/mcpcat-go-sdk/mcpgo |
| go-sdk (official) | go get github.com/mcpcat/mcpcat-go-sdk/officialsdk |
Import the package that matches the MCP library you're already using. Both expose the same Track() API and share the same feature set.
Getting Started
Create an account and obtain your project ID at mcpcat.io. For detailed setup instructions visit our documentation.
Add one Track() call before starting your server:
mark3labs/mcp-go:
import mcpcat "github.com/mcpcat/mcpcat-go-sdk/mcpgo"
shutdown, err := mcpcat.Track(mcpServer, "proj_YOUR_PROJECT_ID", nil)
if err != nil { /* handle error */ }
defer shutdown(context.Background())
Official go-sdk:
import mcpcat "github.com/mcpcat/mcpcat-go-sdk/officialsdk"
shutdown, err := mcpcat.Track(mcpServer, "proj_YOUR_PROJECT_ID", nil)
if err != nil { /* handle error */ }
defer shutdown(context.Background())
Track() returns a shutdown function β call it before your application exits to flush all queued events.
Advanced Features
User Identification
Identify your user sessions with a callback to attach user information to every event in a session.
mark3labs/mcp-go:
import (
"github.com/mark3labs/mcp-go/mcp"
mcpcat "github.com/mcpcat/mcpcat-go-sdk/mcpgo"
)
shutdown, err := mcpcat.Track(s, "proj_YOUR_PROJECT_ID", &mcpcat.Options{
Identify: func(ctx context.Context, req *mcp.CallToolRequest) *mcpcat.UserIdentity {
return &mcpcat.UserIdentity{
UserID: "user_12345", UserName: "demo_user",
UserData: map[string]any{"email": "demo@example.com"},
}
},
})
Official go-sdk:
import (
"github.com/modelcontextprotocol/go-sdk/mcp"
mcpcat "github.com/mcpcat/mcpcat-go-sdk/officialsdk"
)
shutdown, err := mcpcat.Track(s, "proj_YOUR_PROJECT_ID", &mcpcat.Options{
Identify: func(ctx context.Context, req *mcp.CallToolRequest) *mcpcat.UserIdentity {
return &mcpcat.UserIdentity{
UserID: "user_12345", UserName: "demo_user",
UserData: map[string]any{"email": "demo@example.com"},
}
},
})
Sensitive Data Redaction
MCPcat redacts all data sent to its servers and encrypts at rest, but for additional security, it offers a hook to do your own redaction on all text data before it leaves your server.
shutdown, err := mcpcat.Track(s, "proj_YOUR_PROJECT_ID", &mcpcat.Options{
RedactSensitiveInformation: func(text string) string {
return emailRegex.ReplaceAllString(text, "[REDACTED]")
},
})
Debug Mode
Enable debug logging for troubleshooting. Debug logs are written to ~/mcpcat.log.
shutdown, err := mcpcat.Track(s, "proj_YOUR_PROJECT_ID", &mcpcat.Options{Debug: true})
Using with Existing Hooks (mcp-go only)
If your server already uses mcp-go hooks, pass them via Options.Hooks and MCPCat will append its hooks alongside yours:
shutdown, err := mcpcat.Track(s, "proj_YOUR_PROJECT_ID", &mcpcat.Options{Hooks: hooks})
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
DisableReportMissing | bool | false | When true, prevents the get_more_tools tool from being registered |
DisableToolCallContext | bool | false | When true, prevents the context parameter from being injected on tool calls |
Debug | bool | false | Enable debug logging to ~/mcpcat.log |
RedactSensitiveInformation | func(string) string | nil | Custom redaction applied to all text data before sending |
Identify | callback | nil | Attach user information to sessions |
Hooks | *server.Hooks | nil | Pre-existing hooks to merge with (mcp-go only) |
Free for open source
MCPcat is free for qualified open source projects. We believe in supporting the ecosystem that makes MCP possible. If you maintain an open source MCP server, you can access our full analytics platform at no cost.
How to apply: Email hi@mcpcat.io with your repository link
Already using MCPcat? We'll upgrade your account immediately.
Community Cats π±
Meet the cats behind MCPcat! Add your cat to our community by submitting a PR with your cat's photo in the docs/cats/ directory.
Want to add your cat? Create a PR adding your cat's photo to docs/cats/ and update this section!
