AI Assistant Integration
Connect AI assistants like Cursor and Claude Desktop to your BuilderBox data using the Model Context Protocol (MCP).
What is MCP?
MCP (Model Context Protocol) is an open protocol that allows AI assistants to connect to external tools and data sources. With BuilderBox's MCP server, your AI assistant can query your coding stats and get insights into your development workflow.
Get Your API Key
You'll need an API key to authenticate with the MCP server
Option 1: Using CLI (Recommended)
builderbox key create -n "MCP Integration"Option 2: Using Web App
- Go to Settings
- Navigate to the Integrations section
- Click "Create API Key"
- Copy your new key
Configure Your AI Assistant
Add BuilderBox to your assistant's MCP configuration
Cursor
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"builderbox": {
"transport": "http",
"url": "https://builder-box.com/api/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
} Replace <your-api-key> with your actual API key.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"builderbox": {
"transport": "http",
"url": "https://builder-box.com/api/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
} On Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Your AI Assistant
Restart to load the new configuration
After adding the configuration, fully quit and restart your AI assistant. You should now be able to ask questions like:
- " How much did I code today? "
- " What's my AI vs human coding ratio this week? "
- " Show me my coding activity for the month "
- " What languages did I use most this week? "
Available Tools
The BuilderBox MCP server exposes the following tools to your AI assistant:
Coding Stats
get_coding_summaryGet coding activity summary including total time, AI vs human breakdown, and top projects/languages
Parameters: range: today | week | month
get_coding_activityGet detailed coding activity breakdown by projects, languages, and editors
Parameters: range: today | week | month
Troubleshooting
Connection Failed
Make sure your API key is correct and hasn't been revoked. You can verify your key in Settings → Integrations.
Tools Not Showing
Ensure the JSON configuration is valid (no trailing commas, proper quotes). Restart your AI assistant after making changes.
Authentication Errors
Check that the Authorization header includes "Bearer " before your API key (with a space).
Privacy Note
The MCP server only provides access to your own BuilderBox data. Your AI assistant queries are authenticated with your API key, and you can revoke access at any time by deleting the key in Settings. The MCP server never sends your actual code—only aggregated statistics like time spent and language breakdowns.