# Axiom MCP — Log Search and Analytics for AI Agents > MCP server that gives AI agents access to Axiom log analytics. Query logs, traces, and metrics through natural language for AI-powered observability and incident response. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```json { "mcpServers": { "axiom": { "command": "npx", "args": ["-y", "axiom-mcp"], "env": { "AXIOM_TOKEN": "xaat-...", "AXIOM_ORG_ID": "your-org" } } } } ``` Now ask your AI agent: ``` "Show me error logs from the last hour" "What caused the spike in 500 errors at 3pm?" "Find all requests with latency > 2 seconds" "Compare today's error rate with yesterday" ``` ## What is Axiom MCP? Axiom MCP is a Model Context Protocol server that connects AI agents to Axiom's log analytics platform. Agents can query logs, traces, and metrics using natural language — no APL (Axiom Processing Language) knowledge needed. The agent translates questions into APL queries, executes them, and interprets results. Ideal for AI-powered incident response and observability. **Answer-Ready**: Axiom MCP gives AI agents log search and analytics access. Query logs, traces, and metrics via natural language. Agent auto-generates APL queries. AI-powered incident response and observability. Works with Claude Code and Cursor. **Best for**: DevOps teams wanting AI-assisted log analysis and incident response. **Works with**: Claude Code, Cursor, Claude Desktop. **Setup time**: Under 3 minutes. ## Core Tools | Tool | What It Does | |------|-------------| | query_logs | Search logs with APL or natural language | | get_datasets | List available log datasets | | query_apl | Execute raw APL queries | | get_stats | Summary statistics for a dataset | ## Use Cases | Use Case | Example Query | |----------|--------------| | Incident Response | "What errors appeared in the last 30 minutes?" | | Performance | "Average response time for /api/users endpoint today" | | Debugging | "Show me all requests from user_id 12345" | | Trending | "Compare error rates: this week vs last week" | | Anomaly Detection | "Any unusual spikes in 4xx errors?" | ## Example Interactions ### Error Investigation ``` User: "Why are users getting 500 errors?" Agent: [calls query_logs with APL filter for status=500] Agent: "I found 47 500 errors in the last hour. 90% are from the /api/payments endpoint. Root cause: ConnectionRefusedError to payment-service:8080. The payment service appears to be down." ``` ### Performance Analysis ``` User: "Is the API getting slower?" Agent: [calls query_apl with percentile analysis] Agent: "P95 latency increased from 180ms to 450ms starting at 2:30 PM. The slowdown correlates with a deployment at 2:28 PM (commit abc123)." ``` ## FAQ **Q: Do I need to know APL?** A: No, the AI agent translates natural language to APL. But APL knowledge helps for complex queries. **Q: What log platforms does it support?** A: This MCP is specifically for Axiom. For other platforms, look for Datadog MCP or Sentry MCP. **Q: Can it create alerts?** A: Currently read-only — query and analyze. Alert creation would need the Axiom API directly. ## Source & Thanks > Built for [Axiom](https://axiom.co) — Modern observability platform. > > `npx axiom-mcp` — Axiom MCP server ## 快速使用 ```json {"mcpServers": {"axiom": {"command": "npx", "args": ["-y", "axiom-mcp"]}}} ``` 让 AI Agent 用自然语言查询日志和指标。 ## 什么是 Axiom MCP? MCP 服务器,连接 AI Agent 到 Axiom 日志分析平台。自然语言查询日志、追踪和指标。 **一句话总结**:Axiom 日志分析 MCP,AI Agent 自然语言查询日志/追踪/指标,自动生成 APL,AI 驱动的事件响应和可观测性。 ## 核心工具 query_logs、get_datasets、query_apl、get_stats。 ## 常见问题 **Q: 需要会 APL?** A: 不需要,AI 自动翻译自然语言。 ## 来源与致谢 > [axiom.co](https://axiom.co) — 现代可观测性平台 --- Source: https://tokrepo.com/en/workflows/655bef8a-41bb-4eda-8f5b-29d1d4cb8c74 Author: MCP Hub