Metadata-Version: 2.4
Name: uptime-kuma-agent
Version: 2.3.3
Summary: Agent for interacting with Uptime Kuma API
Author-email: Project Maintainers <maintainers@users.noreply.github.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: <3.15,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1
Requires-Dist: uptime-kuma-api>=1.2.1
Requires-Dist: requests>=2.34.2
Provides-Extra: mcp
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
Provides-Extra: all
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "all"
Provides-Extra: test
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
Requires-Dist: pytest>=9.1.1; extra == "test"
Requires-Dist: pytest-asyncio>=1.4.0; extra == "test"
Requires-Dist: pytest-cov>=7.1.0; extra == "test"
Dynamic: license-file

# Uptime Kuma Agent
## CLI or API | MCP | Agent

![PyPI - Version](https://img.shields.io/pypi/v/uptime-kuma-agent)
![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
![PyPI - Downloads](https://img.shields.io/pypi/dd/uptime-kuma-agent)
![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/uptime-kuma-agent)
![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/uptime-kuma-agent)
![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/uptime-kuma-agent)
![PyPI - License](https://img.shields.io/pypi/l/uptime-kuma-agent)
![GitHub](https://img.shields.io/github/license/Knuckles-Team/uptime-kuma-agent)
![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/uptime-kuma-agent)
![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/uptime-kuma-agent)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/uptime-kuma-agent)
![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/uptime-kuma-agent)
![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/uptime-kuma-agent)
![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/uptime-kuma-agent)
![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/uptime-kuma-agent)
![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/uptime-kuma-agent)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/uptime-kuma-agent)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/uptime-kuma-agent)

*Version: 2.3.3*

> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
> interfaces, the integrated A2A agent, and guidance for provisioning the Uptime Kuma
> platform are maintained in the [official documentation](https://knuckles-team.github.io/uptime-kuma-agent/).

---

## Table of Contents
- [Overview](#overview)
- [Key Features](#key-features)
- [Environment Variables](#environment-variables)
- [Usage & Quick Start](#usage--quick-start)
- [MCP Architecture](#mcp)
- [Agentic Graph Architecture](#agent)
- [Security & Access Governance](#security--governance)
- [Installation](#installation)
- [Documentation](#documentation)
- [Contribution Guidelines](#contribute)

---

## Overview

**Uptime Kuma Agent** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Agent for interacting with Uptime Kuma API.

---

## Key Features

- **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
- **Enterprise-Grade Security:** Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
- **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
- **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.

---

## Environment Variables

<!-- ENV-VARS-TABLE:START -->

#### Package environment variables

| Variable | Example | Description |
|----------|---------|-------------|
| `HOST` | `0.0.0.0` |  |
| `PORT` | `8000` |  |
| `TRANSPORT` | `stdio` | options: stdio, streamable-http, sse |
| `ENABLE_OTEL` | `True` |  |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `http://localhost:8080/api/public/otel` |  |
| `OTEL_EXPORTER_OTLP_PUBLIC_KEY` | secret-injected |  |
| `OTEL_EXPORTER_OTLP_SECRET_KEY` | secret-injected |  |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `http/protobuf` |  |
| `EUNOMIA_TYPE` | `none` | options: none, embedded, remote |
| `EUNOMIA_POLICY_FILE` | `mcp_policies.json` |  |
| `EUNOMIA_REMOTE_URL` | `http://eunomia-server:8000` |  |
| `UPTIME_KUMA_URL` | `http://localhost:3001` |  |
| `UPTIME_KUMA_TOKEN` | secret-injected |  |
| `UPTIME_KUMA_USERNAME` | `admin (used if AUTH_TYPE is password)` |  |
| `UPTIME_KUMA_PASSWORD` | secret-injected |  |
| `AUTH_TYPE` | `password` | options: password, token |
| `CADDYFILE_PATH` | `${CADDY_CONFIG_PATH}` | Caddyfile parsed by the kuma-sync skill |
| `KUMA_DB_PATH` | `${UPTIME_KUMA_DATA_PATH}/kuma.db` | Uptime-Kuma SQLite DB used by the kuma-sync skill |
| `MONITORSTOOL` | `True` |  |
| `STATUSTOOL` | `True` |  |

#### Inherited agent-connector-sdk variables (apply to every connector)

| Variable | Example | Description |
|----------|---------|-------------|
| `MCP_TOOL_MODE` | `intent` | Tool surface: `intent` \| `condensed` \| `verbose` \| `both` |
| `MCP_ENABLED_TOOLS` | — | Comma-separated tool allow-list |
| `MCP_DISABLED_TOOLS` | — | Comma-separated tool deny-list |
| `MCP_ENABLED_TAGS` | — | Comma-separated tag allow-list |
| `MCP_DISABLED_TAGS` | — | Comma-separated tag deny-list |
| `MCP_CLIENT_AUTH` | — | Outbound MCP child auth: `oidc-client-credentials` \| `basic` \| `none` |
| `OIDC_CLIENT_ID` | — | OIDC client id (service-account auth) |
| `OIDC_CLIENT_SECRET_REF` | `secret://identity/oidc-client-secret` | Runtime secret reference for the OIDC service account |
| `MCP_BASIC_AUTH_USERNAME` | — | HTTP Basic username (`MCP_CLIENT_AUTH=basic`) |
| `MCP_BASIC_AUTH_PASSWORD_REF` | `secret://identity/mcp-basic-password` | Runtime secret reference for HTTP Basic auth (`MCP_CLIENT_AUTH=basic`) |
| `DEBUG` | `False` | Verbose logging |
| `PYTHONUNBUFFERED` | `1` | Unbuffered stdout (recommended in containers) |
| `MCP_URL` | `http://localhost:8000/mcp` | URL of the MCP server the agent connects to |
| `PROVIDER` | `openai` | LLM provider for the agent |
| `MODEL_ID` | `gpt-4o` | Model id for the agent |
| `ENABLE_WEB_UI` | `True` | Serve the AG-UI web interface |

_20 package + 16 inherited variable(s). Auto-generated from `.env.example` + the shared agent-connector-sdk set — do not edit._
<!-- ENV-VARS-TABLE:END -->


The agent's behavior and connections can be fully configured via environment variables.

| Environment Variable | Source Type | Default Value | Description |
|----------------------|-------------|---------------|-------------|
| `HOST` | System / Docker | `0.0.0.0` | IP interface address for the MCP and Agent servers to bind to. |
| `PORT` | System / Docker | `8000` | Port number for HTTP/SSE transports. |
| `TRANSPORT` | System / Docker | `stdio` | MCP transport channel. Supported values: `stdio`, `streamable-http`, `sse`. |
| `MCP_TOOL_MODE` | MCP / Tools | `condensed` | Tool surface: `condensed`, `verbose`, or `both`. |
| `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS` | MCP / Tools | None | Comma-separated tool allow/deny list. |
| `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS` | MCP / Tools | None | Comma-separated tag allow/deny list. |
| `PYTHONUNBUFFERED` | System / Docker | `1` | Unbuffered stdout (recommended in containers). |
| `DEBUG` | System / Docker | `False` | Verbose logging. |
| `UPTIME_KUMA_URL` | App Credential | `http://localhost:3001` | The base URL of the operator's target Uptime Kuma instance. |
| `AUTH_TYPE` | App Credential | None | Type of authentication used. Supported values: `password`, `token`. |
| `UPTIME_KUMA_TOKEN` | App Credential | None | Authentication token (if `AUTH_TYPE` is `token`). |
| `UPTIME_KUMA_USERNAME`| App Credential | None | Login username (if `AUTH_TYPE` is `password`). |
| `UPTIME_KUMA_PASSWORD`| App Credential | None | Login password (if `AUTH_TYPE` is `password`). |
| `MONITORSTOOL` | Toggle switch | `True` | Set to `False` to completely disable the `uptime_kuma_monitors` MCP tool. |
| `STATUSTOOL` | Toggle switch | `True` | Set to `False` to completely disable the `uptime_kuma_status` MCP tool. |
| `CADDYFILE_PATH` | Kuma Sync Skill | deployment-provided | Caddyfile parsed by the `uptime-kuma-sync` skill. |
| `KUMA_DB_PATH` | Kuma Sync Skill | deployment-provided | Uptime-Kuma SQLite DB used by the `uptime-kuma-sync` skill. |
| `ENABLE_OTEL` | Tracing Switch| `True` | Enable telemetry exports via OpenTelemetry standards. |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Tracing | `http://langfuse.example.invalid/api/public/otel` | Core endpoint URL for exporting tracing and span data. |
| `OTEL_EXPORTER_OTLP_PUBLIC_KEY` / `OTEL_EXPORTER_OTLP_SECRET_KEY` | Tracing | None | OTLP exporter auth keys. |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | Tracing | None | OTLP protocol (e.g. `http/protobuf`). |
| `EUNOMIA_TYPE` | Governance | `none` | Policy enforcement style. Options: `none`, `embedded`, `remote`. |
| `EUNOMIA_POLICY_FILE` | Governance | `mcp_policies.json` | Path to the operator's local Eunomia JSON policy parameters. |
| `EUNOMIA_REMOTE_URL` | Governance | None | Remote Eunomia server URL (when `EUNOMIA_TYPE=remote`). |
| `MCP_URL` | Agent (`[agent]`) | `http://localhost:8000/mcp` | URL of the MCP server the agent connects to. |
| `PROVIDER` | Agent (`[agent]`) | `openai` | LLM provider for the integrated agent. |
| `MODEL_ID` | Agent (`[agent]`) | `gpt-4o` | Model id for the integrated agent. |
| `ENABLE_WEB_UI` | Agent (`[agent]`) | `True` | Serve the AG-UI web interface. |

---

## Usage & Quick Start

To bootstrap and run the agent:

1. **Configure Environment:** Create a `.env` file from the provided template:
   ```bash
   cp .env.example .env
   # Add your target Uptime Kuma credentials
   ```

2. **Run MCP Server locally via CLI:**
   ```bash
   uv run uptime-mcp
   ```

3. **Interact with the Pydantic AI Graph Agent CLI:**
   ```bash
   uv run uptime-agent --provider openai --model-id gpt-4o
   ```

---

## MCP

This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

### Available MCP Tools

_Auto-generated from the live MCP server — do not edit by hand._

<!-- MCP-TOOLS-TABLE:START -->

#### Condensed action-routed tools (`MCP_TOOL_MODE=condensed`)

| MCP Tool | Toggle Env Var | Description |
|----------|----------------|-------------|
| `uptime_ingest_monitors` | `INGESTTOOL` | Natively ingest Uptime Kuma monitors into epistemic-graph as typed nodes. |
| `uptime_kuma_monitors` | `MONITORSTOOL` | Manage uptime kuma monitors operations. |
| `uptime_kuma_status` | `STATUSTOOL` | Manage uptime kuma status operations. |

#### Verbose 1:1 API-mapped tools (`MCP_TOOL_MODE=verbose` or `both`)

<details>
<summary>88 per-operation tools — one per public API method (click to expand)</summary>

| MCP Tool | Toggle Env Var | Description |
|----------|----------------|-------------|
| `uptime_kuma_add_api_key` | `UPTIME_KUMA_APITOOL` | Adds a new api key. |
| `uptime_kuma_add_docker_host` | `UPTIME_KUMA_APITOOL` | Add a docker host. |
| `uptime_kuma_add_maintenance` | `UPTIME_KUMA_APITOOL` | Adds a maintenance. |
| `uptime_kuma_add_monitor` | `UPTIME_KUMA_APITOOL` | Adds a new monitor. |
| `uptime_kuma_add_monitor_maintenance` | `UPTIME_KUMA_APITOOL` | Adds monitors to a maintenance. |
| `uptime_kuma_add_monitor_tag` | `UPTIME_KUMA_APITOOL` | Add a tag to a monitor. |
| `uptime_kuma_add_notification` | `UPTIME_KUMA_APITOOL` | Add a notification. |
| `uptime_kuma_add_proxy` | `UPTIME_KUMA_APITOOL` | Add a proxy. |
| `uptime_kuma_add_status_page` | `UPTIME_KUMA_APITOOL` | Add a status page. |
| `uptime_kuma_add_status_page_maintenance` | `UPTIME_KUMA_APITOOL` | Adds status pages to a maintenance. |
| `uptime_kuma_add_tag` | `UPTIME_KUMA_APITOOL` | Add a tag. |
| `uptime_kuma_avg_ping` | `UPTIME_KUMA_APITOOL` | Get average ping. |
| `uptime_kuma_cert_info` | `UPTIME_KUMA_APITOOL` | Get certificate info. |
| `uptime_kuma_change_password` | `UPTIME_KUMA_APITOOL` | Change password. |
| `uptime_kuma_check_apprise` | `UPTIME_KUMA_APITOOL` | Check if apprise exists. |
| `uptime_kuma_clear_events` | `UPTIME_KUMA_APITOOL` | Clear monitor events. |
| `uptime_kuma_clear_heartbeats` | `UPTIME_KUMA_APITOOL` | Clear monitor heartbeats. |
| `uptime_kuma_clear_statistics` | `UPTIME_KUMA_APITOOL` | Clear statistics. |
| `uptime_kuma_connect` | `UPTIME_KUMA_APITOOL` | Connects to Uptime Kuma. |
| `uptime_kuma_delete_api_key` | `UPTIME_KUMA_APITOOL` | Enable an api key. |
| `uptime_kuma_delete_docker_host` | `UPTIME_KUMA_APITOOL` | Delete a docker host. |
| `uptime_kuma_delete_maintenance` | `UPTIME_KUMA_APITOOL` | Deletes a maintenance. |
| `uptime_kuma_delete_monitor` | `UPTIME_KUMA_APITOOL` | Deletes a monitor. |
| `uptime_kuma_delete_monitor_tag` | `UPTIME_KUMA_APITOOL` | Delete a tag from a monitor. |
| `uptime_kuma_delete_notification` | `UPTIME_KUMA_APITOOL` | Delete a notification. |
| `uptime_kuma_delete_proxy` | `UPTIME_KUMA_APITOOL` | Delete a proxy. |
| `uptime_kuma_delete_status_page` | `UPTIME_KUMA_APITOOL` | Delete a status page. |
| `uptime_kuma_delete_tag` | `UPTIME_KUMA_APITOOL` | Delete a tag. |
| `uptime_kuma_disable_2fa` | `UPTIME_KUMA_APITOOL` | Disable 2FA for this user. |
| `uptime_kuma_disable_api_key` | `UPTIME_KUMA_APITOOL` | Disable an api key. |
| `uptime_kuma_disconnect` | `UPTIME_KUMA_APITOOL` | Disconnects from Uptime Kuma. |
| `uptime_kuma_edit_docker_host` | `UPTIME_KUMA_APITOOL` | Edit a docker host. |
| `uptime_kuma_edit_maintenance` | `UPTIME_KUMA_APITOOL` | Edits a maintenance. |
| `uptime_kuma_edit_monitor` | `UPTIME_KUMA_APITOOL` | Edits an existing monitor. |
| `uptime_kuma_edit_notification` | `UPTIME_KUMA_APITOOL` | Edit a notification. |
| `uptime_kuma_edit_proxy` | `UPTIME_KUMA_APITOOL` | Edit a proxy. |
| `uptime_kuma_edit_tag` | `UPTIME_KUMA_APITOOL` | Edits an existing tag. |
| `uptime_kuma_enable_api_key` | `UPTIME_KUMA_APITOOL` | Enable an api key. |
| `uptime_kuma_get_api_key` | `UPTIME_KUMA_APITOOL` | Get an api key. |
| `uptime_kuma_get_api_keys` | `UPTIME_KUMA_APITOOL` | Get all api keys. |
| `uptime_kuma_get_database_size` | `UPTIME_KUMA_APITOOL` | Get database size. |
| `uptime_kuma_get_docker_host` | `UPTIME_KUMA_APITOOL` | Get a docker host. |
| `uptime_kuma_get_docker_hosts` | `UPTIME_KUMA_APITOOL` | Get all docker hosts. |
| `uptime_kuma_get_game_list` | `UPTIME_KUMA_APITOOL` | Get a list of games that are supported by the GameDig monitor type. |
| `uptime_kuma_get_heartbeats` | `UPTIME_KUMA_APITOOL` | Get heartbeats. |
| `uptime_kuma_get_important_heartbeats` | `UPTIME_KUMA_APITOOL` | Get important heartbeats. |
| `uptime_kuma_get_maintenance` | `UPTIME_KUMA_APITOOL` | Get a maintenance. |
| `uptime_kuma_get_maintenances` | `UPTIME_KUMA_APITOOL` | Get all maintenances. |
| `uptime_kuma_get_monitor` | `UPTIME_KUMA_APITOOL` | Get a monitor. |
| `uptime_kuma_get_monitor_beats` | `UPTIME_KUMA_APITOOL` | Get monitor beats for a specific monitor in a time range. |
| `uptime_kuma_get_monitor_maintenance` | `UPTIME_KUMA_APITOOL` | Gets all monitors of a maintenance. |
| `uptime_kuma_get_monitor_status` | `UPTIME_KUMA_APITOOL` | Get the monitor status. |
| `uptime_kuma_get_monitors` | `UPTIME_KUMA_APITOOL` | Get all monitors. |
| `uptime_kuma_get_notification` | `UPTIME_KUMA_APITOOL` | Get a notification. |
| `uptime_kuma_get_notifications` | `UPTIME_KUMA_APITOOL` | Get all notifications. |
| `uptime_kuma_get_proxies` | `UPTIME_KUMA_APITOOL` | Get all proxies. |
| `uptime_kuma_get_proxy` | `UPTIME_KUMA_APITOOL` | Get a proxy. |
| `uptime_kuma_get_settings` | `UPTIME_KUMA_APITOOL` | Get settings. |
| `uptime_kuma_get_status_page` | `UPTIME_KUMA_APITOOL` | Get a status page. |
| `uptime_kuma_get_status_page_maintenance` | `UPTIME_KUMA_APITOOL` | Gets all status pages of a maintenance. |
| `uptime_kuma_get_status_pages` | `UPTIME_KUMA_APITOOL` | Get all status pages. |
| `uptime_kuma_get_tag` | `UPTIME_KUMA_APITOOL` | Get a tag. |
| `uptime_kuma_get_tags` | `UPTIME_KUMA_APITOOL` | Get all tags. |
| `uptime_kuma_info` | `UPTIME_KUMA_APITOOL` | Get server info. |
| `uptime_kuma_login` | `UPTIME_KUMA_APITOOL` | Login. |
| `uptime_kuma_login_by_token` | `UPTIME_KUMA_APITOOL` | Login by token. |
| `uptime_kuma_logout` | `UPTIME_KUMA_APITOOL` | Logout. |
| `uptime_kuma_need_setup` | `UPTIME_KUMA_APITOOL` | Check if the server has already been set up. |
| `uptime_kuma_pause_maintenance` | `UPTIME_KUMA_APITOOL` | Pauses a maintenance. |
| `uptime_kuma_pause_monitor` | `UPTIME_KUMA_APITOOL` | Pauses a monitor. |
| `uptime_kuma_post_incident` | `UPTIME_KUMA_APITOOL` | Post an incident to status page. |
| `uptime_kuma_prepare_2fa` | `UPTIME_KUMA_APITOOL` | Prepare 2FA configuration. |
| `uptime_kuma_resume_maintenance` | `UPTIME_KUMA_APITOOL` | Resumes a maintenance. |
| `uptime_kuma_resume_monitor` | `UPTIME_KUMA_APITOOL` | Resumes a monitor. |
| `uptime_kuma_save_2fa` | `UPTIME_KUMA_APITOOL` | Save the current 2FA configuration. |
| `uptime_kuma_save_status_page` | `UPTIME_KUMA_APITOOL` | Save a status page. |
| `uptime_kuma_set_settings` | `UPTIME_KUMA_APITOOL` | Set settings. |
| `uptime_kuma_setup` | `UPTIME_KUMA_APITOOL` | Set up the server. |
| `uptime_kuma_shrink_database` | `UPTIME_KUMA_APITOOL` | Shrink database. |
| `uptime_kuma_test_chrome` | `UPTIME_KUMA_APITOOL` | Test if the chrome executable is valid and return the version. |
| `uptime_kuma_test_docker_host` | `UPTIME_KUMA_APITOOL` | Test a docker host. |
| `uptime_kuma_test_notification` | `UPTIME_KUMA_APITOOL` | Test a notification. |
| `uptime_kuma_twofa_status` | `UPTIME_KUMA_APITOOL` | Get current 2FA status. |
| `uptime_kuma_unpin_incident` | `UPTIME_KUMA_APITOOL` | Unpin an incident from a status page. |
| `uptime_kuma_upload_backup` | `UPTIME_KUMA_APITOOL` | Import Backup. |
| `uptime_kuma_uptime` | `UPTIME_KUMA_APITOOL` | Get monitor uptime. |
| `uptime_kuma_verify_token` | `UPTIME_KUMA_APITOOL` | Verify the provided 2FA token. |
| `uptime_kuma_wait_for_event` | `UPTIME_KUMA_APITOOL` | Invoke the wait_for_event operation. |

</details>

_3 action-routed tool(s) · 88 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (**`intent` default** — the six verb-tools, granular set loaded on demand · `condensed` action-routed · `verbose` 1:1 · `both`). Auto-generated — do not edit._
<!-- MCP-TOOLS-TABLE:END -->

Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/index.md](docs/index.md#mcp).

### Detailed Tool Actions Mapping
The action-routed tools wrap complex calls behind a simple, unified parameters scheme:

#### 1. `uptime_kuma_monitors`
Manage uptime kuma monitors operations. Action parameter must be one of:
- `get_monitors`: List all monitors.
- `get_monitor`: Fetch a single monitor details by ID (in `params_json`).
- `add_monitor`: Create a new monitor.
- `edit_monitor`: Modify an existing monitor.
- `delete_monitor`: Delete a monitor by ID.
- `pause_monitor`: Pause monitoring for a specific ID.
- `resume_monitor`: Resume monitoring for a specific ID.

#### 2. `uptime_kuma_status`
Fetch status and analytics. Action parameter must be one of:
- `get_heartbeats`: Fetch monitor heartbeat records.
- `info`: Fetch system stats and general status info.

### Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM's context window.

The operator can configure tool filtering via multiple input channels:

- **CLI Arguments:** Pass `--tools` or `--toolsets` (or their disabled counterparts `--disabled-tools` and `--disabled-toolsets`) during startup.
- **Environment Variables:** Define standard environment variables:
  - `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS`
  - `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS`
- **HTTP SSE Request Headers:** Pass custom headers during transport initialization:
  - `x-mcp-enabled-tools` / `x-mcp-disabled-tools`
  - `x-mcp-enabled-tags` / `x-mcp-disabled-tags`
- **HTTP SSE Request Query Parameters:** Append query parameters directly to the operator's transport connection URL:
  - `?tools=tool1,tool2`
  - `?tags=tag1`

When query strings or parameters are provided, an LLM-free **Knowledge Graph resolution layer** (using `DynamicToolOrchestrator`) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.

---

### MCP Configuration Examples

<!-- MCP-CONFIG-EXAMPLES:START -->

> **Install the connector-focused `[mcp]` extra.** Examples use `uptime-kuma-agent[mcp]` to add
> FastMCP / FastAPI through `agent-connector-sdk[mcp]`; the required Agent Utilities core
> still carries `epistemic-graph[full]`. The `[agent-runtime]` extra additionally
> enables model orchestration.

#### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)

```json
{
  "mcpServers": {
    "uptime-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "uptime-kuma-agent[mcp]",
        "uptime-mcp"
      ],
      "env": {
        "MCP_TOOL_MODE": "intent",
        "MONITORSTOOL": "True",
        "STATUSTOOL": "True",
        "UPTIME_KUMA_PASSWORD": "your_password_here",
        "UPTIME_KUMA_TOKEN": "your_token_here (used if AUTH_TYPE is token)",
        "UPTIME_KUMA_URL": "http://localhost:3001",
        "UPTIME_KUMA_USERNAME": "admin (used if AUTH_TYPE is password)"
      }
    }
  }
}
```

Runtime references require an alias-aware launcher such as Arbora. Other
launchers must omit those entries and inject the resolved values through their
own runtime secret boundary.

#### Streamable-HTTP Transport (networked / production)

```json
{
  "mcpServers": {
    "uptime-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "uptime-kuma-agent[mcp]",
        "uptime-mcp",
        "--transport",
        "streamable-http",
        "--port",
        "8000"
      ],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "127.0.0.1",
        "PORT": "8000",
        "MCP_TOOL_MODE": "intent",
        "MONITORSTOOL": "True",
        "STATUSTOOL": "True",
        "UPTIME_KUMA_PASSWORD": "your_password_here",
        "UPTIME_KUMA_TOKEN": "your_token_here (used if AUTH_TYPE is token)",
        "UPTIME_KUMA_URL": "http://localhost:3001",
        "UPTIME_KUMA_USERNAME": "admin (used if AUTH_TYPE is password)"
      }
    }
  }
}
```

Alternatively, connect to a pre-deployed Streamable-HTTP instance by `url`:

```json
{
  "mcpServers": {
    "uptime-mcp": {
      "url": "http://localhost:8000/uptime-mcp/mcp"
    }
  }
}
```

Run a reviewed container image as a least-privilege stdio child (no
listener or published port):

```bash
docker run -i --rm \
  --read-only \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --pids-limit=256 \
  --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
  -e TRANSPORT=stdio \
  -e MCP_TOOL_MODE=intent \
  -e MONITORSTOOL=True \
  -e STATUSTOOL=True \
  -e UPTIME_KUMA_PASSWORD=your_password_here \
  -e UPTIME_KUMA_TOKEN="your_token_here (used if AUTH_TYPE is token)" \
  -e UPTIME_KUMA_URL=http://localhost:3001 \
  -e UPTIME_KUMA_USERNAME="admin (used if AUTH_TYPE is password)" \
  registry.example.invalid/uptime-kuma-agent@sha256:<digest> uptime-mcp
```

For containerized network HTTP, supply an authenticated TLS ingress (or
direct server TLS), exact `MCP_ALLOWED_HOSTS`, and an exact trusted-proxy
CIDR policy through the operator-owned deployment profile. The generator
does not emit an unauthenticated non-loopback listener.

_Auto-generated from the code-read env surface (`MCP_TOOL_MODE` + package vars) — do not edit._
<!-- MCP-CONFIG-EXAMPLES:END -->

<!-- BEGIN GENERATED: additional-deployment-options -->
### Additional Deployment Options

`uptime-kuma-agent` can run as a local stdio process or container, or behind a remote
network boundary. The
[Deployment guide](https://knuckles-team.github.io/uptime-kuma-agent/deployment/) carries
the detailed transport contract.

- **Local container** — launch a reviewed immutable image as a least-privilege
  stdio child with no listener or published port.
- **Remote URL** — connect through an operator-supplied authenticated HTTPS
  ingress. Keep its URL, outbound identity references, trust profile, and exact
  `MCP_ALLOWED_HOSTS` in `AgentConfig`.
<!-- END GENERATED: additional-deployment-options -->

## Agent

This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts smoothly with the **Agent Web UI (AG-UI)** and Terminal interface.

### Running the Agent CLI
To start the interactive command-line agent:

```bash
# Set credentials
export UPTIME_KUMA_URL="http://localhost:3001"
export AUTH_TYPE="password"
export UPTIME_KUMA_USERNAME="admin"
export UPTIME_KUMA_PASSWORD="your-password"

# Run the agent server
uptime-agent --provider openai --model-id gpt-4o
```

### Docker Compose Orchestration
The following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:

```yaml
version: '3.8'

services:
  uptime-kuma-agent-mcp:
    image: example/uptime-kuma-agent:mcp
    container_name: uptime-kuma-agent-mcp
    hostname: uptime-kuma-agent-mcp
    restart: always
    env_file:
      - ../.env
    environment:
      - PYTHONUNBUFFERED=1
      - HOST=0.0.0.0
      - PORT=8000
      - TRANSPORT=streamable-http
    ports:
      - "8000:8000"
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

  uptime-kuma-agent-agent:
    image: example/uptime-kuma-agent@sha256:<digest>
    container_name: uptime-kuma-agent-agent
    hostname: uptime-kuma-agent-agent
    restart: always
    depends_on:
      - uptime-kuma-agent-mcp
    env_file:
      - ../.env
    command: [ "uptime-agent" ]
    environment:
      - PYTHONUNBUFFERED=1
      - HOST=0.0.0.0
      - PORT=9004
      - MCP_URL=http://uptime-kuma-agent-mcp:8000/mcp
      - PROVIDER=${PROVIDER:-openai}
      - MODEL_ID=${MODEL_ID:-gpt-4o}
      - ENABLE_WEB_UI=True
      - ENABLE_OTEL=True
    ports:
      - "9004:9004"
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9004/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

```

Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/index.md#agent](docs/index.md#agent).

---

## Security & Governance

Built directly upon the enterprise-ready [`agent-connector-sdk`](https://github.com/Knuckles-Team/agent-connector-sdk) core, standard security parameters are fully supported:

### Access Control & Policy Enforcement
- **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
- **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
- **Scoped Credentials:** Execution context runs restricted to the specific caller identity.

### Runtime Security Grid
| Feature | Feature | Enablement |
|---------|---------------|------------|
| **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
| **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
| **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |

---

## Installation

Pick the extra that matches what the operator want to run:

| Extra | Installs | Use when |
|-------|----------|----------|
| `uptime-kuma-agent[mcp]` | Connector-focused MCP server (`agent-connector-sdk[mcp]` — FastMCP/FastAPI + `epistemic-graph[full]`) | The operator only run the **MCP server** (smallest install / image) |
| `uptime-kuma-agent[agent]` | Agent runtime (`agent-connector-sdk[agent-runtime,logfire]` — model orchestration + `epistemic-graph[full]`) | The operator run the **integrated agent** |
| `uptime-kuma-agent[all]` | Everything (`mcp` + `agent` + `logfire`) | Development / both surfaces |

```bash
# Connector-focused MCP server (includes the shared graph engine)
uv pip install "uptime-kuma-agent[mcp]"

# Agent runtime (adds model orchestration to the shared graph engine)
uv pip install "uptime-kuma-agent[agent]"

# Everything (development)
uv pip install "uptime-kuma-agent[all]"      # or: python -m pip install "uptime-kuma-agent[all]"
```

### Container images (`:mcp` vs `:agent`)

One multi-stage `docker/Dockerfile` builds two right-sized images, selected by `--target`:

| Image tag | Build target | Contents | Entrypoint |
|-----------|--------------|----------|------------|
| `example/uptime-kuma-agent:mcp` | `--target mcp` | `uptime-kuma-agent[mcp]` — **connector-focused**, includes `epistemic-graph[full]`; no model-orchestration stack | `uptime-mcp` |
| `example/uptime-kuma-agent@sha256:<digest>` | `--target agent` (default) | `uptime-kuma-agent[agent]` — **agent runtime**, model orchestration + `epistemic-graph[full]` | `uptime-agent` |

```bash
docker build --target mcp   -t example/uptime-kuma-agent:mcp    docker/   # connector-focused MCP server
docker build --target agent -t example/uptime-kuma-agent:agent-local docker/   # agent runtime
```

`docker/mcp.compose.yml` runs the connector-focused `:mcp` server; `docker/agent.compose.yml` runs the
agent (`immutable agent digest`) with a co-located `:mcp` sidecar.

### Knowledge-graph database (`epistemic-graph`)

Both `[mcp]` and `[agent]` carry the **epistemic-graph** engine through the required
Agent Utilities core dependency (`epistemic-graph[full]`). The `[mcp]` extra keeps
the server connector-focused; `[agent]` also enables model orchestration. Local
deployments can use the bundled engine. For production or shared state, run
**epistemic-graph as a dedicated database service** and configure the runtime to use it.
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
diagrams are documented in the
[epistemic-graph deployment guide](https://knuckles-team.github.io/epistemic-graph/deployment/).

---

## Documentation

The complete documentation is published as the
[official documentation site](https://knuckles-team.github.io/uptime-kuma-agent/) and
is the recommended reference for installation, deployment, and day-to-day operation.

| Page | Contents |
|---|---|
| [Installation](https://knuckles-team.github.io/uptime-kuma-agent/installation/) | pip, source, extras, prebuilt Docker image |
| [Deployment](https://knuckles-team.github.io/uptime-kuma-agent/deployment/) | run the MCP server and agent, Compose, Caddy + Technitium, env config |
| [Usage](https://knuckles-team.github.io/uptime-kuma-agent/usage/) | the MCP tools, the `UptimeKumaApi` client, the agent CLI |
| [Backing Platform](https://knuckles-team.github.io/uptime-kuma-agent/platform/) | deploy Uptime Kuma with Docker |
| [Overview](https://knuckles-team.github.io/uptime-kuma-agent/overview/) | ecosystem role and enterprise readiness |
| [Concepts](https://knuckles-team.github.io/uptime-kuma-agent/concepts/) | concept registry (`CONCEPT:UKA-*`) |

`AGENTS.md` is the canonical contributor/agent guidance.

---

## Repository Owners

<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />

![GitHub followers](https://img.shields.io/github/followers/example)
![GitHub User's stars](https://img.shields.io/github/stars/example)

---

## Contribute

Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
- Format code using `ruff format .`
- Lint code using `ruff check .`
- Validate type-safety with `mypy .`
- Run test suites using `pytest`


<!-- BEGIN agent-connector-sdk-deployment (generated; do not edit between markers) -->

## Deploy with `agent-connector-sdk-deployment`

Provision this package with the consolidated **`agent-connector-sdk-deployment`**
workflow. It selects an installed-package, editable-source, or immutable-container
path; records only runtime secret and TLS-profile references in `AgentConfig`; and
runs doctor, registration, policy, observability, and rollback gates. Ask your agent
to **"deploy `uptime-kuma-agent` with agent-connector-sdk-deployment"**.

| Install mode | Command |
|------|---------|
| Installed package | `uv tool install "uptime-kuma-agent[mcp]"`, then run `uptime-mcp` |
| Editable source | `uv pip install -e ".[agent]"`, then run `uptime-mcp` |
| Immutable container | deploy `registry.example.invalid/uptime-kuma-agent@sha256:<digest>` through the operator-selected orchestrator |

The repository embeds no deployment profile, credential value, certificate path, or
environment-specific endpoint. Supply those at runtime through `AgentConfig` and the
configured secret provider.

<!-- END agent-connector-sdk-deployment -->

<!-- GOVERNED-CAPABILITY:START -->
## Governed capability contract

This package ships a compact canonical skill surface with specialist procedures
kept as referenced workflows. The current MCP tools, skill metadata,
`connector_manifest.yml`, ontology, mappings, shapes, fixtures, migrations,
tool-schema fingerprints, and certification metadata form one versioned
capability contract. Validate them together; do not rely on stale tool names or
historical per-task skill wrappers.

Runtime endpoints, credentials, certificate trust, tenant identity, retention,
and observability policy are deployment inputs and are never packaged values.
See [Configuration, trust, and privacy](docs/configuration.md) before enabling a
network transport, connector ingestion, Arbora delegation, or trace export.
<!-- GOVERNED-CAPABILITY:END -->
