Claude Code
Set up Claude Code to use Sazabi's MCP server for observability queries and debugging.
Claude Code is Anthropic's official command-line interface for Claude. By connecting Claude Code to Sazabi's MCP server, you can ask questions about your production systems directly from your terminal.
About Claude Code
Claude Code is a terminal-based AI assistant for developers. It can read and edit files, run commands, and now with MCP support, interact with external services like Sazabi.
When connected to Sazabi, you can ask Claude Code questions like:
Ask Sazabi about recent errors in the checkout service
What does Sazabi show for latency spikes in the last hour?
Search Sazabi for payment failures from todayPrerequisites
Before configuring Claude Code to use Sazabi, make sure you have:
- Claude Code installed: See Claude Code documentation for installation instructions.
- A Sazabi secret key: Create one in Settings -> API Keys in the Sazabi dashboard. Select Secret as the key type.
Configuration
Claude Code uses MCP servers defined in its configuration file. Add Sazabi to your Claude Code configuration:
Edit ~/.claude/claude.json:
{
"mcpServers": {
"sazabi": {
"type": "http",
"url": "https://mcp.sazabi.com/mcp",
"headers": {
"X-Sazabi-Secret-Key": "<YOUR_SECRET_KEY>"
}
}
}
}Edit %USERPROFILE%\.claude\claude.json:
{
"mcpServers": {
"sazabi": {
"type": "http",
"url": "https://mcp.sazabi.com/mcp",
"headers": {
"X-Sazabi-Secret-Key": "<YOUR_SECRET_KEY>"
}
}
}
}Replace <YOUR_SECRET_KEY> with your actual Sazabi secret key.
Keep your secret key secure. Do not commit configuration files containing secret keys to version control.
Verifying the connection
After configuring Claude Code, verify the connection is working:
- Start a new Claude Code session.
- Ask Claude to list your Sazabi projects:
Use Sazabi to list my projectsIf configured correctly, Claude Code will use Sazabi's MCP tools to fetch and display your projects.
Using Sazabi tools
Once connected, you can ask Claude Code to use Sazabi for observability queries. Here are some examples:
Searching logs
Ask Sazabi to search for errors containing "timeout" in the last hourInvestigating issues
Use Sazabi to investigate why the API is returning 500 errorsContinuing conversations
Find my recent Sazabi threads about the payment serviceGetting thread context
Show me the details of my latest Sazabi investigationTroubleshooting
MCP server not found
If Claude Code reports that the Sazabi MCP server is not available:
- Verify the configuration file path is correct for your operating system.
- Ensure the JSON is valid (check for missing commas or brackets).
- Restart Claude Code after making configuration changes.
Authentication errors
If you see authentication errors:
- Verify your secret key is correct.
- Ensure the key has not been revoked in the Sazabi dashboard.
- Check that the header name is exactly
X-Sazabi-Secret-Key.
Connection errors
If you see connection errors:
- Check that the URL is exactly
https://mcp.sazabi.com/mcp. - Ensure your network can reach
mcp.sazabi.com.