Capture Claude Code sessions as cryptographically-signed audit events. Two setup paths, both work natively.
Native ยท OpenTelemetry + MCP
Claude Code (as of 2026) emits OpenTelemetry signals natively: traces of every tool call, every token used, every cost incurred, every session. These signals are off by default and turned on with a single environment variable.
SteelSpine includes an OpenTelemetry receiver that accepts these signals at standard OTLP/HTTP endpoints. Once configured, every Claude Code session is automatically captured into SteelSpine's signed event chain. The captured events go through the same pipeline as any other agent: hash-chained, Ed25519-signed, replayable, independently verifiable.
Plus: SteelSpine includes a Model Context Protocol (MCP) server. Once configured in Claude Code, the AI assistant gains direct read access to your captured audit history. Ask Claude Code "what failed in the last 24 hours according to SteelSpine?" and it queries the audit chain directly.
This path captures every Claude Code session automatically. Ideal for compliance and audit-trail use cases.
steelspine otel-receiver --port 4318 --project claude-code
The receiver runs as a background process and listens on port 4318 (the standard OTLP/HTTP port). It accepts traces from Claude Code or any other OTEL-instrumented agent. For production deployments, configure as a systemd service so it survives reboots.
Set these environment variables in the shell where Claude Code will run (typically in ~/.bashrc or ~/.zshrc for permanent setup):
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_EXPORTER_OTLP_PROTOCOL=http/json
That's it. Run Claude Code as normal. Every session is captured.
# Quick health check
curl -s http://localhost:4318/health
# List captured runs
steelspine run list
# Generate audit report
steelspine verify-run --compliance-html > claude_code_audit.html
This path gives Claude Code's AI assistant direct read access to your SteelSpine audit history. The AI can answer questions about past runs, compare sessions, verify integrity, and generate reports without leaving the chat.
Add to your Claude Code MCP configuration (location depends on Claude Code version; check the Claude Code docs for current path):
{
"mcpServers": {
"steelspine": {
"command": "python3",
"args": ["/home/<your-user>/.prime/adapters/cursor/bin/steelspine_mcp_server.py"]
}
}
}
Replace <your-user> with your actual username (find it with whoami).
The MCP server is loaded on Claude Code startup. After restart, the AI has 8 SteelSpine tools available.
In Claude Code, ask questions like:
The AI calls the MCP tools, gets real data from your SteelSpine installation, and answers with citations.
The two setup paths are complementary, not alternatives:
Most teams use both: A for the audit-trail (compliance, retrospectives, debugging), B for in-session intelligence ("did I run this before? what happened?").
Each Claude Code session captured produces events like:
{"adapter": "otel", "label": "claude-code", "line": "tool_call: bash 'npm test'", "kind": "success", ...}
{"adapter": "otel", "label": "claude-code", "line": "tool_call: edit_file 'src/auth.ts'", "kind": "success", ...}
{"adapter": "otel", "label": "claude-code", "line": "tool_call: web_search 'OAuth 2.0 PKCE'", "kind": "success", ...}
Each event is hash-chained and Ed25519-signed. A regulator or auditor with the public key can verify any subset of these events independently.
| Scenario | What SteelSpine + Claude Code provides |
|---|---|
| SOC 2 Type II audit asks "what did your AI tooling do in March?" | steelspine verify-run --compliance-html for any date range; shows every captured Claude Code session with cryptographic integrity |
| Customer security questionnaire asks for AI activity logs | Export portable audit packet via steelspine pack-create; customer auditor verifies independently with public key |
| Regulator inquiry about a specific AI-assisted code change | steelspine search "<commit hash>" finds the captured session; full event timeline with model, tool calls, and reasoning |
| Internal incident response: "what did the AI do during this outage?" | steelspine replay-run <session_id> deterministically replays the captured session offline |
CLAUDE_CODE_ENABLE_TELEMETRY=1 is set in the same shell where Claude Code runs. Run echo $CLAUDE_CODE_ENABLE_TELEMETRY to confirm.OTEL_EXPORTER_OTLP_PROTOCOL=http/json. Without it, Claude Code may default to protobuf which SteelSpine's receiver does not currently accept.curl http://localhost:4318/health should return {"status": "ok"}.--verbose to see each span as it arrives.steelspine_mcp_server.py is absolute and correct.echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | python3 ~/.prime/adapters/cursor/bin/steelspine_mcp_server.py should return a proper response with serverInfo.steelspine at ~/.prime/bin/steelspine. Verify it exists: ls -la ~/.prime/bin/steelspine.STEELSPINE_BIN environment variable to the correct path..cursor/mcp.json config. See /integrations/cursor.html.