@rekey.dev/mcp 1.1.2 → 2.0.0-rc.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/LICENSE +1 -1
- package/README.md +16 -14
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +3 -8
- package/dist/tools.js.map +1 -1
- package/dist/version.d.ts +16 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +27 -0
- package/dist/version.js.map +1 -0
- package/package.json +5 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# `@rekey.dev/mcp`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **ReliPay is now Rekey.** This package was previously published as the equivalent `@relipay/*` package, which is deprecated. Env vars renamed `RELIPAY_*` → `REKEY_*` (as of 2.0.0 the old names are no longer read — set `REKEY_*`). relipay.dev (the old domain) will redirect to rekey.dev after the domain migration.
|
|
4
|
+
|
|
5
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server for [Rekey](https://rekey.dev). Lets Claude Desktop, Cursor, and Claude Code introspect a deployment — and mint API keys — directly, without screenshots or copy-paste from the panel.
|
|
4
6
|
|
|
5
7
|
> **For AI agents connected through this server:** see [AGENTS.md](./AGENTS.md) for what's safe to call and the write-tool safety model.
|
|
6
8
|
|
|
@@ -17,15 +19,15 @@ The server reads three env vars (set them in your MCP client config, not your sh
|
|
|
17
19
|
|
|
18
20
|
| Env var | Required | What it's for | Where to get it |
|
|
19
21
|
| --- | --- | --- | --- |
|
|
20
|
-
| `
|
|
22
|
+
| `REKEY_URL` | yes | Base URL of the deployment, e.g. `https://api.rekey.dev`. | Your Rekey deployment |
|
|
21
23
|
| `SUPER_ADMIN_KEY` | for **read** tools | Authenticates the global read/introspection tools. | Deployment admin |
|
|
22
|
-
| `
|
|
24
|
+
| `REKEY_OPERATOR_TOKEN` | for `mint_api_key` | A scoped operator **personal-access-token** (`rp_op_…`). | Panel → operator API tokens (or `POST /api/v1/tenant/auth/api-tokens`), scoped to `keys:mint` |
|
|
23
25
|
|
|
24
|
-
`
|
|
26
|
+
`REKEY_URL` plus **at least one** credential is required. Set `SUPER_ADMIN_KEY` for the read tools, `REKEY_OPERATOR_TOKEN` for the `keys:mint` write tool, or both. An agent that should only mint keys can run with the operator token alone (no master key) — the read tools then fail closed with `READ_REQUIRES_ADMIN_KEY`. The server exits with a clear stderr message if `REKEY_URL` or every credential is missing.
|
|
25
27
|
|
|
26
28
|
> The `mint_api_key` write tool does **not** use the all-powerful
|
|
27
29
|
> `SUPER_ADMIN_KEY`. It authenticates as a **scoped operator** via
|
|
28
|
-
> `
|
|
30
|
+
> `REKEY_OPERATOR_TOKEN`, which must carry the `keys:mint` scope and belong to
|
|
29
31
|
> the workspace that owns the target Application — default-deny, so an agent
|
|
30
32
|
> can't mutate production unless you explicitly grant it.
|
|
31
33
|
|
|
@@ -42,16 +44,16 @@ The server reads three env vars (set them in your MCP client config, not your sh
|
|
|
42
44
|
"command": "npx",
|
|
43
45
|
"args": ["-y", "@rekey.dev/mcp"],
|
|
44
46
|
"env": {
|
|
45
|
-
"
|
|
47
|
+
"REKEY_URL": "https://api.rekey.dev",
|
|
46
48
|
"SUPER_ADMIN_KEY": "your-admin-key",
|
|
47
|
-
"
|
|
49
|
+
"REKEY_OPERATOR_TOKEN": "rp_op_…"
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
```
|
|
53
55
|
|
|
54
|
-
Restart Claude Desktop. Tools appear as `
|
|
56
|
+
Restart Claude Desktop. Tools appear as `mcp__rekey__list_applications`, etc.
|
|
55
57
|
|
|
56
58
|
### Cursor
|
|
57
59
|
|
|
@@ -59,7 +61,7 @@ Settings → MCP → Add Server. Same `command` / `args` / `env` shape.
|
|
|
59
61
|
|
|
60
62
|
### Claude Code
|
|
61
63
|
|
|
62
|
-
`.claude/mcp.json` in your repo (same shape). Omit `
|
|
64
|
+
`.claude/mcp.json` in your repo (same shape). Omit `REKEY_OPERATOR_TOKEN` if you only need read tools, or omit `SUPER_ADMIN_KEY` if the agent only needs the `mint_api_key` write tool.
|
|
63
65
|
|
|
64
66
|
## Tools
|
|
65
67
|
|
|
@@ -76,17 +78,17 @@ Settings → MCP → Add Server. Same `command` / `args` / `env` shape.
|
|
|
76
78
|
| `list_payments` | Recent payments (newest first), filterable by `applicationId` / `status` (`PENDING`/`SUCCEEDED`/`FAILED`/`REFUNDED`), exact-match `q` (payment id / provider payment id / end-user id), `sort` (`createdAt`/`amount`), `order`, `limit` (≤200). Amounts are integers in the smallest currency unit. |
|
|
77
79
|
| `get_payment_stats_by_app` | Per-application payment health over the last 30 days — succeeded/failed/pending/refunded counts, success rate, SUCCEEDED volume (`volumeCents`). The panel's richer per-app Billing Overview (`MRR`, 12-month series) lives at the **panel-session-only** endpoint `/api/v1/tenant/applications/:id/billing/stats` and is not reachable with this server's credentials. |
|
|
78
80
|
|
|
79
|
-
**Write tools** (authenticated with the scoped `
|
|
81
|
+
**Write tools** (authenticated with the scoped `REKEY_OPERATOR_TOKEN`):
|
|
80
82
|
|
|
81
83
|
| Tool | What it does |
|
|
82
84
|
| --- | --- |
|
|
83
|
-
| `mint_api_key` | Mint a new secret key
|
|
85
|
+
| `mint_api_key` | Mint a new secret key for an Application. Args: `applicationId`, `name`, `scopes?`. The prefix follows the Application's environment (`PRODUCTION` → `rp_live_…`, otherwise `rp_test_…`) and is not selectable. The raw key is returned **exactly once** — surface it immediately and warn it's unrecoverable. |
|
|
84
86
|
|
|
85
87
|
### `mint_api_key` failure modes (default-deny)
|
|
86
88
|
|
|
87
89
|
| Condition | Error |
|
|
88
90
|
| --- | --- |
|
|
89
|
-
| No `
|
|
91
|
+
| No `REKEY_OPERATOR_TOKEN` configured | `OPERATOR_TOKEN_MISSING` — never falls back to the admin key. |
|
|
90
92
|
| PAT lacks the `keys:mint` scope | `OPERATOR_SCOPE_INSUFFICIENT` (403). |
|
|
91
93
|
| PAT bound to a different workspace than the Application | `APPLICATION_NOT_FOUND` (404) — no cross-tenant oracle. |
|
|
92
94
|
| PAT revoked / expired | `OPERATOR_TOKEN_INVALID` (401). |
|
|
@@ -99,11 +101,11 @@ Every tool error is a JSON object — `error: { code, message, fix?, statusCode?
|
|
|
99
101
|
|
|
100
102
|
- **Money is integers in the smallest currency unit** (cents/paise/sen). Render `999 USD/MONTH` as `$9.99/month` — never assume a `.00` decimal (`¥100` is a hundred whole yen).
|
|
101
103
|
- **Only call `mint_api_key` when the user explicitly asks** to create/mint a key. For other mutations (create plan, refund, deactivate coupon — not yet exposed), use the read tools to figure out what to do, then the `rekey` CLI or the Panel.
|
|
102
|
-
- **Coupon discounts**: PERCENT uses basis
|
|
104
|
+
- **Coupon discounts**: PERCENT uses basis points (`1500` = 15%); AMOUNT uses the smallest currency unit.
|
|
103
105
|
|
|
104
106
|
## Links
|
|
105
107
|
|
|
106
|
-
- Docs: [/docs](https://
|
|
108
|
+
- Docs: [/docs](https://rekey.dev/docs) · [SDK guide](https://rekey.dev/docs/sdk) · [API reference](https://rekey.dev/docs/api) · [agent prompt](https://rekey.dev/docs/prompt)
|
|
107
109
|
|
|
108
110
|
## License
|
|
109
111
|
|
package/dist/client.js
CHANGED
|
@@ -27,7 +27,7 @@ export class AdminClient {
|
|
|
27
27
|
throw new AdminApiError({
|
|
28
28
|
code: 'READ_REQUIRES_ADMIN_KEY',
|
|
29
29
|
message: 'This read/introspection tool requires the global SUPER_ADMIN_KEY.',
|
|
30
|
-
fix: 'Set SUPER_ADMIN_KEY in the MCP server env to enable read tools. (The keys:mint write tool only needs
|
|
30
|
+
fix: 'Set SUPER_ADMIN_KEY in the MCP server env to enable read tools. (The keys:mint write tool only needs REKEY_OPERATOR_TOKEN.)',
|
|
31
31
|
statusCode: 400,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -45,7 +45,7 @@ export class AdminClient {
|
|
|
45
45
|
throw new AdminApiError({
|
|
46
46
|
code: 'OPERATOR_TOKEN_MISSING',
|
|
47
47
|
message: 'This write tool requires an operator personal-access-token.',
|
|
48
|
-
fix: 'Set
|
|
48
|
+
fix: 'Set REKEY_OPERATOR_TOKEN (an rp_op_… token minted in the Panel, scoped to keys:mint) in the MCP server env.',
|
|
49
49
|
statusCode: 400,
|
|
50
50
|
});
|
|
51
51
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtB,IAAI,CAAS;IACb,GAAG,CAAqB;IACxB,UAAU,CAAS;IACnC,YAAY,IAAyE;QACnF,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,WAAW;IACO;IAA7B,YAA6B,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;QACjD,IAAI,CAAC,GAAG,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACvE,CAAC;IAED,4DAA4D;IAC5D,KAAK,CAAC,OAAO,CAAI,MAAc,EAAE,IAAY,EAAE,IAAc;QAC3D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YACvB,MAAM,IAAI,aAAa,CAAC;gBACtB,IAAI,EAAE,yBAAyB;gBAC/B,OAAO,E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AAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;YAC/D,MAAM,IAAI,aAAa,CAAC,EAAE,GAAG,GAAG,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,OAAQ,IAAmC,CAAC,IAAI,CAAC;IACnD,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* have?" or mint a fresh API key without screenshots.
|
|
10
10
|
*
|
|
11
11
|
* Read tools use `SUPER_ADMIN_KEY` (global scope). The write tool uses a SCOPED
|
|
12
|
-
* operator personal-access-token (`
|
|
12
|
+
* operator personal-access-token (`REKEY_OPERATOR_TOKEN`, an `rp_op_…` token)
|
|
13
13
|
* and is rejected server-side unless that PAT carries the `keys:mint` scope —
|
|
14
14
|
* default-deny, so an agent can't mutate production unless explicitly granted.
|
|
15
15
|
*
|
|
16
16
|
* At least ONE credential is required. An agent that should only mint keys can
|
|
17
|
-
* run with `
|
|
17
|
+
* run with `REKEY_OPERATOR_TOKEN` alone (no master key) — read tools then fail
|
|
18
18
|
* closed with `READ_REQUIRES_ADMIN_KEY`. Configure `SUPER_ADMIN_KEY` too to
|
|
19
19
|
* enable the global read/introspection tools.
|
|
20
20
|
*/
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* have?" or mint a fresh API key without screenshots.
|
|
10
10
|
*
|
|
11
11
|
* Read tools use `SUPER_ADMIN_KEY` (global scope). The write tool uses a SCOPED
|
|
12
|
-
* operator personal-access-token (`
|
|
12
|
+
* operator personal-access-token (`REKEY_OPERATOR_TOKEN`, an `rp_op_…` token)
|
|
13
13
|
* and is rejected server-side unless that PAT carries the `keys:mint` scope —
|
|
14
14
|
* default-deny, so an agent can't mutate production unless explicitly granted.
|
|
15
15
|
*
|
|
16
16
|
* At least ONE credential is required. An agent that should only mint keys can
|
|
17
|
-
* run with `
|
|
17
|
+
* run with `REKEY_OPERATOR_TOKEN` alone (no master key) — read tools then fail
|
|
18
18
|
* closed with `READ_REQUIRES_ADMIN_KEY`. Configure `SUPER_ADMIN_KEY` too to
|
|
19
19
|
* enable the global read/introspection tools.
|
|
20
20
|
*/
|
|
@@ -24,14 +24,15 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextpro
|
|
|
24
24
|
import { zodToJsonSchema } from './lib/zod-to-json-schema.js';
|
|
25
25
|
import { AdminClient, AdminApiError } from './client.js';
|
|
26
26
|
import { tools } from './tools.js';
|
|
27
|
-
|
|
27
|
+
import { VERSION } from './version.js';
|
|
28
|
+
const apiUrl = process.env.REKEY_URL ?? '';
|
|
28
29
|
const adminKey = process.env.SUPER_ADMIN_KEY ?? '';
|
|
29
30
|
// Optional: only required by the `mint_api_key` write tool. Read tools work
|
|
30
31
|
// without it. When absent, the write tool fails closed with a clear error.
|
|
31
|
-
const operatorToken = process.env.
|
|
32
|
+
const operatorToken = process.env.REKEY_OPERATOR_TOKEN ?? '';
|
|
32
33
|
if (!apiUrl || (!adminKey && !operatorToken)) {
|
|
33
|
-
process.stderr.write(`[rekey-mcp] missing required env:
|
|
34
|
-
`(SUPER_ADMIN_KEY for read tools and/or
|
|
34
|
+
process.stderr.write(`[rekey-mcp] missing required env: REKEY_URL plus at least one credential ` +
|
|
35
|
+
`(SUPER_ADMIN_KEY for read tools and/or REKEY_OPERATOR_TOKEN for the keys:mint write tool).\n` +
|
|
35
36
|
`[rekey-mcp] fix: configure these in the MCP client (Claude Desktop config, Cursor MCP settings, …)\n`);
|
|
36
37
|
process.exit(1);
|
|
37
38
|
}
|
|
@@ -40,7 +41,7 @@ const client = new AdminClient({
|
|
|
40
41
|
...(adminKey ? { adminKey } : {}),
|
|
41
42
|
...(operatorToken ? { operatorToken } : {}),
|
|
42
43
|
});
|
|
43
|
-
const server = new Server({ name: 'rekey-mcp', version:
|
|
44
|
+
const server = new Server({ name: 'rekey-mcp', version: VERSION }, { capabilities: { tools: {} } });
|
|
44
45
|
server.setRequestHandler(ListToolsRequestSchema, () => ({
|
|
45
46
|
tools: tools.map((t) => ({
|
|
46
47
|
name: t.name,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;A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`) authenticates instead with a SCOPED operator
|
|
7
|
-
* personal-access-token (`
|
|
7
|
+
* personal-access-token (`REKEY_OPERATOR_TOKEN`) and is rejected server-side
|
|
8
8
|
* unless that PAT carries the `keys:mint` scope — default-deny, so an agent
|
|
9
9
|
* can't mint production keys unless explicitly granted. See AGENTS.md.
|
|
10
10
|
*/
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,cAAc,CAAC,KAAK,SAAS,CAAC,CAAC,WAAW;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACvF;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,cAAc,CAAC,KAAK,SAAS,CAAC,CAAC,WAAW;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACvF;AAwDD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAsHtD,CAAC"}
|
package/dist/tools.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Read tools authenticate with the admin key. The one WRITE tool
|
|
6
6
|
* (`mint_api_key`) authenticates instead with a SCOPED operator
|
|
7
|
-
* personal-access-token (`
|
|
7
|
+
* personal-access-token (`REKEY_OPERATOR_TOKEN`) and is rejected server-side
|
|
8
8
|
* unless that PAT carries the `keys:mint` scope — default-deny, so an agent
|
|
9
9
|
* can't mint production keys unless explicitly granted. See AGENTS.md.
|
|
10
10
|
*/
|
|
@@ -33,10 +33,6 @@ const MintApiKeyArgs = z.object({
|
|
|
33
33
|
name: z
|
|
34
34
|
.string()
|
|
35
35
|
.describe('Human label for the key, shown in lists (e.g. "ci-deploy", "agent-worker").'),
|
|
36
|
-
mode: z
|
|
37
|
-
.enum(['live', 'test'])
|
|
38
|
-
.optional()
|
|
39
|
-
.describe('"live" (default) or "test". Test keys hit sandbox billing providers.'),
|
|
40
36
|
scopes: z
|
|
41
37
|
.array(z.string())
|
|
42
38
|
.optional()
|
|
@@ -90,7 +86,7 @@ export const tools = [
|
|
|
90
86
|
},
|
|
91
87
|
{
|
|
92
88
|
name: 'list_coupons',
|
|
93
|
-
description: 'List discount coupons for an Application. PERCENT discounts use basis
|
|
89
|
+
description: 'List discount coupons for an Application. PERCENT discounts use basis points (1500 = 15%); AMOUNT discounts use the smallest currency unit.',
|
|
94
90
|
inputSchema: ListCouponsArgs,
|
|
95
91
|
execute: (c, args) => c.request('GET', `/api/v1/admin/applications/${encodeURIComponent(args.applicationId)}/coupons${args.includeInactive ? '?includeInactive=true' : ''}`),
|
|
96
92
|
},
|
|
@@ -140,12 +136,11 @@ export const tools = [
|
|
|
140
136
|
{
|
|
141
137
|
name: 'mint_api_key',
|
|
142
138
|
description: 'WRITE: Mint a new secret API key (rp_live_…/rp_test_…) for an Application. The raw key is returned exactly ONCE — surface it to the user immediately and tell them it cannot be recovered. ' +
|
|
143
|
-
'Authenticates as a SCOPED operator via
|
|
139
|
+
'Authenticates as a SCOPED operator via REKEY_OPERATOR_TOKEN (not the admin key); the token must carry the `keys:mint` scope and belong to the workspace that owns the Application, or the call is rejected. ' +
|
|
144
140
|
'Use this only when the user explicitly asks to create/mint an API key.',
|
|
145
141
|
inputSchema: MintApiKeyArgs,
|
|
146
142
|
execute: (c, args) => c.requestAsOperator('POST', `/api/v1/tenant/operator/applications/${encodeURIComponent(args.applicationId)}/api-keys`, {
|
|
147
143
|
name: args.name,
|
|
148
|
-
...(args.mode !== undefined ? { mode: args.mode } : {}),
|
|
149
144
|
...(args.scopes !== undefined ? { scopes: args.scopes } : {}),
|
|
150
145
|
}),
|
|
151
146
|
},
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;CAC7E,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CAC7D,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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AE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,uCAAuC,CAAC;KAC1E;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,6LAA6L;YAC7L,8MAA8M;YAC9M,wEAAwE;QAC1E,WAAW,EAAE,cAAc;QAC3B,OAAO,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CACnB,CAAC,CAAC,iBAAiB,CACjB,MAAM,EACN,wCAAwC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,EACzF;YACE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9D,CACF;KACJ;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published version of this package, reported in the MCP `initialize`
|
|
3
|
+
* handshake.
|
|
4
|
+
*
|
|
5
|
+
* Read from `package.json` at runtime rather than kept as a literal. The
|
|
6
|
+
* literal it replaces said `0.0.0` for the whole 1.x line, so every client
|
|
7
|
+
* that logged or gated on the server version saw a number that had never been
|
|
8
|
+
* released.
|
|
9
|
+
*
|
|
10
|
+
* `createRequire` rather than an `import ... with { type: 'json' }`: the
|
|
11
|
+
* manifest sits above `rootDir`, so a static import would not compile, and
|
|
12
|
+
* this file resolves it relative to the emitted `dist/` instead. npm always
|
|
13
|
+
* ships `package.json` in the tarball, so it is there in an installed copy.
|
|
14
|
+
*/
|
|
15
|
+
export declare const VERSION: string;
|
|
16
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,EAAE,MASlB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
/**
|
|
3
|
+
* The published version of this package, reported in the MCP `initialize`
|
|
4
|
+
* handshake.
|
|
5
|
+
*
|
|
6
|
+
* Read from `package.json` at runtime rather than kept as a literal. The
|
|
7
|
+
* literal it replaces said `0.0.0` for the whole 1.x line, so every client
|
|
8
|
+
* that logged or gated on the server version saw a number that had never been
|
|
9
|
+
* released.
|
|
10
|
+
*
|
|
11
|
+
* `createRequire` rather than an `import ... with { type: 'json' }`: the
|
|
12
|
+
* manifest sits above `rootDir`, so a static import would not compile, and
|
|
13
|
+
* this file resolves it relative to the emitted `dist/` instead. npm always
|
|
14
|
+
* ships `package.json` in the tarball, so it is there in an installed copy.
|
|
15
|
+
*/
|
|
16
|
+
export const VERSION = (() => {
|
|
17
|
+
try {
|
|
18
|
+
const require = createRequire(import.meta.url);
|
|
19
|
+
const pkg = require('../package.json');
|
|
20
|
+
return typeof pkg.version === 'string' ? pkg.version : 'unknown';
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// A missing version must not stop the server from serving tools.
|
|
24
|
+
return 'unknown';
|
|
25
|
+
}
|
|
26
|
+
})();
|
|
27
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,OAAO,GAAW,CAAC,GAAG,EAAE;IACnC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAA0B,CAAC;QAChE,OAAO,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,iEAAiE;QACjE,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rekey.dev/mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=22.0.0"
|
|
7
|
+
},
|
|
5
8
|
"description": "Model Context Protocol server for Rekey — lets Claude Desktop / Cursor / Claude Code introspect a deployment.",
|
|
6
9
|
"type": "module",
|
|
7
10
|
"bin": {
|
|
@@ -28,8 +31,7 @@
|
|
|
28
31
|
],
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
31
|
-
"zod": "^3.23.8"
|
|
32
|
-
"@rekey.dev/shared-types": "1.1.2"
|
|
34
|
+
"zod": "^3.23.8"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"@types/node": "^22.9.0",
|