Skip to main content
AgentCat is built with privacy at every layer, from client-side redaction before data leaves your server, to automatic PII detection on ours. AgentCat is co-founded by Naseem Al-Naji, creator of Opal, bringing years of experience in building privacy-first developer tools that handle sensitive data with the utmost care.

Client-Side Redaction

Sanitize sensitive data before it leaves your environment with custom redaction functions.

Server-Side Redaction

Automatic pattern-based redaction of sensitive values in event payloads.

Certifications

SOC 2 Type II compliance, encryption, and infrastructure security.

Disabling Telemetry

While AgentCat provides valuable analytics, we understand that some users may want to disable telemetry entirely. You can implement this in your MCP server by conditionally calling the track function.

Disabling Tracking Entirely

Add environment variable support to your MCP server so users can opt out:
In PHP, AGENTCAT_ENABLED=false also turns AgentCat off everywhere, in Laravel and Symfony applications too, with no code. In C#, AGENTCAT_ENABLED=false also turns AgentCat off everywhere, with no code, and AgentCat stays off while your tests run (see C#: turn AgentCat on or off). In Rust, AGENTCAT_ENABLED set to false, 0, no or off, in any case, turns AgentCat off with no code: a tracked server then forwards every request to your handler untouched, and custom events publish nothing (see Rust options).

Disabling Auto-Capture

By default, AgentCat automatically captures all MCP protocol events (tool calls, initialization, tool listings). If you only need custom events without automatic event capture, set enableTracing to false:
In PHP, a custom event that you publish with the tracked server is dropped while enableTracing is false; publish it with a session ID string to send it. In C#, no hook runs while EnableTracing is false, and a custom event that you publish with an McpServer is dropped; publish it with a session ID string to send it. In Rust, the enable_tracing(false) setter of Options turns tracing off. Nothing is recorded, and the tools get neither session_id nor agent_id. They still get context, and the tool list still gets get_more_tools. A custom event that you publish with CallContext::publish_custom_event or Tracked::publish_custom_event is dropped while tracing is off. Publish it with AgentCat::publish_custom_event and a session ID string to send it. When tracing is disabled:
  • Tool call events are not recorded
  • User identification still works normally
  • Custom events via publishCustomEvent are still sent
  • Exporters (OpenTelemetry, Datadog, Sentry) still receive custom and identify events

Anonymizing User Sessions

For users who want analytics without user identification, pass an identify function that returns null:
In Rust, leave the identify hook unset, or return Ok(None) from it: the call then has no user.

Implementation Best Practices

  1. Document Environment Variables: Clearly document telemetry options in your MCP server’s README
  2. Default to Privacy: Consider making telemetry opt-in rather than opt-out
  3. Respect User Choice: Always check environment variables before initializing tracking
  4. Provide Granular Control: Allow users to disable specific types of tracking
Example implementation with multiple privacy options:
In Rust, AGENTCAT_ENABLED turns tracking off with no code (see Disabling Tracking Entirely), and a server that leaves the identify hook unset has no user on its calls (see Anonymizing User Sessions).

What the PHP SDK sends

The PHP SDK sends the same events as the other SDKs. Two things to know, which the PHP differences and limits cover in full:
  • Request headers. The event of a call over HTTP carries every request header of that call, verbatim, Authorization and Cookie included. Remove the ones you do not want in a redactEvent hook.
  • Diagnostics. To find broken installs, the SDK sends AgentCat every line it logs, including the line it logs for each event it sends, with the session ID and the user ID. Turn diagnostics off with new Options(disableDiagnostics: true) or AGENTCAT_DISABLE_DIAGNOSTICS=true.

What the C# SDK sends

The C# SDK sends each tool-call or custom event, in its own request, to the AgentCat API at https://api.agentcat.com, and to the exporters that you configure. The ApiBaseUrl option, or the AGENTCAT_API_URL environment variable, changes that URL. Two things to know, which the C# reference covers in full:
  • Request headers and URL. On an ASP.NET Core server, the event of a tool call carries every request header of that call, verbatim, Authorization and Cookie included, and the full URL with its query string, under parameters.extra.requestInfo. An X-Forwarded-For header goes out like any other header, and AgentCat records no IP address of its own. On the legacy SSE transport, the headers and the URL are those of the session’s GET /sse request, not of the call. Stdio servers and .NET Framework hosts send none. Remove what you do not want in a RedactEvent hook, as in the sample below.
  • Diagnostics. To find broken installs, the SDK sends AgentCat every line it logs: the line it logs for each event it sends, with the session ID and the user ID, tool names, error messages from any code that threw, the answers of exporters that failed, and the keys of the tags that it drops. Turn diagnostics off with options.DisableDiagnostics = true on the first WithAgentCat() or Track() of the process, or with AGENTCAT_DISABLE_DIAGNOSTICS=true.
This RedactEvent hook removes the authorization and cookie headers and the query string of the URL. It also gets custom events, whose parameters can have any shape, and an exception in the hook drops the event, so it tests each level by type:

What the Rust SDK sends

The Rust SDK sends one event for each tool call, and the custom events that your code publishes, to the AgentCat API at https://api.agentcat.com. The api_base_url option, or the AGENTCAT_API_URL environment variable (then MCPCAT_API_URL), changes that URL. Three things to know, which the Rust differences and limits cover in full:
  • Request headers and URL. On a streamable HTTP server, the event of a tool call carries every request header of that call, authorization and cookie included, and the URL of the request, under parameters.extra.requestInfo. Stdio servers send none. Remove what you do not want in a redact_event hook (see Client-Side Redaction).
  • No diagnostics. The SDK sends none of its log lines to AgentCat. They stay in ~/agentcat.log, or go to your tracing subscriber.
  • No exporters. The SDK sends nothing to other observability platforms yet.