@rekey.dev/mcp 2.1.0 → 2.2.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/README.md +1 -1
- package/dist/client.d.ts +4 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/lib/zod-to-json-schema.d.ts +1 -1
- package/dist/lib/zod-to-json-schema.js +3 -3
- package/dist/lib/zod-to-json-schema.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +13 -13
- package/dist/tools.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ Every tool error is a JSON object — `error: { code, message, fix?, statusCode?
|
|
|
108
108
|
## Gotchas
|
|
109
109
|
|
|
110
110
|
- **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).
|
|
111
|
-
- **Only call `mint_api_key` when the user explicitly asks** to create/mint a key.
|
|
111
|
+
- **Only call `mint_api_key` when the user explicitly asks** to create/mint a key. It is the only write tool here. For other mutations, use the read tools to work out what to do, then the `rekey` CLI or the Panel. A hosted deployment also runs a separate operator MCP server at `/api/v1/tenant/mcp` with a far larger tool set; this package does not reach it.
|
|
112
112
|
- **Coupon discounts**: PERCENT uses basis points (`1500` = 15%); AMOUNT uses the smallest currency unit.
|
|
113
113
|
|
|
114
114
|
## Links
|
package/dist/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface AdminClientConfig {
|
|
|
6
6
|
apiUrl: string;
|
|
7
7
|
/**
|
|
8
8
|
* Global super-admin key. Authenticates the (global-scope) READ tools.
|
|
9
|
-
* Optional: when unset, the server can still run for the scoped write tool
|
|
9
|
+
* Optional: when unset, the server can still run for the scoped write tool,
|
|
10
10
|
* read tools then fail closed with `READ_REQUIRES_ADMIN_KEY` rather than
|
|
11
11
|
* silently using a lesser credential.
|
|
12
12
|
*/
|
|
@@ -33,13 +33,13 @@ export declare class AdminApiError extends Error {
|
|
|
33
33
|
export declare class AdminClient {
|
|
34
34
|
private readonly cfg;
|
|
35
35
|
constructor(cfg: AdminClientConfig);
|
|
36
|
-
/** Read-path request
|
|
36
|
+
/** Read-path request, authenticated with the admin key. */
|
|
37
37
|
request<T>(method: string, path: string, body?: unknown): Promise<T>;
|
|
38
38
|
/**
|
|
39
|
-
* Write-path request
|
|
39
|
+
* Write-path request, authenticated with the configured operator PAT
|
|
40
40
|
* (`rp_op_…`). Used by write tools so an agent acts as a SCOPED operator, not
|
|
41
41
|
* as the global super-admin. Throws `OPERATOR_TOKEN_MISSING` if no PAT was
|
|
42
|
-
* configured
|
|
42
|
+
* configured, write tools must fail closed, never silently fall back to the
|
|
43
43
|
* admin key.
|
|
44
44
|
*/
|
|
45
45
|
requestAsOperator<T>(method: string, path: string, body?: unknown): Promise<T>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAgB,UAAU,EAAE,MAAM,CAAC;gBACvB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;CAOtF;AAED,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,iBAAiB;IAInD,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAgB,UAAU,EAAE,MAAM,CAAC;gBACvB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;CAOtF;AAED,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,iBAAiB;IAInD,2DAA2D;IACrD,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAY1E;;;;;;OAMG;IACG,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;YAYtE,IAAI;CA0BnB"}
|
package/dist/client.js
CHANGED
|
@@ -21,7 +21,7 @@ export class AdminClient {
|
|
|
21
21
|
if (!cfg.apiUrl)
|
|
22
22
|
throw new Error('AdminClient: apiUrl is required.');
|
|
23
23
|
}
|
|
24
|
-
/** Read-path request
|
|
24
|
+
/** Read-path request, authenticated with the admin key. */
|
|
25
25
|
async request(method, path, body) {
|
|
26
26
|
if (!this.cfg.adminKey) {
|
|
27
27
|
throw new AdminApiError({
|
|
@@ -34,10 +34,10 @@ export class AdminClient {
|
|
|
34
34
|
return this.send(method, path, this.cfg.adminKey, body);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Write-path request
|
|
37
|
+
* Write-path request, authenticated with the configured operator PAT
|
|
38
38
|
* (`rp_op_…`). Used by write tools so an agent acts as a SCOPED operator, not
|
|
39
39
|
* as the global super-admin. Throws `OPERATOR_TOKEN_MISSING` if no PAT was
|
|
40
|
-
* configured
|
|
40
|
+
* configured, write tools must fail closed, never silently fall back to the
|
|
41
41
|
* admin key.
|
|
42
42
|
*/
|
|
43
43
|
async requestAsOperator(method, path, body) {
|
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,
|
|
1
|
+
{"version":3,"file":"client.js","sourceR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AAE,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @rekey.dev/mcp
|
|
3
|
+
* @rekey.dev/mcp, Model Context Protocol server.
|
|
4
4
|
*
|
|
5
5
|
* Speaks MCP over stdio, exposing introspection tools for Rekey
|
|
6
6
|
* (Applications, Plans, Coupons, API keys, Tenants) plus a single guarded
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Read tools use `SUPER_ADMIN_KEY` (global scope). The write tool uses a SCOPED
|
|
12
12
|
* operator personal-access-token (`REKEY_OPERATOR_TOKEN`, an `rp_op_…` token)
|
|
13
|
-
* and is rejected server-side unless that PAT carries the `keys:mint` scope
|
|
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 `REKEY_OPERATOR_TOKEN` alone (no master key)
|
|
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
|
*/
|
|
@@ -29,7 +29,7 @@ export { VERSION } from './version.js';
|
|
|
29
29
|
* ── Why this is a function, and why nothing runs at module scope ──
|
|
30
30
|
*
|
|
31
31
|
* This package declares `main` / `types` / `exports` like a library, so
|
|
32
|
-
* `import '@rekey.dev/mcp'` is a thing people can do
|
|
32
|
+
* `import '@rekey.dev/mcp'` is a thing people can do, a test harness listing
|
|
33
33
|
* the tools, a wrapper re-exporting them. It used to read the env and call
|
|
34
34
|
* `process.exit(1)` while the module was still evaluating, which killed the
|
|
35
35
|
* HOST process on a plain import. An importer cannot catch that; there is no
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @rekey.dev/mcp
|
|
3
|
+
* @rekey.dev/mcp, Model Context Protocol server.
|
|
4
4
|
*
|
|
5
5
|
* Speaks MCP over stdio, exposing introspection tools for Rekey
|
|
6
6
|
* (Applications, Plans, Coupons, API keys, Tenants) plus a single guarded
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Read tools use `SUPER_ADMIN_KEY` (global scope). The write tool uses a SCOPED
|
|
12
12
|
* operator personal-access-token (`REKEY_OPERATOR_TOKEN`, an `rp_op_…` token)
|
|
13
|
-
* and is rejected server-side unless that PAT carries the `keys:mint` scope
|
|
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 `REKEY_OPERATOR_TOKEN` alone (no master key)
|
|
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
|
*/
|
|
@@ -36,7 +36,7 @@ export { VERSION } from './version.js';
|
|
|
36
36
|
* ── Why this is a function, and why nothing runs at module scope ──
|
|
37
37
|
*
|
|
38
38
|
* This package declares `main` / `types` / `exports` like a library, so
|
|
39
|
-
* `import '@rekey.dev/mcp'` is a thing people can do
|
|
39
|
+
* `import '@rekey.dev/mcp'` is a thing people can do, a test harness listing
|
|
40
40
|
* the tools, a wrapper re-exporting them. It used to read the env and call
|
|
41
41
|
* `process.exit(1)` while the module was still evaluating, which killed the
|
|
42
42
|
* HOST process on a plain import. An importer cannot catch that; there is no
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The MCP `tools/list` response wants each tool's `inputSchema` as a JSON
|
|
5
5
|
* Schema object. We only use a small Zod subset (objects of strings /
|
|
6
6
|
* booleans / optionals with descriptions), so reaching for `zod-to-json-schema`
|
|
7
|
-
* as a full dependency is overkill
|
|
7
|
+
* as a full dependency is overkill, this 30-line implementation covers it
|
|
8
8
|
* and stays auditable. If the tool surface grows, swap in the npm package.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* The MCP `tools/list` response wants each tool's `inputSchema` as a JSON
|
|
5
5
|
* Schema object. We only use a small Zod subset (objects of strings /
|
|
6
6
|
* booleans / optionals with descriptions), so reaching for `zod-to-json-schema`
|
|
7
|
-
* as a full dependency is overkill
|
|
7
|
+
* as a full dependency is overkill, this 30-line implementation covers it
|
|
8
8
|
* and stays auditable. If the tool surface grows, swap in the npm package.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
export function zodToJsonSchema(schema) {
|
|
12
|
-
// Object
|
|
12
|
+
// Object, the common top-level case for tool args.
|
|
13
13
|
if (schema instanceof z.ZodObject) {
|
|
14
14
|
const shape = schema.shape;
|
|
15
15
|
const properties = {};
|
|
@@ -39,7 +39,7 @@ export function zodToJsonSchema(schema) {
|
|
|
39
39
|
if (schema instanceof z.ZodArray) {
|
|
40
40
|
return { type: 'array', items: zodToJsonSchema(schema.element) };
|
|
41
41
|
}
|
|
42
|
-
// Fallback
|
|
42
|
+
// Fallback, let MCP receive an open object.
|
|
43
43
|
return { type: 'object' };
|
|
44
44
|
}
|
|
45
45
|
function unwrap(s) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-to-json-schema.js","sourceRoot":"","sources":["../../src/lib/zod-to-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,MAAM,UAAU,eAAe,CAAC,MAAoB;IAClD,
|
|
1
|
+
{"version":3,"file":"zod-to-json-schema.js","sourceRoot":"","sources":["../../src/lib/zod-to-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,MAAM,UAAU,eAAe,CAAC,MAAoB;IAClD,mDAAmD;IACnD,IAAI,MAAM,YAAY,CAAC,CAAC,SAAS,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAqC,CAAC;QAC3D,MAAM,UAAU,GAA+B,EAAE,CAAC;QAClD,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACjD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,UAAU,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAChD,IAAI,KAAK,CAAC,WAAW;gBAAE,UAAU,CAAC,GAAG,CAAC,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;YACvE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,UAAU;YACV,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC;SACzC,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,YAAY,CAAC,CAAC,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE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
7
|
* personal-access-token (`REKEY_OPERATOR_TOKEN`) and is rejected server-side
|
|
8
|
-
* unless that PAT carries the `keys:mint` scope
|
|
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
|
*/
|
|
11
11
|
import { z } from 'zod';
|
package/dist/tools.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
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
7
|
* personal-access-token (`REKEY_OPERATOR_TOKEN`) and is rejected server-side
|
|
8
|
-
* unless that PAT carries the `keys:mint` scope
|
|
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
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
/**
|
|
13
|
-
* `limit` / `offset
|
|
13
|
+
* `limit` / `offset`, accepted by every list endpoint on the admin surface.
|
|
14
14
|
*
|
|
15
15
|
* Merged into each list tool's args so a model can page. Before 2.0.0-rc.3
|
|
16
16
|
* these endpoints returned a bare array with no `total`, so a tool result
|
|
@@ -89,14 +89,14 @@ export const tools = [
|
|
|
89
89
|
{
|
|
90
90
|
name: 'list_tenants',
|
|
91
91
|
description: 'List Tenants. Tenants are the outer multi-tenancy unit (one per Rekey customer). Use this when the user asks "what tenants exist" or to find a tenantId to drill into. ' +
|
|
92
|
-
'Returns `{items, page}
|
|
92
|
+
'Returns `{items, page}`, check `page.hasMore` / `page.total` before concluding you have seen them all, and pass `offset` for the next window.',
|
|
93
93
|
inputSchema: ListTenantsArgs,
|
|
94
94
|
execute: (c, args) => c.request('GET', `/api/v1/admin/tenants${query(args)}`),
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
name: 'list_applications',
|
|
98
98
|
description: 'List Applications, optionally filtered by Tenant. An Application is one project under a Tenant; every domain row in Rekey carries an applicationId. Use this to find the applicationId for subsequent calls. ' +
|
|
99
|
-
'Returns `{items, page}
|
|
99
|
+
'Returns `{items, page}`, check `page.hasMore` / `page.total` before concluding you have seen them all.',
|
|
100
100
|
inputSchema: ListApplicationsArgs,
|
|
101
101
|
execute: (c, args) => c.request('GET', `/api/v1/admin/applications${query(args)}`),
|
|
102
102
|
},
|
|
@@ -108,8 +108,8 @@ export const tools = [
|
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
name: 'list_plans',
|
|
111
|
-
description: 'List Plans for an Application. Amount is always in the smallest currency unit (cents/paise/sen)
|
|
112
|
-
'Returns `{items, page}
|
|
111
|
+
description: 'List Plans for an Application. Amount is always in the smallest currency unit (cents/paise/sen), never floats. ' +
|
|
112
|
+
'Returns `{items, page}`, check `page.hasMore` / `page.total`.',
|
|
113
113
|
inputSchema: ListPlansArgs,
|
|
114
114
|
execute: (c, args) => c.request('GET', `/api/v1/admin/applications/${encodeURIComponent(args.applicationId)}/plans${query({
|
|
115
115
|
...(args.includeInactive ? { includeInactive: true } : {}),
|
|
@@ -120,7 +120,7 @@ export const tools = [
|
|
|
120
120
|
{
|
|
121
121
|
name: 'list_coupons',
|
|
122
122
|
description: 'List discount coupons for an Application. PERCENT discounts use basis points (1500 = 15%); AMOUNT discounts use the smallest currency unit. ' +
|
|
123
|
-
'Returns `{items, page}
|
|
123
|
+
'Returns `{items, page}`, check `page.hasMore` / `page.total`.',
|
|
124
124
|
inputSchema: ListCouponsArgs,
|
|
125
125
|
execute: (c, args) => c.request('GET', `/api/v1/admin/applications/${encodeURIComponent(args.applicationId)}/coupons${query({
|
|
126
126
|
...(args.includeInactive ? { includeInactive: true } : {}),
|
|
@@ -130,7 +130,7 @@ export const tools = [
|
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
name: 'list_api_keys',
|
|
133
|
-
description: 'List active API keys for an Application. Returns metadata only
|
|
133
|
+
description: 'List active API keys for an Application. Returns metadata only, the raw key value is unrecoverable after creation, by design.',
|
|
134
134
|
inputSchema: ListApiKeysArgs,
|
|
135
135
|
execute: (c, args) => c.request('GET', `/api/v1/admin/applications/${encodeURIComponent(args.applicationId)}/api-keys`),
|
|
136
136
|
},
|
|
@@ -138,7 +138,7 @@ export const tools = [
|
|
|
138
138
|
name: 'list_payments',
|
|
139
139
|
description: 'List recent payments (newest first), optionally filtered to one Application and/or status. ' +
|
|
140
140
|
'Each row carries applicationId, applicationSlug, endUserId, amount, currency, status, createdAt. ' +
|
|
141
|
-
'Amounts are integers in the smallest currency unit (cents/paise/sen)
|
|
141
|
+
'Amounts are integers in the smallest currency unit (cents/paise/sen), never floats.',
|
|
142
142
|
inputSchema: ListPaymentsArgs,
|
|
143
143
|
execute: async (c, args) => {
|
|
144
144
|
const p = new URLSearchParams();
|
|
@@ -157,7 +157,7 @@ export const tools = [
|
|
|
157
157
|
const qs = p.toString();
|
|
158
158
|
// /admin/metrics/payments returns the `{items, page}` envelope. This
|
|
159
159
|
// tool's contract is a bare payments array bounded by `limit`, so unwrap
|
|
160
|
-
// to `.items
|
|
160
|
+
// to `.items`, the pagination metadata lives under `page` since
|
|
161
161
|
// 2.0.0-rc.3 (it used to be flattened next to `items`).
|
|
162
162
|
const result = await c.request('GET', `/api/v1/admin/metrics/payments${qs ? `?${qs}` : ''}`);
|
|
163
163
|
return result.items;
|
|
@@ -167,14 +167,14 @@ export const tools = [
|
|
|
167
167
|
name: 'get_payment_stats_by_app',
|
|
168
168
|
description: 'Billing/payment health per Application over the last 30 days: succeeded/failed/pending/refunded ' +
|
|
169
169
|
'counts, success rate, and SUCCEEDED volume (volumeCents, smallest currency unit). Use this for ' +
|
|
170
|
-
'"which apps are earning / failing payments" questions. (The richer per-app Billing Overview
|
|
171
|
-
"12-month revenue series
|
|
170
|
+
'"which apps are earning / failing payments" questions. (The richer per-app Billing Overview, MRR, ' +
|
|
171
|
+
"12-month revenue series, lives at the panel-session-only endpoint /api/v1/tenant/applications/:id/billing/stats and isn't reachable with this server's credentials.)",
|
|
172
172
|
inputSchema: PaymentStatsByAppArgs,
|
|
173
173
|
execute: (c) => c.request('GET', '/api/v1/admin/metrics/payments-by-app'),
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
name: 'mint_api_key',
|
|
177
|
-
description: 'WRITE: Mint a new secret API key (rp_live_…/rp_test_…) for an Application. The raw key is returned exactly ONCE
|
|
177
|
+
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. ' +
|
|
178
178
|
'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. ' +
|
|
179
179
|
'Use this only when the user explicitly asks to create/mint an API key.',
|
|
180
180
|
inputSchema: MintApiKeyArgs,
|
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;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG;IACjB,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,mCAAmC,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CAC1F,CAAC;AAEF,wEAAwE;AACxE,SAAS,KAAK,CAAC,MAA6D;IAC1E,MAAM,CAAC,GAAG,IAAI,eAAe,EAAE,CAAC;IAChC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAA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C9D,CACF;KACJ;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rekey.dev/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc -p tsconfig.json && chmod +x dist/index.js",
|
|
48
48
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
49
|
-
"lint": "
|
|
50
|
-
"test": "tsc -p tsconfig.json && vitest run"
|
|
49
|
+
"lint": "eslint .",
|
|
50
|
+
"test": "tsc -p tsconfig.json && vitest run",
|
|
51
|
+
"lint:fix": "eslint . --fix --fix-type problem,suggestion,layout"
|
|
51
52
|
}
|
|
52
53
|
}
|