@davidfuchs/mcp-uptime-kuma 0.6.4 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,54 +16,15 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for [U
16
16
 
17
17
  ## Features
18
18
 
19
- - **Uptime Kuma Integration**: Real-time access to monitors, heartbeats, uptime, and responsiveness metrics from Uptime Kuma via a Socket.IO connection. This MCP server is immediately notified of status changes in Uptime Kuma and caches this information for fast retrieval.
20
- - **Context-Friendly**: Carefully controls the amount of data returned to avoid overwhelming the LLM context window. Tools default to returning only essential fields and recent heartbeats, with options to request more when needed.
21
- - **Multiple Transports**: Supports both stdio (for local integration) and streamable HTTP (for remote access).
22
-
23
- ## Available Tools
24
-
25
- | Tool | Purpose |
26
- |------|---------|
27
- | `getMonitorSummary` | Get a quick overview of all monitors with their current status. Supports filtering by keywords, type, active/maintenance status, tags, and current status. |
28
- | `listMonitors` | Get the full list of all monitors with configurations. Supports filtering by keywords, type, active/maintenance status, and tags. |
29
- | `getMonitor` | Get detailed configuration for a specific monitor by ID |
30
- | `pauseMonitor` | Pause a monitor to stop performing checks |
31
- | `resumeMonitor` | Resume a paused monitor to restart checks |
32
- | `listHeartbeats` | Get status check history for all monitors |
33
- | `getHeartbeats` | Get status check history for a specific monitor |
34
- | `getSettings` | Get Uptime Kuma server settings |
35
-
36
- ### Filtering
37
-
38
- Both `getMonitorSummary` and `listMonitors` support powerful filtering options:
39
-
40
- - **Keywords**: Space-separated keywords for fuzzy matching against monitor pathNames
41
- - **Type**: Filter by monitor type(s). Comma-separated for multiple types - e.g., `"http"` or `"http,ping,dns"`
42
- - **Active Status**: Filter by active (`true`) or inactive (`false`) monitors
43
- - **Maintenance Status**: Filter by maintenance mode status
44
- - **Tags**: Filter by tag name and optional value. Comma-separated for multiple tags - format: `"tagName"` or `"tagName=value"`. Monitors must have all specified tags.
45
- - **Status** (getMonitorSummary only): Filter by current heartbeat status. Comma-separated for multiple - `"0"`=DOWN, `"1"`=UP, `"2"`=PENDING, `"3"`=MAINTENANCE
46
-
47
- **Examples:**
48
- - Get all DOWN monitors: `getMonitorSummary({ status: "0" })`
49
- - Get all HTTP monitors in maintenance: `getMonitorSummary({ type: "http", maintenance: true })`
50
- - Get all inactive monitors with tag "production": `listMonitors({ active: false, tags: "production" })`
51
- - Get monitors with environment tag set to "staging": `getMonitorSummary({ tags: "env=staging" })`
52
- - Get monitors with multiple tags: `listMonitors({ tags: "production,region=us-east" })`
53
- - Get DOWN or PENDING monitors: `getMonitorSummary({ status: "0,2" })`
54
- - Get HTTP or ping monitors: `getMonitorSummary({ type: "http,ping" })`
55
- - Get monitors matching "web" or "api": `getMonitorSummary({ keywords: "web api" })`
56
-
57
- ## Example Conversation
58
-
59
- ![MCP server answering questions about Uptime Kuma monitors](.github/images/screenshot-1.png)
60
- *Conversation in [LibreChat](https://github.com/danny-avila/LibreChat) where the `mcp-uptime-kuma` server is providing real-time information from Uptime Kuma.*
19
+ - **Real-time Monitoring**: Access monitors, heartbeats, uptime, and responsiveness metrics via Socket.IO with instant status change notifications.
20
+ - **Context-Friendly**: Returns only essential data by default to avoid overwhelming LLM context windows.
21
+ - **Multiple Transports**: Supports stdio (local) and streamable HTTP (remote) transports.
61
22
 
62
23
  ## Quick Start
63
24
 
64
25
  ### Using npx (stdio transport)
65
26
 
66
- Most folks will want to configure mcp-uptime-kuma using stdio as follows.
27
+ Add this to your MCP client configuration:
67
28
 
68
29
  ```json
69
30
  {
@@ -74,48 +35,16 @@ Most folks will want to configure mcp-uptime-kuma using stdio as follows.
74
35
  "env": {
75
36
  "UPTIME_KUMA_URL": "http://your-uptime-kuma-instance:3001",
76
37
  "UPTIME_KUMA_USERNAME": "your_username",
77
- "UPTIME_KUMA_PASSWORD": "your_password",
38
+ "UPTIME_KUMA_PASSWORD": "your_password"
78
39
  }
79
40
  }
80
41
  }
81
42
  }
82
43
  ```
83
44
 
84
- If authentication is disabled on your Uptime Kuma instance, you can remove the username/password environment variables. See the [Usage Instructions](#usage-instructions) section for more details on authentication methods.
85
-
86
45
  ### Using Docker (streamable HTTP transport)
87
46
 
88
- For remote access or containerized deployments, you can run mcp-uptime-kuma as a Docker container using the streamable HTTP transport.
89
-
90
- **Option 1: Using Docker Compose**
91
-
92
- Create a `docker-compose.yml` file:
93
-
94
- ```yaml
95
- services:
96
- mcp-uptime-kuma:
97
- image: davidfuchs/mcp-uptime-kuma:latest
98
- container_name: mcp-uptime-kuma
99
- environment:
100
- - UPTIME_KUMA_URL=http://your-uptime-kuma-instance:3001
101
- - UPTIME_KUMA_USERNAME=your_username # Optional
102
- - UPTIME_KUMA_PASSWORD=your_password # Optional
103
- # OR use JWT token authentication:
104
- # - UPTIME_KUMA_JWT_TOKEN=your_jwt_token
105
- - PORT=3000 # Optional, defaults to 3000
106
- ports:
107
- - "3000:3000"
108
- command: ["-t", "streamable-http"]
109
- restart: unless-stopped
110
- ```
111
-
112
- Then run:
113
-
114
- ```bash
115
- docker compose up -d
116
- ```
117
-
118
- **Option 2: Using Docker Run**
47
+ **Option 1: Docker Run**
119
48
 
120
49
  ```bash
121
50
  docker run -d \
@@ -128,429 +57,174 @@ docker run -d \
128
57
  -t streamable-http
129
58
  ```
130
59
 
131
- The MCP endpoint will be available at `http://mcp-uptime-kuma:3000/mcp` on your Docker host.
60
+ **Option 2: Docker Compose**
132
61
 
133
- **Configuring Your MCP Client**
62
+ A [docker-compose.yml](docker-compose.yml) file is provided in the repository. Download it, configure your environment variables, and run:
63
+
64
+ ```bash
65
+ docker compose up -d
66
+ ```
134
67
 
135
- After starting the Docker container, configure your MCP client to connect to it:
68
+ Then configure your MCP client to connect to the endpoint:
136
69
 
137
70
  ```json
138
71
  {
139
72
  "mcpServers": {
140
73
  "uptime-kuma": {
141
- "url": "http://mcp-uptime-kuma:3000/mcp"
74
+ "url": "http://localhost:3000/mcp"
142
75
  }
143
76
  }
144
77
  }
145
78
  ```
146
79
 
147
- Or for LibreChat (librechat.yaml):
80
+ See [Authentication Methods](#authentication-methods) for JWT token and anonymous authentication options.
148
81
 
149
- ```yaml
150
- mcpServers:
151
- uptime-kuma:
152
- type: streamable-http
153
- url: "http://mcp-uptime-kuma:3000/mcp"
154
- serverInstructions: true
155
- ```
82
+ ## Example Conversation
156
83
 
157
- ## Usage Instructions
84
+ ![MCP server answering questions about Uptime Kuma monitors](.github/images/screenshot-1.png)
85
+ *Conversation in [LibreChat](https://github.com/danny-avila/LibreChat) where the `mcp-uptime-kuma` server is providing real-time information from Uptime Kuma.*
158
86
 
159
- ### Prerequisites
87
+ ## Available Tools
160
88
 
161
- - Node.js (v18 or higher)
162
- - An Uptime Kuma instance (version 2)
89
+ ### Monitors
163
90
 
164
- ### Authentication Methods
91
+ | Tool | Purpose |
92
+ |------|---------|
93
+ | `getMonitorSummary` | Get a quick overview of all monitors with their current status. Supports filtering. |
94
+ | `listMonitors` | Get the full list of all monitors with configurations. Supports filtering. |
95
+ | `listMonitorTypes` | Get all available monitor types supported by Uptime Kuma. |
96
+ | `getMonitor` | Get detailed configuration for a specific monitor by ID. |
97
+ | `createMonitor` | Create a new monitor (requires name and type at minimum). |
98
+ | `updateMonitor` | Update an existing monitor's configuration. |
99
+ | `deleteMonitor` | Permanently delete a monitor and all its heartbeat history. |
100
+ | `pauseMonitor` | Pause a monitor to stop performing checks. |
101
+ | `resumeMonitor` | Resume a paused monitor to restart checks. |
102
+
103
+ ### Heartbeats
165
104
 
166
- This MCP server supports three authentication methods for connecting to your Uptime Kuma instance.
105
+ | Tool | Purpose |
106
+ |------|---------|
107
+ | `listHeartbeats` | Get status check history for all monitors. |
108
+ | `getHeartbeats` | Get status check history for a specific monitor. |
167
109
 
168
- > **A note about 2FA:** If you're using 2FA, it's recommended that you go straight for the JWT authentication approach and avoid username/password authentication, as your 2FA token will need to be refreshed every time you initialize the MCP server.
169
- >
170
- > Even with the JWT method, you may run into issues with token expiry, but as of this writing the JWT returned by Uptime Kuma does not appear to expire.
110
+ ### Notifications
171
111
 
172
- #### 1. Anonymous Authentication
173
- If your Uptime Kuma instance has authentication disabled, you can connect without providing any credentials. Only the `UPTIME_KUMA_URL` environment variable is required.
112
+ | Tool | Purpose |
113
+ |------|---------|
114
+ | `listNotifications` | List all configured notification channels (Slack, Discord, email, webhooks, etc.). |
115
+ | `addNotification` | Create a new notification channel. |
116
+ | `updateNotification` | Update an existing notification channel. |
117
+ | `deleteNotification` | Permanently delete a notification channel. |
174
118
 
175
- - **Required Variables:**
176
- - `UPTIME_KUMA_URL`: The URL of your Uptime Kuma instance
119
+ ### Tags
177
120
 
178
- #### 2. Username/Password Authentication
179
- Standard authentication using your Uptime Kuma credentials. This method uses the `UPTIME_KUMA_USERNAME` and `UPTIME_KUMA_PASSWORD` environment variables.
121
+ | Tool | Purpose |
122
+ |------|---------|
123
+ | `listTags` | List all tags defined in Uptime Kuma. |
124
+ | `addTag` | Create a new tag that can be assigned to monitors. |
125
+ | `deleteTag` | Permanently delete a tag (removes it from all monitors). |
180
126
 
181
- - **Required Variables:**
182
- - `UPTIME_KUMA_URL`: The URL of your Uptime Kuma instance
183
- - `UPTIME_KUMA_USERNAME`: Your Uptime Kuma username
184
- - `UPTIME_KUMA_PASSWORD`: Your Uptime Kuma password
185
-
186
- - **Optional Variable:**
187
- - `UPTIME_KUMA_2FA_TOKEN`: Your 2FA token (only required if two-factor authentication is enabled on your account)
127
+ ### Maintenance
188
128
 
189
- #### 3. JWT Token Authentication
190
- Token-based authentication using a JWT token from Uptime Kuma. This method uses the `UPTIME_KUMA_JWT_TOKEN` environment variable and takes precedence over username/password if both are provided.
129
+ | Tool | Purpose |
130
+ |------|---------|
131
+ | `getMaintenanceWindows` | List all scheduled maintenance windows. |
132
+ | `createMaintenance` | Schedule a new maintenance window. |
191
133
 
192
- - **Required Variables:**
193
- - `UPTIME_KUMA_URL`: The URL of your Uptime Kuma instance
194
- - `UPTIME_KUMA_JWT_TOKEN`: Your JWT token (see instructions below for how to obtain it)
134
+ ### Status Pages & Settings
195
135
 
196
- ##### How to Obtain Your JWT Token:
136
+ | Tool | Purpose |
137
+ |------|---------|
138
+ | `listStatusPages` | List all configured status pages. |
139
+ | `getSettings` | Get Uptime Kuma server settings. |
197
140
 
198
- **Method 1: Using the JWT Helper Utility (Recommended)**
141
+ ### Filtering
199
142
 
200
- This package includes a handy command-line utility to retrieve a JWT token directly from your Uptime Kuma instance:
143
+ `getMonitorSummary` and `listMonitors` support filtering by:
201
144
 
202
- ```bash
203
- npx -p @davidfuchs/mcp-uptime-kuma mcp-uptime-kuma-get-jwt <url> <username> <password> [2fa-token]
204
- ```
145
+ - **keywords**: Space-separated keywords for fuzzy matching against monitor pathNames
146
+ - **type**: Monitor type(s), comma-separated (e.g., `"http"`, `"http,ping,dns"`)
147
+ - **active**: Filter by active (`true`) or inactive (`false`) monitors
148
+ - **maintenance**: Filter by maintenance mode status
149
+ - **tags**: Tag name and optional value, comma-separated (e.g., `"production"`, `"env=staging"`)
150
+ - **status** (getMonitorSummary only): Heartbeat status (`"0"`=DOWN, `"1"`=UP, `"2"`=PENDING, `"3"`=MAINTENANCE)
205
151
 
206
152
  **Examples:**
207
- ```bash
208
- # Without 2FA
209
- npx -p @davidfuchs/mcp-uptime-kuma mcp-uptime-kuma-get-jwt http://localhost:3001 admin mypassword
210
-
211
- # With 2FA
212
- npx -p @davidfuchs/mcp-uptime-kuma mcp-uptime-kuma-get-jwt http://localhost:3001 admin mypassword 123456
153
+ ```javascript
154
+ getMonitorSummary({ status: "0" }) // All DOWN monitors
155
+ getMonitorSummary({ type: "http", maintenance: true }) // HTTP monitors in maintenance
156
+ listMonitors({ tags: "production,region=us-east" }) // Monitors with specific tags
213
157
  ```
214
158
 
215
- **Method 2: Using Docker**
159
+ ## Authentication Methods
216
160
 
217
- You can also use the Docker image to retrieve the JWT token:
161
+ ### Anonymous Authentication
162
+ If authentication is disabled on your Uptime Kuma instance, only `UPTIME_KUMA_URL` is required.
218
163
 
219
- ```bash
220
- docker run --rm davidfuchs/mcp-uptime-kuma:latest get-jwt <url> <username> <password> [2fa-token]
164
+ ### Username/Password Authentication
221
165
  ```
222
-
223
- **Examples:**
224
- ```bash
225
- # Without 2FA
226
- docker run --rm davidfuchs/mcp-uptime-kuma:latest get-jwt http://host.docker.internal:3001 admin mypassword
227
-
228
- # With 2FA
229
- docker run --rm davidfuchs/mcp-uptime-kuma:latest get-jwt http://host.docker.internal:3001 admin mypassword 123456
166
+ UPTIME_KUMA_URL=http://your-instance:3001
167
+ UPTIME_KUMA_USERNAME=your_username
168
+ UPTIME_KUMA_PASSWORD=your_password
169
+ UPTIME_KUMA_2FA_TOKEN=123456 # Optional, only if 2FA is enabled
230
170
  ```
231
171
 
232
- > **Note:** If Docker and your Uptime Kuma instance are on the same machine, use `http://host.docker.internal:3001` instead of `http://localhost:3001` to access the host machine from within the container.
233
-
234
- **Method 3: Extract from Browser**
172
+ ### JWT Token Authentication
173
+ Recommended for 2FA users. Takes precedence over username/password if both are provided.
235
174
 
236
- 1. Log into your Uptime Kuma instance in your web browser
237
- 2. Open your browser's Developer Tools (F12 or right-click → Inspect)
238
- 3. Navigate to the **Storage** tab (Firefox) or **Application** tab (Chrome/Edge)
239
- 4. Under **Local Storage** find your Uptime Kuma domain
240
- 5. Look for a key named `token` - the value is your JWT token (it should start with 'ey...')
241
- 6. Copy the token value and use it as `UPTIME_KUMA_JWT_TOKEN`
242
-
243
- ### Setting up mcp-uptime-kuma using the stdio transport
175
+ ```
176
+ UPTIME_KUMA_URL=http://your-instance:3001
177
+ UPTIME_KUMA_JWT_TOKEN=your_jwt_token
178
+ ```
244
179
 
245
- For many MCP clients, you can configure the server as follows:
180
+ #### Obtaining Your JWT Token
246
181
 
247
- **Option 1: Username/Password Authentication**
248
- ```json
249
- {
250
- "mcpServers": {
251
- "uptime-kuma": {
252
- "command": "npx",
253
- "args": ["-y", "@davidfuchs/mcp-uptime-kuma"],
254
- "env": {
255
- "UPTIME_KUMA_URL": "http://your-uptime-kuma-instance:3001",
256
- "UPTIME_KUMA_USERNAME": "your_username",
257
- "UPTIME_KUMA_PASSWORD": "your_password",
258
- }
259
- }
260
- }
261
- }
182
+ **Using the CLI utility (recommended):**
183
+ ```bash
184
+ npx -p @davidfuchs/mcp-uptime-kuma mcp-uptime-kuma-get-jwt http://localhost:3001 admin mypassword
262
185
  ```
263
186
 
264
- **Option 2: JWT Token Authentication**
265
- ```json
266
- {
267
- "mcpServers": {
268
- "uptime-kuma": {
269
- "command": "npx",
270
- "args": ["-y", "@davidfuchs/mcp-uptime-kuma"],
271
- "env": {
272
- "UPTIME_KUMA_URL": "http://your-uptime-kuma-instance:3001",
273
- "UPTIME_KUMA_JWT_TOKEN": "your_jwt_token"
274
- }
275
- }
276
- }
277
- }
187
+ **Using Docker:**
188
+ ```bash
189
+ docker run --rm davidfuchs/mcp-uptime-kuma:latest get-jwt http://host.docker.internal:3001 admin mypassword
278
190
  ```
279
191
 
280
- See the [How to Find Your JWT Token](#how-to-find-your-jwt-token) section for instructions on how to obtain it.
192
+ **From browser:** Open Developer Tools Storage/Application Local Storage find `token` key.
281
193
 
282
- If you're using LibreChat (librechat.yaml), you can configure it like this:
194
+ ## LibreChat Configuration
283
195
 
284
- **Option 1: Username/Password Authentication (LibreChat):**
285
- ```yaml
286
- mcpServers:
287
- uptime-kuma:
288
- command: npx
289
- args: ["-y", "@davidfuchs/mcp-uptime-kuma"]
290
- customUserVars:
291
- UPTIME_KUMA_URL:
292
- title: "Uptime Kuma URL"
293
- description: "The URL to log into Uptime Kuma."
294
- UPTIME_KUMA_USERNAME:
295
- title: "Uptime Kuma Username"
296
- description: "The username to log into Uptime Kuma."
297
- UPTIME_KUMA_PASSWORD:
298
- title: "Uptime Kuma Password"
299
- description: "The password to log into Uptime Kuma."
300
- env:
301
- UPTIME_KUMA_URL: "{{UPTIME_KUMA_URL}}"
302
- UPTIME_KUMA_USERNAME: "{{UPTIME_KUMA_USERNAME}}"
303
- UPTIME_KUMA_PASSWORD: "{{UPTIME_KUMA_PASSWORD}}"
304
- serverInstructions: true
305
- startup: false
306
- ```
307
-
308
- **Option 2: JWT Token Authentication (LibreChat)**
196
+ **stdio transport:**
309
197
  ```yaml
310
198
  mcpServers:
311
199
  uptime-kuma:
312
200
  command: npx
313
201
  args: ["-y", "@davidfuchs/mcp-uptime-kuma"]
314
- customUserVars:
315
- UPTIME_KUMA_URL:
316
- title: "Uptime Kuma URL"
317
- description: "The URL to log into Uptime Kuma."
318
- UPTIME_KUMA_JWT_TOKEN:
319
- title: "Uptime Kuma JWT Token"
320
- description: "JWT token for Uptime Kuma authentication."
321
- env:
322
- UPTIME_KUMA_URL: "{{UPTIME_KUMA_URL}}"
323
- UPTIME_KUMA_JWT_TOKEN: "{{UPTIME_KUMA_JWT_TOKEN}}"
202
+ env:
203
+ UPTIME_KUMA_URL: "http://your-instance:3001"
204
+ UPTIME_KUMA_USERNAME: "your_username"
205
+ UPTIME_KUMA_PASSWORD: "your_password"
324
206
  serverInstructions: true
325
- startup: false
326
- ```
327
-
328
- See the [How to Find Your JWT Token](#how-to-find-your-jwt-token) section for instructions on how to obtain it.
329
-
330
- If you're the only one using the LibreChat server, you can remove `customUserVars` and set the environment variables directly in the `env` section. You can also remove `startup: false` - that's only in there because without it, LibreChat tries to start the mcp-uptime-kuma MCP server immediately on startup, which fails because the user-provided credentials aren't available yet.
331
-
332
- ### Setting up mcp-uptime-kuma using the streamable HTTP transport
333
-
334
- The recommended way to run the MCP server using streamable HTTP is to run it as a Docker container.
335
-
336
- A [docker-compose.yml](docker-compose.yml) file is provided in the Github repository. Download it and update the included environment variables as needed for your Uptime Kuma deployment, and run:
337
-
338
- `docker compose up -d`
339
-
340
- The MCP endpoint will be available on your Docker host at port 3000 (configurable via `PORT` environment variable). If you'd prefer to run it directly on your host machine, see the Development Usage section below.
341
-
342
- ## Detailed Tool Descriptions
343
-
344
- ### getMonitorSummary
345
- Retrieves a summarized list of all monitors with essential information and their current status.
346
-
347
- - **Input**:
348
- - `keywords` (string, optional): Space-separated keywords to filter monitors by pathName (case-insensitive fuzzy match). All keywords must match for a monitor to be included.
349
- - `type` (string, optional): Filter by monitor type(s). Comma-separated for multiple types. Examples: `"http"`, `"http,ping,dns"`, `"port,docker"`
350
- - `active` (boolean, optional): Filter by active status. `true`=only active monitors, `false`=only inactive monitors
351
- - `maintenance` (boolean, optional): Filter by maintenance status. `true`=only monitors in maintenance, `false`=only monitors not in maintenance
352
- - `tags` (string, optional): Filter by tag name and optional value. Comma-separated for multiple tags. Format: `"tagName"` or `"tagName=value"`. Monitor must have all specified tags. Case-insensitive. Examples: `"production"`, `"env=staging"`, `"production,region=us-east"`
353
- - `status` (string, optional): Filter by current heartbeat status. Comma-separated for multiple statuses. `"0"`=DOWN, `"1"`=UP, `"2"`=PENDING, `"3"`=MAINTENANCE. Examples: `"0"`, `"0,2"`
354
- - **Output**: Array of monitor summaries with:
355
- - Monitor ID, name, pathName
356
- - Monitor type
357
- - Active and maintenance state
358
- - Most recent heartbeat status (0=DOWN, 1=UP, 2=PENDING, 3=MAINTENANCE)
359
- - Status message from the most recent heartbeat
360
- - Associated tags
361
- - Uptime percentages for different periods (24h, 720h, 1y)
362
- - Average ping in milliseconds
363
- - Total count of matching monitors
364
-
365
- ### getMonitor
366
- Retrieves detailed information about a specific monitor by its ID.
367
-
368
- - **Input**:
369
- - `monitorID` (number): The ID of the monitor to retrieve
370
- - `includeAdditionalFields` (boolean, optional): Include all additional fields from Uptime Kuma (default: false)
371
- - **Output**: Monitor configuration object with details like URL, type, check interval, notification settings, etc.
372
-
373
- ### listMonitors
374
- Retrieves the full list of all monitors the user has access to with their configuration details.
375
-
376
- - **Input**:
377
- - `includeAdditionalFields` (boolean, optional): Include all additional fields from Uptime Kuma (default: false)
378
- - `keywords` (string, optional): Space-separated keywords to filter monitors by pathName (case-insensitive fuzzy match). All keywords must match for a monitor to be included.
379
- - `type` (string, optional): Filter by monitor type(s). Comma-separated for multiple types. Examples: `"http"`, `"http,ping,dns"`, `"port,docker"`
380
- - `active` (boolean, optional): Filter by active status. `true`=only active monitors, `false`=only inactive monitors
381
- - `maintenance` (boolean, optional): Filter by maintenance status. `true`=only monitors in maintenance, `false`=only monitors not in maintenance
382
- - `tags` (string, optional): Filter by tag name and optional value. Comma-separated for multiple tags. Format: `"tagName"` or `"tagName=value"`. Monitor must have all specified tags. Case-insensitive. Examples: `"production"`, `"env=staging"`, `"production,region=us-east"`
383
- - **Output**: Array of monitor configuration objects with:
384
- - All monitor settings (URL, check interval, retry settings, notification configuration, etc.)
385
- - Tags and pathName
386
- - Uptime percentages and average ping
387
- - Total count of matching monitors
388
-
389
- ### getHeartbeats
390
- Retrieves heartbeats (status checks) for a specific monitor.
391
-
392
- - **Input**:
393
- - `monitorID` (number): The ID of the monitor to get heartbeats for
394
- - `maxHeartbeats` (number, optional): Maximum number of most recent heartbeats to return (1-100). Default: 1
395
- - **Output**: Object containing:
396
- - `monitorID`: The monitor ID
397
- - `heartbeats`: Array of heartbeat objects with status, response time, timestamps, etc.
398
- - `count`: Number of heartbeats returned
399
-
400
- ### listHeartbeats
401
- Retrieves the heartbeats for all monitors.
402
-
403
- - **Input**:
404
- - `maxHeartbeats` (number, optional): Maximum number of most recent heartbeats per monitor (1-100). Default: 1
405
- - **Output**: Object containing:
406
- - `heartbeats`: Map of monitor IDs to their heartbeat arrays
407
- - `monitorCount`: Number of monitors
408
- - `totalHeartbeatCount`: Total number of heartbeats across all monitors
409
-
410
- ### getSettings
411
- Retrieves the current Uptime Kuma server settings.
412
-
413
- - **Input**: None
414
- - **Output**: Settings object containing:
415
- - `serverTimezone`: Server timezone setting
416
- - `checkUpdate`: Whether to check for updates
417
- - `searchEngineIndex`: Search engine indexing setting
418
- - `entryPage`: Entry page configuration
419
- - `dnsCache`: DNS cache setting
420
- - `keepDataPeriodDays`: Data retention period in days
421
- - `tlsExpiryNotifyDays`: TLS expiry notification days
422
- - `trustProxy`: Trust proxy setting
423
- - `nscd`: NSCD setting
424
- - `disableAuth`: Authentication disabled status
425
- - `primaryBaseURL`: Primary base URL (optional)
426
-
427
- ### pauseMonitor
428
- Pauses a monitor, stopping it from performing checks. The monitor will remain in the system but will not send notifications or collect data until resumed.
429
-
430
- - **Input**:
431
- - `monitorID` (number): The ID of the monitor to pause
432
- - **Output**: Object containing:
433
- - `ok`: Boolean indicating success
434
- - `msg`: Optional status message
435
-
436
- ### resumeMonitor
437
- Resumes a paused monitor, restarting its checks and notifications.
438
-
439
- - **Input**:
440
- - `monitorID` (number): The ID of the monitor to resume
441
- - **Output**: Object containing:
442
- - `ok`: Boolean indicating success
443
- - `msg`: Optional status message
444
-
445
- ## Developing
446
-
447
- To run locally, clone the repository and follow these steps:
448
-
449
- ### Install dependencies
450
-
451
- ```bash
452
- npm install
453
- ```
454
-
455
- ### Create the environment configuration
456
-
457
- Copy [.env.example](.env.example) to `.env` and configure the required environment variables for your Uptime Kuma instance (URL and authentication method).
458
-
459
- ## Building
460
-
461
- Build the TypeScript code to JavaScript:
462
-
463
- ```bash
464
- npm run build
465
207
  ```
466
208
 
467
- For development with auto-rebuild:
209
+ **streamable HTTP transport:**
468
210
 
469
- ```bash
470
- npm run watch
471
- ```
211
+ Update the allowed domains to whatever domain you're using in the URL (e.g., `localhost` or `host.docker.internal` for Docker setups):
472
212
 
473
- ## Running
474
-
475
- ### Default (stdio Transport)
476
-
477
- Run in production mode (requires build first):
478
-
479
- ```bash
480
- npm start
481
- ```
482
-
483
- or
484
-
485
- ```bash
486
- npm run start:stdio
487
- ```
488
-
489
- This mode is designed to be spawned by MCP clients (like Claude Desktop, VS Code, etc.) that communicate via standard input/output.
490
-
491
- ### Streamable HTTP Transport (for remote access)
492
-
493
- Run in production mode (requires build first):
494
-
495
- ```bash
496
- npm run start:http
497
- ```
498
-
499
- By default, the HTTP server runs on port 3000. You can change this with the `PORT` environment variable:
500
-
501
- ```bash
502
- PORT=8080 npm run start:http
503
- ```
504
-
505
- The MCP endpoint will be available at `http://localhost:3000/mcp`
506
-
507
- ## Testing
508
-
509
- You can test the server using the MCP Inspector:
510
-
511
- ```bash
512
- npm run inspector
513
- ```
514
-
515
- ### For HTTP transport:
516
- Start the HTTP server:
517
- ```bash
518
- npm run dev:http
519
- ```
520
-
521
- Then use the MCP Inspector:
522
- ```bash
523
- npx @modelcontextprotocol/inspector
524
- ```
525
- Connect to: `http://localhost:3000/mcp`
526
-
527
- ## Project Structure
213
+ ```yaml
214
+ mcpServers:
215
+ uptime-kuma:
216
+ type: streamable-http
217
+ url: "http://mcp-uptime-kuma:3000/mcp"
218
+ serverInstructions: true
528
219
 
529
- ```
530
- mcp-uptime-kuma/
531
- ├── src/
532
- │ ├── index.ts # Main entry point with transport selection
533
- │ ├── server.ts # Core MCP server configuration with tools
534
- │ ├── uptime-kuma-client.ts # WebSocket client for Uptime Kuma API
535
- │ ├── types.ts # TypeScript type definitions
536
- │ └── version.ts # Runtime version information
537
- ├── .github/ # GitHub workflows and configurations
538
- ├── .vscode/ # VS Code workspace settings
539
- ├── docker-compose.yml # Docker Compose configuration
540
- ├── Dockerfile # Docker image definition
541
- ├── .dockerignore # Docker ignore file
542
- ├── .env.example # Example environment configuration
543
- ├── .gitignore # Git ignore file
544
- ├── package.json # Project dependencies and scripts
545
- ├── package-lock.json # Locked dependency versions
546
- ├── tsconfig.json # TypeScript configuration
547
- ├── LICENSE # License file
548
- └── README.md # This file
220
+ mcpSettings:
221
+ allowedDomains:
222
+ - 'mcp-uptime-kuma'
549
223
  ```
550
224
 
551
- ## Development
225
+ ## Contributing
552
226
 
553
- To add new tools or modify existing ones, edit `src/server.ts`. The Uptime Kuma client in `src/uptime-kuma-client.ts` handles the WebSocket connection and retrieves monitor and heartbeat data.
227
+ For development setup, building, testing, and project structure, see [CONTRIBUTING.md](CONTRIBUTING.md).
554
228
 
555
229
  ## Learn More
556
230
 
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAygB9J"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CA81C9J"}