mcp-controld 0.1.0 → 0.1.1
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 +54 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -48,10 +48,60 @@ Everything comes from environment variables, supplied by your MCP client. The se
|
|
|
48
48
|
|
|
49
49
|
Splitting the tokens is the point: reads keep using a read-scoped credential even on a server that can write, so a read tool cannot mutate anything even if something goes wrong upstream of it.
|
|
50
50
|
|
|
51
|
+
### Every option, shown
|
|
52
|
+
|
|
53
|
+
This is the full `env` block with every variable set. Copy the lines you want and delete the rest. Nothing here is required except the first.
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
"env": {
|
|
57
|
+
"CONTROLD_API_TOKEN_READ": "YOUR_API_TOKEN",
|
|
58
|
+
"CONTROLD_API_TOKEN_WRITE": "YOUR_API_TOKEN",
|
|
59
|
+
"CONTROLD_ORG_ID": "1234567890",
|
|
60
|
+
"CONTROLD_API_BASE_URL": "https://api.controld.com"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The same thing in TOML, for Codex CLI:
|
|
65
|
+
|
|
66
|
+
```toml
|
|
67
|
+
[mcp_servers.controld.env]
|
|
68
|
+
CONTROLD_API_TOKEN_READ = "YOUR_API_TOKEN"
|
|
69
|
+
CONTROLD_API_TOKEN_WRITE = "YOUR_API_TOKEN"
|
|
70
|
+
CONTROLD_ORG_ID = "1234567890"
|
|
71
|
+
CONTROLD_API_BASE_URL = "https://api.controld.com"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
And on the Claude Code command line:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
claude mcp add controld \
|
|
78
|
+
-e CONTROLD_API_TOKEN_READ=YOUR_API_TOKEN \
|
|
79
|
+
-e CONTROLD_API_TOKEN_WRITE=YOUR_API_TOKEN \
|
|
80
|
+
-e CONTROLD_ORG_ID=1234567890 \
|
|
81
|
+
-- npx -y mcp-controld
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Do not copy that block whole. Each optional line has a reason to leave it out:
|
|
85
|
+
|
|
86
|
+
- **`CONTROLD_API_TOKEN_WRITE`** turns on 21 tools that can change your DNS. Leave it out until you want that.
|
|
87
|
+
- **`CONTROLD_ORG_ID`** only applies to organization accounts. It sends an org header on every request, and a personal account rejects it.
|
|
88
|
+
- **`CONTROLD_API_BASE_URL`** is shown set to its own default, so including it changes nothing. It is there so you know the format if you ever need to point at a proxy.
|
|
89
|
+
|
|
90
|
+
Using the older single token instead of the pair looks like this:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
"env": {
|
|
94
|
+
"CONTROLD_API_TOKEN": "YOUR_API_TOKEN",
|
|
95
|
+
"CONTROLD_ENABLE_WRITES": "1"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
51
99
|
## Setup
|
|
52
100
|
|
|
53
101
|
There is nothing to install and no setup command to run. Point your MCP client at `npx mcp-controld` and it fetches and starts the server for you.
|
|
54
102
|
|
|
103
|
+
Every example below sets up **read-only** access, using one token. That is the safe default and it cannot change anything in your account. For the version with every option filled in, see [every option, shown](#every-option-shown) above.
|
|
104
|
+
|
|
55
105
|
### Claude Code
|
|
56
106
|
|
|
57
107
|
```sh
|
|
@@ -123,7 +173,9 @@ npm install
|
|
|
123
173
|
|
|
124
174
|
## Turning on write tools
|
|
125
175
|
|
|
126
|
-
|
|
176
|
+
There are two tokens, not one. The read token is required and signs every GET. The write token is optional and signs everything that changes your account. Keeping them separate means a read tool cannot mutate anything, even on a server that is allowed to write.
|
|
177
|
+
|
|
178
|
+
Create a second, write-scoped token in the Control D dashboard, then add it alongside the first:
|
|
127
179
|
|
|
128
180
|
```json
|
|
129
181
|
"env": {
|
|
@@ -209,7 +261,7 @@ The two escape hatches, `controld_request_read` and `controld_request_write`, ex
|
|
|
209
261
|
- Paths are host-relative and validated. A path such as `//example.com/x` cannot retarget the request at another host. The CSV export checks the hostname before attaching credentials, so the token only ever goes to Control D or to a host you configured yourself in `CONTROLD_API_BASE_URL`.
|
|
210
262
|
- Tool output is capped at 1 MiB, with a truncation notice, so a huge response cannot flood your client's context.
|
|
211
263
|
- Every request has a timeout, so a hung API call cannot stall your session. Only GET is ever retried. A write is never replayed, because a failure can arrive after the change already took effect.
|
|
212
|
-
-
|
|
264
|
+
- Every published version is built from source and gated on the full test suite at publish time, so a release cannot contain a stale build or a failing test.
|
|
213
265
|
|
|
214
266
|
Found a security problem? See [SECURITY.md](SECURITY.md).
|
|
215
267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-controld",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server for the Control D API. Manage DNS profiles, filters, rules, and devices from any MCP client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsc -p tsconfig.json",
|
|
38
38
|
"prepare": "tsc -p tsconfig.json",
|
|
39
|
+
"prepublishOnly": "npm test",
|
|
39
40
|
"test": "tsx --test"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|