@authn8/mcp-server 1.0.2 → 1.0.4
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/dist/index.js +16 -10
- package/package.json +1 -1
- package/src/index.ts +15 -9
- package/src/tools.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -119,7 +119,7 @@ var toolDefinitions = {
|
|
|
119
119
|
get_otp: {
|
|
120
120
|
description: "Generates a TOTP code for a specific account. You can provide either the account_id (UUID) or account_name (partial match supported). If multiple accounts match the name, you'll get a list of matches to be more specific.",
|
|
121
121
|
inputSchema: z.object({
|
|
122
|
-
account_id: z.
|
|
122
|
+
account_id: z.uuid().optional().describe("UUID of the account"),
|
|
123
123
|
account_name: z.string().optional().describe("Name to search for (partial match)")
|
|
124
124
|
})
|
|
125
125
|
},
|
|
@@ -271,10 +271,12 @@ async function main() {
|
|
|
271
271
|
name: "authn8-mcp",
|
|
272
272
|
version: "1.0.0"
|
|
273
273
|
});
|
|
274
|
-
server.
|
|
274
|
+
server.registerTool(
|
|
275
275
|
"list_accounts",
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
{
|
|
277
|
+
description: toolDefinitions.list_accounts.description,
|
|
278
|
+
inputSchema: toolDefinitions.list_accounts.inputSchema
|
|
279
|
+
},
|
|
278
280
|
async () => {
|
|
279
281
|
try {
|
|
280
282
|
return await handleListAccounts();
|
|
@@ -290,10 +292,12 @@ async function main() {
|
|
|
290
292
|
}
|
|
291
293
|
}
|
|
292
294
|
);
|
|
293
|
-
server.
|
|
295
|
+
server.registerTool(
|
|
294
296
|
"get_otp",
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
{
|
|
298
|
+
description: toolDefinitions.get_otp.description,
|
|
299
|
+
inputSchema: toolDefinitions.get_otp.inputSchema
|
|
300
|
+
},
|
|
297
301
|
async (args) => {
|
|
298
302
|
try {
|
|
299
303
|
return await handleGetOtp(args);
|
|
@@ -309,10 +313,12 @@ async function main() {
|
|
|
309
313
|
}
|
|
310
314
|
}
|
|
311
315
|
);
|
|
312
|
-
server.
|
|
316
|
+
server.registerTool(
|
|
313
317
|
"whoami",
|
|
314
|
-
|
|
315
|
-
|
|
318
|
+
{
|
|
319
|
+
description: toolDefinitions.whoami.description,
|
|
320
|
+
inputSchema: toolDefinitions.whoami.inputSchema
|
|
321
|
+
},
|
|
316
322
|
async () => {
|
|
317
323
|
try {
|
|
318
324
|
return await handleWhoami();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -48,10 +48,12 @@ async function main(): Promise<void> {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
// Register tools
|
|
51
|
-
server.
|
|
51
|
+
server.registerTool(
|
|
52
52
|
"list_accounts",
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
{
|
|
54
|
+
description: toolDefinitions.list_accounts.description,
|
|
55
|
+
inputSchema: toolDefinitions.list_accounts.inputSchema,
|
|
56
|
+
},
|
|
55
57
|
async () => {
|
|
56
58
|
try {
|
|
57
59
|
return await handleListAccounts();
|
|
@@ -68,10 +70,12 @@ async function main(): Promise<void> {
|
|
|
68
70
|
}
|
|
69
71
|
);
|
|
70
72
|
|
|
71
|
-
server.
|
|
73
|
+
server.registerTool(
|
|
72
74
|
"get_otp",
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
{
|
|
76
|
+
description: toolDefinitions.get_otp.description,
|
|
77
|
+
inputSchema: toolDefinitions.get_otp.inputSchema,
|
|
78
|
+
},
|
|
75
79
|
async (args) => {
|
|
76
80
|
try {
|
|
77
81
|
return await handleGetOtp(args as { account_id?: string; account_name?: string });
|
|
@@ -88,10 +92,12 @@ async function main(): Promise<void> {
|
|
|
88
92
|
}
|
|
89
93
|
);
|
|
90
94
|
|
|
91
|
-
server.
|
|
95
|
+
server.registerTool(
|
|
92
96
|
"whoami",
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
{
|
|
98
|
+
description: toolDefinitions.whoami.description,
|
|
99
|
+
inputSchema: toolDefinitions.whoami.inputSchema,
|
|
100
|
+
},
|
|
95
101
|
async () => {
|
|
96
102
|
try {
|
|
97
103
|
return await handleWhoami();
|
package/src/tools.ts
CHANGED
|
@@ -20,7 +20,6 @@ export const toolDefinitions = {
|
|
|
20
20
|
"Generates a TOTP code for a specific account. You can provide either the account_id (UUID) or account_name (partial match supported). If multiple accounts match the name, you'll get a list of matches to be more specific.",
|
|
21
21
|
inputSchema: z.object({
|
|
22
22
|
account_id: z
|
|
23
|
-
.string()
|
|
24
23
|
.uuid()
|
|
25
24
|
.optional()
|
|
26
25
|
.describe("UUID of the account"),
|