@kantadev/cli 0.1.1 → 0.1.2
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 +3 -1
- package/bin/kanta-mcp.js +1 -1
- package/package.json +5 -4
- package/server.json +12 -4
- package/src/cli/index.js +1 -1
- package/src/core/client.js +4 -1
- package/src/mcp/server.js +7 -5
- package/src/mcp/tools/customer.js +6 -0
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@ npm link
|
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
From 0.1.2, `npx -y @kantadev/cli mcp` works too (it's what the MCP registry entry runs).
|
|
42
|
+
|
|
41
43
|
The server calls `GET /me` once at startup to learn the key scope. If the API is
|
|
42
44
|
unreachable it still boots with the customer tool set (admin tools appear once
|
|
43
45
|
`/me` succeeds).
|
|
@@ -184,7 +186,7 @@ See the config block at the top of this file. Admin tools appear in
|
|
|
184
186
|
|
|
185
187
|
- Verify / Find / jobs: `kanta_verify_email`, `kanta_verify_bulk`,
|
|
186
188
|
`kanta_find_email`, `kanta_find_bulk`, `kanta_jobs_list`, `kanta_job_get`,
|
|
187
|
-
`kanta_job_results`, `kanta_job_cancel`, `kanta_job_delete`, `kanta_account`,
|
|
189
|
+
`kanta_job_results`, `kanta_job_cancel`, `kanta_job_resume`, `kanta_job_delete`, `kanta_account`,
|
|
188
190
|
`kanta_credits`
|
|
189
191
|
- Database: `kanta_db_count`, `kanta_db_search`, `kanta_db_facets`,
|
|
190
192
|
`kanta_db_lookup`, `kanta_db_export`, `kanta_db_export_status`,
|
package/bin/kanta-mcp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Kanta MCP stdio server entry point (`npx @
|
|
2
|
+
// Kanta MCP stdio server entry point (`npx -y -p @kantadev/cli kanta-mcp`, or `npx -y @kantadev/cli mcp`).
|
|
3
3
|
import { startServer } from '../src/mcp/server.js';
|
|
4
4
|
|
|
5
5
|
startServer().catch((err) => {
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kantadev/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Kanta CLI + MCP server — email verification, email finding, and the Kanta B2B contact database from your terminal or an MCP client.",
|
|
5
5
|
"mcpName": "dev.kanta/cli",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"
|
|
9
|
-
"kanta
|
|
8
|
+
"cli": "bin/kanta.js",
|
|
9
|
+
"kanta": "bin/kanta.js",
|
|
10
|
+
"kanta-mcp": "bin/kanta-mcp.js"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"bin",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"url": "git+https://github.com/griffinkanta/kanta-dev.git",
|
|
33
34
|
"directory": "kanta-cli"
|
|
34
35
|
},
|
|
35
|
-
"homepage": "https://kanta.dev/
|
|
36
|
+
"homepage": "https://kanta.dev/api-docs",
|
|
36
37
|
"keywords": [
|
|
37
38
|
"kanta",
|
|
38
39
|
"email-verification",
|
package/server.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "dev.kanta/cli",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "0.1.
|
|
4
|
+
"description": "Kanta Verify, Find, and Database: email verification, email finding, and B2B contact search.",
|
|
5
|
+
"version": "0.1.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/griffinkanta/kanta-dev",
|
|
8
8
|
"source": "github",
|
|
@@ -12,9 +12,17 @@
|
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@kantadev/cli",
|
|
15
|
-
"version": "0.1.
|
|
15
|
+
"version": "0.1.2",
|
|
16
16
|
"runtimeHint": "npx",
|
|
17
|
-
"
|
|
17
|
+
"packageArguments": [
|
|
18
|
+
{
|
|
19
|
+
"type": "positional",
|
|
20
|
+
"value": "mcp"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"transport": {
|
|
24
|
+
"type": "stdio"
|
|
25
|
+
},
|
|
18
26
|
"environmentVariables": [
|
|
19
27
|
{
|
|
20
28
|
"name": "KANTA_API_KEY",
|
package/src/cli/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export function createProgram(deps = {}) {
|
|
|
16
16
|
program
|
|
17
17
|
.name('kanta')
|
|
18
18
|
.description('Kanta CLI — verify, find, and manage email jobs over api.kanta.dev')
|
|
19
|
-
.version('0.1.
|
|
19
|
+
.version('0.1.2')
|
|
20
20
|
.option('--profile <name>', 'config profile to use')
|
|
21
21
|
.option('--api-key <key>', 'API key (overrides profile/env; never persisted)')
|
|
22
22
|
.option('--base-url <url>', 'API base URL override')
|
package/src/core/client.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
// One method per endpoint. Returns parsed JSON or throws KantaApiError.
|
|
3
3
|
import { KantaApiError } from './errors.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// 429 is deliberately not retried here — the verifier fleet's own throughput
|
|
6
|
+
// is the bottleneck at Kanta's real volumes, not the API's request-rate limiter,
|
|
7
|
+
// and retrying a rate limit on a fixed delay only compounds backlog under load.
|
|
8
|
+
const RETRYABLE = new Set([503]);
|
|
6
9
|
|
|
7
10
|
export class KantaClient {
|
|
8
11
|
constructor({
|
package/src/mcp/server.js
CHANGED
|
@@ -20,10 +20,12 @@ export async function resolveIdentity() {
|
|
|
20
20
|
try {
|
|
21
21
|
return await whoami({});
|
|
22
22
|
} catch (err) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const rejected = err?.status === 401 || err?.status === 403;
|
|
24
|
+
process.stderr.write(rejected
|
|
25
|
+
? `kanta-mcp: the API rejected your API key (${err?.code || err?.message || err}). ` +
|
|
26
|
+
'Check KANTA_API_KEY (or your profile); every tool call will fail until it is fixed.\n'
|
|
27
|
+
: `kanta-mcp: could not verify identity (${err?.message || err}); ` +
|
|
28
|
+
'starting with customer tools only. Admin tools appear once the API is reachable.\n');
|
|
27
29
|
return { scope: 'user', offline: true };
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -38,7 +40,7 @@ export async function startServer() {
|
|
|
38
40
|
const handlers = new Map(tools.map(t => [t.name, wrapHandler(t, { client })]));
|
|
39
41
|
|
|
40
42
|
const server = new Server(
|
|
41
|
-
{ name: 'kanta', version: '0.1.
|
|
43
|
+
{ name: 'kanta', version: '0.1.2' },
|
|
42
44
|
{ capabilities: { tools: {} } },
|
|
43
45
|
);
|
|
44
46
|
|
|
@@ -143,6 +143,12 @@ export const customerTools = [
|
|
|
143
143
|
inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
|
|
144
144
|
handler: (a, { client }) => client.cancelJob(a.id),
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
name: 'kanta_job_resume',
|
|
148
|
+
description: 'Resume a paused job.',
|
|
149
|
+
inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
|
|
150
|
+
handler: (a, { client }) => client.resumeJob(a.id),
|
|
151
|
+
},
|
|
146
152
|
{
|
|
147
153
|
name: 'kanta_job_delete',
|
|
148
154
|
description: 'Delete a finished job.',
|