MCP server
Use Claude Code, Cursor, VS Code, or any MCP client to read and configure your Nightlamp workspace. This guide covers keys, client setup, the 27-tool surface, confirmation rules, and limits.
Nightlamp's MCP server is a remote Model Context Protocol endpoint at https://api.nightlamp.app/mcp. Authenticate with one nlk_mcp_ tenant key and an MCP client such as Claude Code, Cursor, or VS Code can read and configure apps, monitors, alert rules, notification recipients, and log subscriptions in that workspace.
How do I create an MCP key?
Sign in, open Account, and use MCP access to create a key. The full token is shown once; we store only a hash. Each workspace can hold three active MCP keys, so issue one per machine or teammate and revoke any one without touching the others.
MCP keys are separate from programmatic API keys. An nlk_org_ or nlk_app_ key cannot authenticate MCP, and an MCP key cannot authenticate the REST API. MCP keys can only be created, listed, rotated, and revoked in the dashboard, never through MCP.
How do I connect Claude Code, Cursor, or VS Code?
Send the key as Authorization: Bearer nlk_mcp_…. The MCP access card fills these snippets in with your token.
Claude Code
claude mcp add --transport http nightlamp https://api.nightlamp.app/mcp \ --header "Authorization: Bearer nlk_mcp_…"
Cursor — ~/.cursor/mcp.json
{
"mcpServers": {
"nightlamp": {
"url": "https://api.nightlamp.app/mcp",
"headers": {
"Authorization": "Bearer nlk_mcp_…"
}
}
}
}VS Code — .vscode/mcp.json
{
"servers": {
"nightlamp": {
"type": "http",
"url": "https://api.nightlamp.app/mcp",
"headers": {
"Authorization": "Bearer nlk_mcp_…"
}
}
}
}The Cursor and VS Code files hold the key in plain text. Keep them out of version control, or add the key to your user-level config instead.
Which tools can my agent call?
Every tool is scoped to the key's workspace. An app, monitor, alert rule, log subscription, issue, or incident in another workspace answers exactly like a missing ID: not_found.
Which read tools are available?
get_orglist_appsget_appget_app_capabilitieslist_monitorsget_monitorget_monitor_schemalist_alert_ruleslist_log_subscriptionslist_issuesget_issuelist_incidentsget_incidentlist_issue_events
Which write tools change configuration?
create_appupdate_approtate_app_secretcreate_monitorupdate_monitordelete_monitorcreate_alert_ruleupdate_alert_ruledelete_alert_ruleseed_default_alert_rulesupdate_org_recipientscreate_log_subscriptiondelete_log_subscription
Use get_monitor_schema for the exact fields, required flags, defaults, bounds, and worked example of any check type. create_monitor takes a check_type and a config object; the same registry validates it as the dashboard.
Which MCP calls require confirmation?
Destructive tools preview their effect and change nothing until called again with confirm: true. The destructive set is delete monitor, delete alert rule, delete log subscription, rotate a secret, disable monitoring, pause a monitor, disable an alert rule, and replace notification recipients. Routine edits apply immediately.
Every write leaves an audit row with the tool, key, argument hash, result, and timestamp. The MCP access card shows the latest 50 writes. Raw arguments and secret values are never stored in audit rows.
What does an MCP session look like?
Ask in plain English. The agent picks the tools and asks before anything destructive.
Prompt
Add a heartbeat monitor to my-storefront that expects a ping every 5 minutes, then show me the resulting monitor.
The agent reads get_app_capabilities, calls get_monitor_schema for heartbeat, creates the monitor, and reads it back with get_monitor.
What are the MCP requirements and limits?
- A Nightlamp workspace and a human session to create the key.
- An MCP client that supports streamable HTTP with a custom header.
- Three active MCP keys per workspace; the raw token is shown once.
- Requests are limited to 120 per minute per key with a 20-request burst and 5,000 per hour.
- MCP inherits the API availability target; it does not have a separate SLO.
For the REST control plane behind these tools, see Programmatic setup and the API reference.