Skip to main content
NightOwl ships two remote MCP servers so AI coding assistants can drive the full dashboard — browse telemetry, triage issues, provision apps, manage teams, configure alert channels. Every AI-initiated change is logged with actor_type=mcp, so human and AI edits stay visually distinct and a token can be revoked instantly.

1. Generate a personal access token

Sign in to the dashboard, open Account → MCP Tokens, and create a token with a memorable label (e.g. “Laptop — Claude Code”). The raw token is shown once — copy it immediately; only the label, creation date, and last-used timestamp are visible afterwards. Revoking a token blocks every client using it instantly. Tokens are user-scoped, inherit your team membership, and carry the mcp ability — they only work against the MCP endpoints.

2. The two servers

NightOwl exposes two MCP endpoints. You’ll usually register both. The platform server has 25 tools; the tenant server has 53. Full coverage of the dashboard’s CRUD surface.

3. Connect your client

Claude Code

Register both servers:
Run /mcp in Claude Code to verify both servers connected.

Codex

Codex reads MCP servers from ~/.codex/config.toml and resolves the bearer token from an environment variable. Edit the config:
Then export the token in your shell profile (~/.zshrc, ~/.bashrc, etc.):
Reload the shell (source ~/.zshrc) so Codex picks up the variable. Both servers can share the same env var, or use distinct ones if you’d rather scope tokens per server. If you’d rather not edit config.toml by hand, the same registration works via the CLI (token must already be exported):

Cursor

Cursor speaks bearer-token HTTP MCP natively. Add to .cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (global):
The ${env:NIGHTOWL_MCP_TOKEN} reference keeps the raw token out of the file — export it from your shell profile. Cursor reloads the file when you save it.

Windsurf, Zed, and other stdio-only clients (via mcp-remote)

For clients that don’t yet support remote HTTP MCP, the mcp-remote shim proxies a remote server as stdio:
Self-hosted NightOwl? Replace https://api.usenightowl.com with your own API URL. The paths are identical.

4. What’s available

Platform server (/mcp/platform)

Tenant server (/mcp/<app-id>)

⚠ = destructive. These tools require an explicit confirm: "YES" argument and cannot be invoked accidentally.

5. Safety model

Scoped tokens

Tokens can only access apps where the owning user is a team member. The URL’s app-id is validated on every call.

Audit trail

Every mutating call writes an activity record with actor_type=mcp and actor_meta carrying the token label and client user-agent.

Instant revoke

Deleting a token from Account → MCP Tokens blocks every client using it — no redeploy, no restart.

Confirmation gates

Destructive tools (delete_app, regenerate_app_token, destroy_data) refuse to execute without confirm: "YES". Dry-run counterparts (preview_deletion) are always safe.

Webhook parity

Status changes made via MCP fire the same Slack, Discord, email, and webhook channels that a human edit would.

Self-revoke protection

delete_mcp_token refuses to delete the token currently making the call. Revoke it from the dashboard instead.

6. Example workflows

Once both servers are connected, a single prompt can span NightOwl data, your codebase, and team operations:
The assistant calls list_issues on the tenant server, then get_issue on each hit, then runs git log locally to cross-reference authorship — root cause in one turn. Close the loop:
A single bulk_update_issues call flips both statuses, writes activity rows, and fires the configured alert channels — attributed to MCP rather than to you directly. Provision a new environment:
Two platform calls (test_app_connection, create_app) — the agent token comes back once in the response. Retention cleanup:
preview_deletion returns per-table row counts. Claude reads them, summarizes, and only invokes destroy_data (with confirm: "YES") after you approve.

Troubleshooting

Most common cause: a stale or mistyped token. Regenerate it in the dashboard and re-add the MCP server. Some clients cache server metadata — remove and re-add the server entry to force a refresh.
The app-id in the URL must match an app your user account has team access to. Copy the ID directly from the Apps page — it’s the last segment of the app detail URL.
Destructive tools require confirm: "YES" (exact string, uppercase, no punctuation). This is deliberate — it prevents a misinterpreted prompt from wiping an app.
Tools flush the app cache, so the dashboard refreshes within its normal polling interval (30s for list pages, 10s for dashboards). If it lingers longer, hard-refresh the browser tab.
The timeline supports filtering by actor_type. MCP-authored actions share the timeline with human ones and are only hidden if the filter excludes them.