Installation
Install the plugin from the Bitfab marketplace:What the Plugin Does
Automatic Setup
The/bitfab:setup command runs a multi-phase workflow:
- Login — Opens your browser for OAuth authentication, saves credentials securely
- Instrument — Reads your codebase, finds all AI workflows (LLM calls, agents, AI-driven decisions), and presents them as a numbered list. You choose which to instrument — it adds tracing with minimal diffs
- Replay — Creates replay scripts so you can regression-test your trace functions against production data with one command
MCP Tools
The plugin registers MCP tools that Claude Code can call during conversations. These let you inspect traces, diagnose failures, and improve your code without leaving the editor.setup_bitfab
Get a complete, language-specific SDK setup guide with install commands, initialization code, and instrumentation patterns.
get_bitfab_api_key
Retrieve your API key for environment variable configuration.
list_trace_functions
List all traced functions in your organization with stats at a glance — what’s being traced and how it’s performing.
get_trace_function_diagnostics
Deep-dive into failures for a specific trace function. Returns failure summaries, recent failures with trace IDs, and exact reasons why traces are failing.
search_traces
Search and filter traces with full-text search, date ranges, status filters, and regex matching. Supports drill-down to narrow results progressively.
read_traces
Read one or more traces by ID with full details — span summaries or complete input/output/reasoning/context/errors per span.
Slash Commands
| Command | Description |
|---|---|
/bitfab:setup | Full setup workflow — authenticate, instrument, create replay scripts |
/bitfab:setup login | Auth only |
/bitfab:logout | Remove saved credentials |
/bitfab:status | Check auth status, plugin version, and available updates |
/bitfab:update | Update the plugin to the latest version |
Session Notifications
The plugin runs a hook on every session start and resume that checks:- Authentication: If you’re not logged in, it reminds you to run
/bitfab:setup - Updates: If a new plugin version is available, it tells you how to update (or auto-updates if you’ve enabled it)
Example Workflows
Instrument a new project
Diagnose and fix a failing function
Ask Claude Code naturally:get_trace_function_diagnostics to analyze failures, then search_traces and read_traces to inspect specific failing traces — and suggests code fixes directly.
Replay after a code change
After updating a function, run your replay script to test against production data:Configuration
Credentials
Credentials are stored in~/.config/bitfab/credentials.json (created by /bitfab:setup login with owner-readable permissions).
Environment Variables
| Variable | Description |
|---|---|
BITFAB_API_KEY | Override the stored API key |
Troubleshooting
Not authenticated
If you see “Not authenticated” on session start:- Run
/bitfab:setup loginto authenticate via browser - Check that
~/.config/bitfab/credentials.jsonexists and contains your API key - If using an environment variable, verify
BITFAB_API_KEYis set
MCP tools not available
If Claude Code can’t access the Bitfab tools:- Run
/bitfab:statusto check connection status - Try restarting Claude Code — the MCP server initializes on startup
- Verify the plugin is installed: check
/plugin list
Stale session
The plugin automatically detects and recovers from stale MCP sessions. If tools stop working mid-conversation, they’ll reconnect on the next call.Plugin updates
Run/bitfab:status to check for updates, then /bitfab:update to install the latest version. Restart Claude Code after updating.