Claude Integration
Lumberjack provides first-class integration with AI assistants like Claude and Cursor through Model Context Protocol (MCP). This allows AI to directly access your logs for better debugging and analysis.
Quick Setup
Section titled “Quick Setup”The fastest way to set up Claude integration:
# Install Lumberjack with local serveruv add 'lumberjack_sdk[local-server]'
# Run the automated setupuv run lumberjack claude init
This command will:
- 🔧 Configure Claude Code MCP integration
- 📝 Automatically instrument your application
- 🚀 Set up all necessary configurations
Manual Setup
Section titled “Manual Setup”If you prefer manual setup or need custom configuration:
1. Start the Local Server
Section titled “1. Start the Local Server”uv run lumberjack serve
The MCP server starts automatically alongside the web UI.
2. Configure Claude Code
Section titled “2. Configure Claude Code”Add the Lumberjack MCP server to your Claude Code configuration (usually in ~/.claude.json
)
{ "mcpServers": { "lumberjack": { "type": "stdio", "command": "lumberjack-mcp", "args": [], "env": {} } }}
3. Initialize in Your App
Section titled “3. Initialize in Your App”from lumberjack_sdk import Lumberjack
Lumberjack.init( project_name="my-app")
LUMBERJACK_LOCAL_SERVER_ENABLED=true
Using Claude with Your Logs
Section titled “Using Claude with Your Logs”Once set up, you can ask Claude natural language questions about your logs:
Example Queries
Section titled “Example Queries”Finding Errors:
"Show me all error logs from the last hour""What's causing the database timeout errors?"
Debugging Issues:
"Use lumberjack MCP to write and read your own logs to debug"
Next Steps
Section titled “Next Steps”- Getting Started - Basic setup guide
- Configuration Reference - All configuration options
- Framework Support - Framework-specific guides