Bitfab provides an MCP (Model Context Protocol) server that lets coding agents like Cursor, Claude Code, Codex, and Windsurf set up Bitfab tracing in your codebase automatically. The MCP server provides one tool:Documentation Index
Fetch the complete documentation index at: https://docs.bitfab.ai/llms.txt
Use this file to discover all available pages before exploring further.
get_bitfab_api_key— Retrieves your API key for the agent to configure
API Key Requirements
The MCP server requires authentication to access your organization’s API keys and provide personalized setup guidance. You have two options:- Automatic Authentication (Recommended): Use the setup page which automatically configures authentication
- Manual Configuration: Add authentication headers to your MCP client configuration
Supported Languages
TypeScript
bitfab — withSpan wrapperPython
bitfab-py — @span decoratorRuby
bitfab — bitfab_span macroGo
bitfab-go — Start/End spansQuick Setup
CLI
The fastest way to get connected:Setup Page
For agents not supported by the CLI, or if you prefer manual configuration, use the Bitfab setup page:- Choose your agent: The page shows setup instructions for Claude Code, Cursor, Codex, and other MCP clients
- Follow the steps: Claude Code uses a plugin install flow; other agents use MCP configuration with your API key embedded
- Copy and paste: Each configuration is ready to use — no manual key copying needed
- Claude Code: Plugin install commands that handle MCP setup and authentication automatically
- Cursor: One-click deep link installation
- Other agents: Ready-to-use MCP configuration with your API key embedded
Manual Configuration
If you prefer to set up the MCP connection manually, you’ll need to include your API key in the configuration.Getting Your API Key
- From the setup page: Visit bitfab.ai/setup and copy your API key
- From the dashboard: Click your profile avatar → API Keys → Create/view your key
Cursor
Add this to your.cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global):
Claude Code
Install the Bitfab plugin, which automatically configures the MCP connection and provides slash commands for setup, labeling, and diagnostics:claude --continue) and run /bitfab:setup.
Codex
Set your API key as an environment variable:~/.codex/config.toml (global) or .codex/config.toml (project-level):
Windsurf
Add this to your MCP configuration:How It Works
Once connected, your coding agent can:- Call
get_bitfab_api_keyto retrieve your API key (requires your Bitfab session) - Fetch the language-specific SDK reference from this site (e.g.
https://docs.bitfab.ai/typescript-sdk) to get the full API surface, install commands, instrumentation patterns, and replay setup - Follow the reference to install the SDK, initialize the client, and instrument your functions
Example Workflow
Ask your coding agent:- Detect your project language
- Call
get_bitfab_api_keyto get the API key and fetch the language-specific SDK reference from docs.bitfab.ai - Install the SDK
- Read your codebase and identify all AI workflows
- Present you with a list of workflows it found, and why each is worth instrumenting
- Instrument whichever workflows you choose — one, several, or all
Troubleshooting
Authentication Issues
If your agent can’t access the MCP tools:- Check your API key: Ensure you’re using the correct API key from your dashboard
- Verify the header format: Use
Authorization: Bearer YOUR_API_KEY(note the space after “Bearer”) - Organization access: Make sure you’re logged into the correct organization in Bitfab
- Try the setup page: Use the automatic configuration to avoid manual errors
Connection Problems
Common issues and solutions:- MCP server not found: Verify the URL is
https://bitfab.ai/mcp. If using Claude Code with the Bitfab plugin, run/bitfab:setupto reconfigure. - Tools not available: Restart your coding agent after adding the MCP configuration
- API key errors: Generate a new API key from the API Keys page
- Network issues: Ensure your network allows HTTPS connections to bitfab.ai
Getting Help
If you’re still having trouble:- Check the API Keys documentation for key management
- Visit the setup page for automatic configuration
- Contact support if the issue persists