MCP setup

Connect Cursor, Claude, and other MCP clients to ServerMetry for AI-assisted monitoring.

View as Markdown

ServerMetry exposes an MCP endpoint so AI assistants can query servers, alerts, and related resources — and perform selected write actions.

Endpoint

EnvironmentMCP URL
Productionhttps://api.servermetry.com/mcp
Local APIhttp://localhost:3601/mcp

Use the direct API URL for MCP clients. Do not point Cursor/Claude at the frontend origin.

Create an MCP key

  1. Sign in to the dashboard
  2. Open Settings → MCP Keys (or API Keys)
  3. Create a key — it is shown once; store it securely

Keys are organization-scoped (sp_mcp_…).

Cursor

Add to ~/.cursor/mcp.json or a project .cursor/mcp.json:

{
  "mcpServers": {
    "servermetry": {
      "url": "https://api.servermetry.com/mcp",
      "headers": {
        "Authorization": "Bearer sp_mcp_YOUR_KEY"
      }
    }
  }
}

Reload Cursor so the MCP connection refreshes.

Claude Desktop / Claude Code

Use the same URL and Authorization: Bearer … header in the Claude MCP server config (see the dashboard page for a ready-made JSON snippet).

Example tools

ToolPurpose
get_dashboardAggregated overview
list_servers / get_serverFleet and server detail
list_alerts / resolve_alertAlert triage
list_alert_rules / create_alert_rule / delete_alert_ruleRule management
list_notification_channelsChannels
list_services / create_service / …Service monitoring
list_projects / create_project / …Projects
list_backup_plans / create_backup_planBackup plans
list_maintenance_windows / …Maintenance
list_templatesTemplates

The full tool list is returned by the MCP tools/list handshake.

Example prompts

Use ServerMetry MCP: list all servers with status OFFLINE or CRITICAL and summarize what is going on.
Via ServerMetry MCP: list open CRITICAL alerts, group by server, and suggest which alert rules to review.
Create a global alert rule via ServerMetry MCP: name "High CPU", metric cpuUsagePercent, operator GT, threshold 90, severity CRITICAL, evaluation window 5 minutes.

Security

  • Never commit MCP keys to git
  • Rotate keys regularly (delete + recreate in the dashboard)
  • On compromise, delete the key immediately

Troubleshooting

ProblemFix
401 UnauthorizedCheck key and Bearer prefix
No connectionUse API URL (not frontend), valid HTTPS
No tools listedReload MCP panel; verify key org access
Empty server listKey belongs to a different organization