Description
### 1. Basic Configuration
This is a minimal, usable setup to get started with the **Axiom - Natural Language Log Analyzer MCP** in Claude Code.
Assumptions:
- The MCP server is a local executable/script called `axiom-nl-log-mcp`.
- It needs an Axiom API token and organization ID.
```json
{
"Axiom - Natural Language Log Analyzer MCP": {
"command": "axiom-nl-log-mcp",
"args": [],
"env": {
"AXIOM_TOKEN": "your-axiom-api-token-here",
"AXIOM_ORG_ID": "your-axiom-org-id-here"
},
"disabled": false,
"autoStart": true
}
}
```
**Explanation (not part of JSON):**
- `"Axiom - Natural Language Log Analyzer MCP"`: The key under `mcpServers` in `~/.claude/settings.json`. This is how Claude Code identifies this MCP server.
- `"command"`: The executable name on your PATH. Replace with the actual command (e.g., `node axiom-mcp.js`, `python axiom_mcp.py`, or a full path).
- `"args"`: Empty for basic usage; the server runs with its defaults.
- `"env"`:
- `AXIOM_TOKEN`: Your Axiom API token (required for authentication).
- `AXIOM_ORG_ID`: Your Axiom organization ID.
- `"disabled": false`: Makes sure the server is enabled.
- `"autoStart": true`: Claude Code will start the MCP server automatically when needed.
---
### 2. Advanced Configuration
A more complete setup with explicit arguments, environment variables, and logging options.
Assumptions:
- The MCP server is a Node.js script.
- You want to control region, dataset defaults, and log verbosity.
```json
{
"Axiom - Natural Language Log Analyzer MCP": {
"command": "node",
"args": [
"/usr/local/bin/axiom-nl-log-mcp.js",
"--port",
"0",
"--log-level",
"debug",
"--default-dataset",
"app-logs",
"--max-query-window",
"24h"
],
"env": {
"AXIOM_TOKEN": "your-axiom-api-token-here",
"AXIOM_ORG_ID": "your-axiom-org-id-here",
"AXIOM_URL": "https://api.axiom.co",
"AXIOM_REGION": "us",
"AXIOM_TIMEOUT_MS": "20000",
"MCP_LOG_FORMAT": "json",
"MCP_LOG_FILE": "/var/log/axiom-nl-log-mcp.log"
},
"disabled": false,
"autoStart": true,
"timeoutSeconds": 60,
"maxRestarts": 5
}
}
```
**Explanation (not part of JSON):**
- `"command": "node"`: Run the MCP server through Node.js.
- `"args"`:
- `"/usr/local/bin/axiom-nl-log-mcp.js"`: Full path to the MCP server script.
- `"--port", "0"`: Let the server choose an ephemeral port (Claude MCP runtime will connect via stdio or the chosen mechanism).
- `"--log-level", "debug"`: More verbose logging for troubleshooting.
- `"--default-dataset", "app-logs"`: Default Axiom dataset to query when none is specified in natural language.
- `"--max-query-window", "24h"`: Limit how far back queries can go.
- `"env"`:
- `AXIOM_TOKEN`, `AXIOM_ORG_ID`: Authentication.
- `AXIOM_URL`: Explicit Axiom API base URL (use a regional endpoint if needed).
- `AXIOM_REGION`: Region hint (e.g., `us`, `eu`).
- `AXIOM_TIMEOUT_MS`: Per-request timeout to Axiom.
- `MCP_LOG_FORMAT`: Custom env for your MCP server (e.g., `text` or `json`).
- `MCP_LOG_FILE`: Where the MCP server writes its own logs.
- `"timeoutSeconds": 60`: How long Claude waits for a response before considering the server hung.
- `"maxRestarts": 5`: Allow some automatic restarts if the MCP crashes.
---
### 3. Use Case Specific Configuration β Production Incident Analysis
This configuration is tailored for **production incident analysis** of a specific microservice.
It:
- Limits access to production datasets only.
- Sets strict time windows and rate limits.
- Targets a specific service (`payments-service`) and environment (`prod`).
```json
{
"Axiom - Natural Language Log Analyzer MCP (Prod Incidents)": {
"command": "/opt/axiom-tools/axiom-nl-log-mcp",
"args": [
"--mode",
"readonly",
"--default-dataset",
"prod-app-logs",
"--allowed-datasets",
"prod-app-logs,prod-nginx-logs",
"--max-query-window",
"6h",
"--default-time-range",
"1h",
"--service-filter",
"payments-service",
"--env-filter",
"prod"
],
"env": {
"AXIOM_TOKEN": "prod-axiom-api-token-here",
"AXIOM_ORG_ID": "your-prod-axiom-org-id-here",
"AXIOM_URL": "https://api.axiom.co",
"AXIOM_REGION": "us",
"AXIOM_TIMEOUT_MS": "15000",
"MCP_LOG_LEVEL": "info",
"MCP_RATE_LIMIT_QPM": "30",
"MCP_DEFAULT_TIMEZONE": "UTC"
},
"disabled": false,
"autoStart": true,
"timeoutSeconds": 45,
"maxRestarts": 3
}
}
```
**Explanation (not part of JSON):**
- Key name: `"Axiom - Natural Language Log Analyzer MCP (Prod Incidents)"` so you can distinguish it from dev/test MCPs.
- `"command"`: Full path to the production-deployed MCP binary.
- `"args"`:
- `"--mode", "readonly"`: Ensure the MCP only reads/query logs, no writes or destructive actions.
- `"--default-dataset", "prod-app-logs"`: Defaults to production application logs.
- `"--allowed-datasets", "prod-app-logs,prod-nginx-logs"`: Restricts what datasets can be queried, even via natural language.
- `"--max-query-window", "6h"`: Prevents very large/expensive queries; only last 6 hours.
- `"--default-time-range", "1h"`: If user does not specify a time range, use last 1 hour.
- `"--service-filter", "payments-service"`: Automatically scope queries to this microservice.
- `"--env-filter", "prod"`: Automatically scope to production environment logs only.
- `"env"`:
- `AXIOM_TOKEN`: A production-scoped token (ideally read-only).
- `AXIOM_ORG_ID`: Production organization ID.
- `AXIOM_URL`, `AXIOM_REGION`: Explicit production endpoint.
- `AXIOM_TIMEOUT_MS`: Slightly stricter timeout for production usage.
- `MCP_LOG_LEVEL`: Reduce noise to `info` in production.
- `MCP_RATE_LIMIT_QPM`: Custom env for your MCP to limit queries per minute (e.g., 30).
- `MCP_DEFAULT_TIMEZONE`: Normalize all queries to UTC to avoid confusion across teams.
- `"timeoutSeconds": 45`: Reasonable for production queries.
- `"maxRestarts": 3`: Limited restarts for stability and to surface repeated failures.