An MCP server lets an AI coding assistant talk to your monitoring directly. Instead of copy-pasting a stack trace into Claude, Claude reads it from NightOwl itself. Point Claude Code, Codex, or Cursor at NightOwl's MCP endpoint and it can list your issues, read a parsed stack trace, check how often an exception is happening, look at requests, queries, jobs and logs, and update or comment on issues the way you would in the dashboard, without leaving the editor. Every change it makes is logged in the issue activity timeline as AI-authored, so an assistant working your issues leaves the same audit trail a human would. Setup is three steps.
1. Generate a token
In your NightOwl dashboard, open Tokens in the left sidebar of the account area (next to Account, Teams and Subscription). MCP is part of the Team and Agency plans. Give the token a label that will help you recognize it later (e.g. "Laptop (Claude Code)") and copy the token immediately. NightOwl shows the plaintext token exactly once; after that only the label, creation date, and last-used time are visible.
Tokens are tied to your user account and inherit your team membership. Revoking a token from the same page rejects every later call made with it, from any client.
2. Connect your client
The endpoint is app-scoped: /mcp/[app-id]. Each connection talks to exactly one NightOwl app. Copy the app ID from the app's Settings page in the dashboard.
Claude Code
claude mcp add --transport http nightowl \
https://api.usenightowl.com/mcp/[app-id] \
--header "Authorization: Bearer [token]"Codex
[mcp_servers.nightowl]
url = "https://api.usenightowl.com/mcp/[app-id]"
bearer_token_env_var = "NIGHTOWL_MCP_TOKEN"Codex: export the token
# Add to ~/.zshrc (or ~/.bashrc), then `source` it
export NIGHTOWL_MCP_TOKEN="[token]"Codex: CLI alternative (skip the TOML edit)
codex mcp add nightowl \
--url https://api.usenightowl.com/mcp/[app-id] \
--bearer-token-env-var NIGHTOWL_MCP_TOKENCursor (native HTTP)
{
"mcpServers": {
"nightowl": {
"url": "https://api.usenightowl.com/mcp/[app-id]",
"headers": {
"Authorization": "Bearer ${env:NIGHTOWL_MCP_TOKEN}"
}
}
}
}Stdio-only clients (via mcp-remote)
{
"mcpServers": {
"nightowl": {
"command": "npx",
"args": [
"mcp-remote",
"https://api.usenightowl.com/mcp/[app-id]",
"--header",
"Authorization: Bearer [token]"
]
}
}
}
Windsurf and Zed support remote HTTP servers too: give them the same URL and Authorization header in their MCP settings. The mcp-remote shim is only a fallback for clients that can't.
In Claude Code, run /mcp after adding the server to verify it connected. You should see the NightOwl tools listed. In Cursor, the tools appear in the AI panel under the NightOwl server entry after the JSON is saved.
3. Tool reference
The per-app server has 51 tools. Every tool operates on the app ID in the URL, so AI clients never need to pass app_id as an argument. Tool names are the kebab-case class names. The issue tools:
| Tool | What it does |
|---|---|
| list-issues-tool | Filter exception or performance issues by status, environment, priority, assignee, or search term. Returns compact summaries. |
| get-issue-tool | Full issue detail: metadata, comments and activity timeline. Exception issues add the latest exception, its stack trace and recent occurrences; performance issues add recent executions over the threshold. |
| get-stack-trace-tool | Parsed stack frames flagged app vs vendor. Optional trace_id for a specific occurrence. |
| get-issue-occurrences-tool | Time-bucketed counts over 24h / 7d / 30d, plus breakdown by environment and unique users affected. |
| update-issue-status-tool | Change status (open / resolved / ignored), priority, assignee, or description. A status change fires your configured alert channels. |
| bulk-update-issues-tool | Change the status of up to 200 issues in one call. |
| add-issue-comment-tool | Post a markdown comment. Pass resolve:true to resolve the issue in the same call. |
| Telemetry tools | list-* and get-* tools for requests (including route detail), exceptions, queries, jobs, commands, scheduled tasks, cache events, logs, mail, notifications, outgoing requests and users, plus dashboard-overview-tool. |
| Configuration tools | Alert channels (list, create, update, delete, toggle, test), settings, environments and thresholds. |
| Data management tools | filter-options-tool, preview-deletion-tool and destroy-data-tool. Deleting requires confirm:"YES", and the server tells the assistant to preview first. |
Account-level work (apps, teams, invitations, MCP tokens, agent health, subscription status) lives on a separate server at /mcp/platform with 25 tools, using the same kind of token.
4. Safety model
Letting an AI agent write to your production monitoring data deserves a careful threat model. Here is how NightOwl handles it:
- Scoped tokens. Tokens can only access apps the owning user can open in the dashboard. The URL's app ID is checked against that access on every call.
- Same roles as the dashboard. Tools that change data need the admin or owner role on the app. Read-only members can read but not mutate.
- Audit trail. Every issue change made through MCP writes an activity record with
actor_type=mcpandactor_metacarrying the token label and client user-agent. The dashboard timeline renders AI-authored actions distinctly. - Revoke. Deleting a token from the Tokens page rejects every later call made with it. A call that is already running finishes.
- Alert parity. Status changes made via MCP fire the same alert channels (Slack, Discord, webhook, email) that a human status change would, so your on-call engineer still sees them. Comments, priority and assignee changes don't send alerts.
- Ability-gated. A personal access token needs the
mcpability to reach the server. Tokens created on the Tokens page carry it.
5. Example triage session
With the server connected, ask your AI assistant a question that spans your NightOwl data and your codebase:
> What are the top three open exceptions in production right now,
and is any of them caused by code I changed in the last week?
The assistant calls list-issues-tool with {status: "open", environment: "production", limit: 3}, then get-issue-tool for each hit, then runs git log locally to cross-reference authorship.
When you've fixed one, the assistant can close the loop:
> Mark issue #4812 as resolved and leave a comment explaining
that the null check in OrderService was the fix.
One add-issue-comment-tool call with resolve:true. The comment and the status change are saved together in one transaction, then the resolved alert goes out to your channels. Both show up in the issue timeline attributed to MCP rather than to you directly.