Core Concepts
Session Tracking
Every interaction with your MCP server happens within a session. MCPcat automatically:- Creates unique session IDs when a client connects
- Tracks session duration and activity patterns
- Groups related tool calls together
- Detects when sessions go inactive
User Intent Capture
The magic of MCPcat lies in understanding why users call your tools, not just what they call. MCPcat automatically injects acontext
parameter into your tool schemas. When AI assistants (like Claude or Cline) call your tools, they explain their reasoning:
user_intent
, giving you insights into:
- What users are trying to accomplish
- How tools fit into larger workflows
- Common patterns and use cases
- Missing functionality users need
Request Tracing
MCPcat intercepts all MCP protocol messages by wrapping your server’s handlers:- Event type (tool call, resource access, prompt execution)
- Timing data (start time, duration)
- Request parameters and response data
- Error states and messages
- Client information (which AI tool made the request)
How it works under the hood
1. Schema Enhancement
When MCPcat wraps your server, it modifies tool schemas to include the context parameter: Before MCPcat:2. Transparent Interception
MCPcat intercepts requests without affecting your tool’s functionality:- Client calls tool with arguments + context
- MCPcat extracts the context parameter
- Your tool receives original arguments (without context)
- Tool executes normally
- MCPcat captures the response
- Event is queued for analytics
3. Asynchronous Processing
Events are processed asynchronously to ensure zero performance impact:- Thread-safe queue holds events (default: 10,000 capacity)
- Worker threads send events to MCPcat API
- Automatic retries with exponential backoff
- Graceful shutdown ensures no data loss
4. Privacy & Control
MCPcat is designed with privacy in mind:- Redaction functions let you scrub sensitive data before sending
- All data encrypted at rest
- You control what events are tracked
- No PII required - user identification is optional
Session Lifecycle
Understanding the session lifecycle helps you interpret analytics:- Session Start: Client connects to your MCP server
- Initialization: MCPcat captures client/server metadata
- Active Use: Tool calls, resource access, prompts executed
- Inactivity: No requests for configured timeout period
- Session End: Marked inactive after timeout
What Gets Tracked
MCPcat tracks all MCP protocol events:- Tool Operations:
tools/list
,tools/call
- Resource Operations:
resources/list
,resources/read
- Prompt Operations:
prompts/list
,prompts/get
- Completions:
completion/complete
- Server Lifecycle:
initialize
,initialized
- Custom Events: Your own analytics events