Connect an AI agent

Learn how to connect Claude Code or any MCP client to UptimeX with an API key.

This page explains how to connect an AI agent to UptimeX over the Model Context Protocol, so the agent can list, create, change, test, and delete monitors in a project.

#Prerequisites

  • An API key for the project. Create one under Access tokens in Project Settings. See REST API.
  • An MCP client that supports remote HTTP servers, such as Claude Code, Claude, or your own agent.

#The server

Code
https://api.uptimex.co/mcp

The server speaks JSON-RPC 2.0 over HTTP POST, stateless, with JSON responses. Authentication is the API key as a Bearer token. Listing the tools works without a key, and every tool call needs one.

#Connect from Claude Code

Register the server from the terminal:

Shell
claude mcp add --transport http uptimex \
  https://api.uptimex.co/mcp \
  --header "Authorization: Bearer upk_your_key"

#Connect from a client with a config file

Add the server to the client's MCP configuration:

JSON
{
  "mcpServers": {
    "uptimex": {
      "type": "http",
      "url": "https://api.uptimex.co/mcp",
      "headers": { "Authorization": "Bearer upk_your_key" }
    }
  }
}

#Connect from a client with a connector UI

Add a custom remote MCP server, paste the endpoint, and set the Authorization header to Bearer upk_your_key. The MCP server card in Project Settings shows the endpoint and a prompt you can paste to start an agent off.

#Try it

Ask the agent to monitor a site:

Code
Add a monitor for https://example.com, checked every 5 minutes.

The server's instructions tell the agent to list your monitors first, so it does not create a duplicate, and to confirm with you before creating anything. A key that has reached its plan's monitor limit returns monitor_limit, which the agent reports back.

#Scope and limits

  • A key binds the agent to one project. It can touch that project's monitors and nothing else, and it can never create keys or change account settings.
  • Tool calls count against the account's API rate limit: 30 a minute on the free plan, 120 on Pro, 300 on Team.
  • Every monitor the agent creates, changes, or deletes is recorded in the project's audit log on Team.

Give agents short-lived keys

Create a key with a 1 hour or 1 day expiry for an experiment, and revoke it from Access tokens whenever you like.

#What's next?