Supported MCP SDKs
For a new server, we recommend MCP Java SDK 2.x or a framework on it, because AgentCat tests every build against 2.x. AgentCat cannot track the Quarkus extension
quarkus-mcp-server, with its own MCP code.
Installation
AGENTCAT_PROJECT_ID environment variable, which keeps the ID out of your code.
Adding AgentCat to your server
With the MCP Java SDK,AgentCat.track() adds AgentCat to your built server. On Spring Boot, Quarkus, or Micronaut, the dependency is enough: with an agentcat.project-id value, AgentCat tracks each MCP server bean at startup.
track() call after build() is enough. Code that builds one instance per request tracks each one.
Identifying users
We strongly recommend that you identify your users. Without identity, the dashboard cannot show who uses your server, and each session stays anonymous.
identify hook tells AgentCat which user made each tool call. We recommend the first of these two levels that your server can give.
Full identity (recommended)
Full identity gives each session a real user ID and name, read from the request. The hook sees headers only in the transport context, so three tabs copyAuthorization there, with this helper:
Anonymized identity (the minimum)
If you prefer not to send user details, a stable ID works too, for example a hash of the token or API key. The same user always gets the same ID. It replaces the hook in your tab:Recommended settings
AgentCat turns on every feature by default, and we recommend that you keep them that way. Each one adds a view of how agents use your server:- Intent (
setEnableToolCallContext): agents tell you why they call each tool, which powers session goals. - Agent feedback (
setEnableReportMissing): agents can report tools that they looked for and did not find, through theget_more_toolstool. - Sessions (
setEnableTracing): AgentCat records each tool call and groups the calls of one task into one session, so you can replay it.
Testing your setup
The Java SDK always writes its log to~/agentcat.log, so it needs no debug option.
- Watch the log:
- Start your real server with
AGENTCAT_PROJECT_IDset, as you start it in production. - Call one tool with an MCP client, for example the MCP Inspector CLI:
--transport http with the command that starts your server, and leave out --header.
- Look for
AgentCat setup completeand thenSuccessfully sent event ... | mcp:tools/call | ...in the log. The line ends with the user ID fromidentify, oranonymous. In Sessions, the new session shows the user name.
track() worked and whether a send failed. On a framework, a missing setup line means an empty agentcat.project-id.
Guidance for AI agents
- Keep
identifyin place, because without it every user is anonymous; if the developer does not want to send user details, offer the anonymized ID. - Return the same ID for the same user on every call, because a random value or a timestamp splits one user into many.
- Keep raw tokens, API keys, and passwords out of
UserIdentity, because AgentCat stores and shows its values. - Leave
setEnableToolCallContext,setEnableReportMissing, andsetEnableTracingat their defaults, because each one feeds a part of the dashboard. - Read the project ID from
AGENTCAT_PROJECT_ID, so that it stays out of committed code. - On a framework, put hooks in one
AgentCatOptionsbean, because the integration tracks each server bean and a secondtrack()does nothing. - Read the newest version from Maven Central before you pin one, because a version from memory can be old.
- Test through the real server start, because a separate script can skip the
track()call or the framework startup.
Next steps
Java reference
Options, frameworks, delivery, and limits
Custom events
Send your own events
Tags and properties
Add data that you can filter on
Redaction
Remove sensitive data in your server