fettle-mcp 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Shamanskii
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ # fettle-mcp
2
+
3
+ MCP server for [Fettle](https://fettle.sh) — uptime monitoring you can drive from
4
+ Claude Code, Claude Desktop, Cursor, Windsurf or anything else that speaks the
5
+ [Model Context Protocol](https://modelcontextprotocol.io).
6
+
7
+ Ask your assistant to create a monitor, look up why one went down, acknowledge an
8
+ incident or pause checks before a deploy — it calls the same public API you would.
9
+
10
+ ```
11
+ "Add an HTTP monitor for https://api.acme.dev, check it every minute from all regions."
12
+ "Which of my monitors had incidents this week?"
13
+ "Pause the checkout monitor — we're deploying for the next 20 minutes."
14
+ ```
15
+
16
+ ## Requirements
17
+
18
+ - Node.js 20 or newer
19
+ - A Fettle account and an API key (Settings → API Keys at https://fettle.sh)
20
+
21
+ An API key belongs to one organization and carries either **read** or **write**
22
+ scope. Read-scope keys can list and inspect; the write tools below need a
23
+ write-scope key.
24
+
25
+ ## Install
26
+
27
+ There is nothing to install — MCP clients run the package with `npx` on demand.
28
+ Add one entry to your client's config and restart it.
29
+
30
+ ### Claude Code
31
+
32
+ ```bash
33
+ claude mcp add fettle --env FETTLE_API_KEY=fettle_your_key_here -- npx -y fettle-mcp
34
+ ```
35
+
36
+ ### Claude Desktop
37
+
38
+ `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,
39
+ `%APPDATA%\Claude\claude_desktop_config.json` on Windows:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "fettle": {
45
+ "command": "npx",
46
+ "args": ["-y", "fettle-mcp"],
47
+ "env": { "FETTLE_API_KEY": "fettle_your_key_here" }
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ### Cursor
54
+
55
+ `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project):
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "fettle": {
61
+ "command": "npx",
62
+ "args": ["-y", "fettle-mcp"],
63
+ "env": { "FETTLE_API_KEY": "fettle_your_key_here" }
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ### Windsurf
70
+
71
+ `~/.codeium/windsurf/mcp_config.json`:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "fettle": {
77
+ "command": "npx",
78
+ "args": ["-y", "fettle-mcp"],
79
+ "env": { "FETTLE_API_KEY": "fettle_your_key_here" }
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ## Configuration
86
+
87
+ | Variable | Required | Default | What it does |
88
+ | ------------------- | -------- | ----------------------- | -------------------------------------------------------------------- |
89
+ | `FETTLE_API_KEY` | yes | — | Your API key. The server refuses to start without it. |
90
+ | `FETTLE_API_URL` | no | `https://api.fettle.sh` | Point the server at a different API. You will not normally set this. |
91
+ | `FETTLE_TIMEOUT_MS` | no | `30000` | How long one tool call may take before it is abandoned. |
92
+
93
+ ## Tools
94
+
95
+ | Tool | Scope | What it does |
96
+ | ---------------------- | ----- | --------------------------------------------------------------------------------------- |
97
+ | `list_monitors` | read | List the monitors in the organization the API key belongs to. |
98
+ | `get_monitor` | read | Read one monitor's full configuration and current status by id. |
99
+ | `create_monitor` | write | Create a monitor that checks a URL, host or port on a schedule. |
100
+ | `update_monitor` | write | Change an existing monitor's settings. |
101
+ | `pause_monitor` | write | Stop checking a monitor without deleting it — use before planned downtime. |
102
+ | `resume_monitor` | write | Resume checks on a paused monitor. |
103
+ | `delete_monitor` | write | Soft-delete a monitor: it stops being checked and leaves the monitor list. |
104
+ | `check_now` | write | Re-arm a monitor to run on the next scheduler tick instead of waiting out its interval. |
105
+ | `get_uptime_summary` | read | Uptime, average response time and incident counts over 24h / 7d / 30d at once. |
106
+ | `list_incidents` | read | List incidents, optionally filtered by monitor, status, cause or period. |
107
+ | `acknowledge_incident` | write | Acknowledge an open incident so repeat notifications stop. |
108
+ | `list_heartbeats` | read | List heartbeat (cron / dead-man's-switch) monitors and when each was last pinged. |
109
+ | `create_heartbeat` | write | Create a heartbeat monitor and get the URL a scheduled job should ping. |
110
+ | `list_status_pages` | read | List status pages, with each page's slug and whether it is published. |
111
+
112
+ The list is not written by hand. It is generated in the Fettle backend from one
113
+ registry and served at
114
+ [`/public-api/mcp-tools.json`](https://api.fettle.sh/public-api/mcp-tools.json);
115
+ this package vendors that file and builds its tools from it at startup, so the
116
+ two MCP channels can never offer different tools.
117
+
118
+ ## The other channel: remote MCP
119
+
120
+ If your client supports remote MCP servers over HTTP, you do not need this
121
+ package at all — point it at `https://api.fettle.sh/mcp` with the same API key
122
+ as a Bearer token. Same tools, same behaviour, nothing to install or update.
123
+
124
+ Use this package when your client speaks only stdio, or when you would rather
125
+ the credential stayed in a local config file than in a client's cloud
126
+ configuration.
127
+
128
+ There is no OAuth on either channel yet; both authenticate with an API key.
129
+
130
+ ## Rate limits and plans
131
+
132
+ Tool calls spend the same per-organization request budget as the REST API — the
133
+ plan's limit, not a separate one. A rate-limited call comes back saying how many
134
+ seconds to wait. Plan limits are listed at https://fettle.sh/pricing.
135
+
136
+ ## Troubleshooting
137
+
138
+ **`FETTLE_API_KEY is not set`** — the client started the server without the
139
+ variable. Check the `env` block of the config above, then fully restart the
140
+ client: most clients read MCP config only at launch.
141
+
142
+ **`Authentication failed`** — the key is wrong, revoked, or from a deleted
143
+ organization. Create a fresh one in Settings → API Keys.
144
+
145
+ **`This tool needs an API key with write scope`** — the key is read-only. Create
146
+ a write-scoped key; there is no way to widen an existing key's scope.
147
+
148
+ **The assistant does not see the tools** — restart the client, then confirm
149
+ Node.js 20+ with `node -v`. Run `npx -y fettle-mcp` in a terminal: it should
150
+ print the missing-key message and exit, which proves the package itself runs.
151
+
152
+ ## Development
153
+
154
+ ```bash
155
+ pnpm install
156
+ pnpm run typecheck
157
+ pnpm test
158
+ pnpm run build
159
+ pnpm run contract:check # vendored contract vs. production
160
+ ```
161
+
162
+ Adding a tool is a change in the **backend's** registry, not here: regenerate
163
+ the contract there, then re-vendor it with
164
+ `pnpm run contract:check -- --write` and commit the result. No source file in
165
+ this package describes a tool.
166
+
167
+ Releasing is documented in [NPM-SETUP.md](./NPM-SETUP.md).
168
+
169
+ ## License
170
+
171
+ MIT © Mark Shamanskii