Let Claude Code read your Spring Boot traces over MCP
Coding agents are good at reading code and bad at knowing what your app actually did. A trace closes that gap.
What the agent is missing
Ask an agent to fix a failing checkout and it reads the code and guesses. It cannot see the request that failed, the SQL that ran, or where the exception was thrown. You end up pasting stack traces and log lines into the chat.
Give it the trace over MCP
Causeline serves its traces over the Model Context Protocol at /causeline/mcp. Connected, Claude Code, Cursor, Copilot or Claude Desktop can list traces, read one with its insights and security hints, compare two runs, find the source file for a class, and replay a request after a fix.
Start your app with Causeline on, copy the command from the Connect agent panel (the app log prints it too), and run it. For Claude Code:
claude mcp add --transport http causeline http://localhost:8080/causeline/mcp --header "X-Causeline-Token: <token>"
Cursor, VS Code and other clients use the same URL and header. Claude Desktop connects through npx mcp-remote.
A loop that closes
With the connection in place, the request you give the agent can be short: “the checkout fails, find out why and fix it.” It finds the failed request, reads the exception and the file and line that threw it, changes the code, then replays the same request and compares the two runs. You see 500 became 201 instead of taking its word for it.
What the agent can see
An agent’s context usually goes to a model provider, so it sees traces the way an export shows them: credentials, sensitive values and SQL literals are redacted. Prompts, answers and documents from AI calls are withheld too. You can also hide whole paths from it.
causeline:
mcp:
hide: ["/api/admin/**"]
replay:
allow: ["POST /api/orders"]What it may do
Replay is the only action, and you set the limits. By default an agent may replay only GET and HEAD requests; anything else must match causeline.mcp.replay.allow, and deny always wins. Replays go only to local or targets you have marked, at most 20 a minute, and the agent cannot change headers, run security probes or start load runs. Its replays are tagged Agent in the UI, so you can see what it did.
Causeline runs no AI
Causeline doesn’t call a model. It answers the agent you already use. It is for development and QA, off by default, and refuses to start under a production profile. The FAQ covers what is captured and how to block it.