@verifik/mcp 0.1.0 → 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 CHANGED
@@ -1,66 +1,22 @@
1
1
  # @verifik/mcp
2
2
 
3
- Thin [Model Context Protocol](https://modelcontextprotocol.io) adapter for Verifik SmartCheck / Database Screening endpoints.
3
+ Connect your AI assistant to **Verifik** — identity verification, document checks, vehicle lookups, business validation, and background screening across Latin America and worldwide. This package is a [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that exposes the Verifik APIs your account already has access to as tools in Cursor, Claude Desktop, or any MCP client.
4
4
 
5
- Each MCP tool maps 1:1 to an `AppFeature` from `GET /v2/app-features/my-list`. Tool calls proxy to the existing Verifik REST API with your API token, so auth, ClientFeature gating, and credit deduction stay unchanged.
5
+ Each paid tool call goes straight to the Verifik REST API with your API token. Credits are charged on your Verifik account the same way as a direct API call.
6
6
 
7
- ## Architecture
7
+ ## Quick start
8
8
 
9
- ```mermaid
10
- flowchart LR
11
- A[MCP Client\nCursor / Claude Desktop] -->|stdio JSON-RPC| B["@verifik/mcp"]
12
- B -->|GET /v2/app-features/my-list| C[Verifik API]
13
- B -->|Bearer token proxy| C
14
- C --> D[Existing middleware chain\nvalidateClient + billing]
15
- ```
16
-
17
- Data flow:
18
-
19
- 1. On boot, the server loads the client catalog from `GET /v2/app-features/my-list`.
20
- 2. Eligible features become MCP tools (name derived from `code`, schema from `dependencies[]`).
21
- 3. `tools/call` proxies to `${VERIFIK_API_BASE}/${feature.url}` using the feature `method`.
22
- 4. Credits are charged by the normal API path — this server does not implement billing.
23
-
24
- ## Requirements
25
-
26
- - Node.js 18+
27
- - A Verifik **API token** from the Smart-Agent **API Tokens** screen (`/settings/api-key`)
9
+ 1. **Get an API token** — sign in to [Smart-Agent](https://ai.verifik.co), open **Settings → API Tokens**, and create a token.
10
+ 2. **Add the MCP server** to your client (examples below).
11
+ 3. **Restart** your MCP client, then ask your assistant to verify an identity, run a background check, or look up a vehicle.
28
12
 
29
- API tokens are client JWTs minted by `POST /v2/auth/renew-and-revoke` while you are logged in. They include `clientId` and `JWTPhrase`, so they work for the catalog call and for feature endpoints the MCP proxies.
30
-
31
- ## Install (recommended)
13
+ No install step is required. MCP clients run the server with:
32
14
 
33
15
  ```bash
34
16
  npx -y @verifik/mcp
35
17
  ```
36
18
 
37
- No global install required. MCP clients invoke the package via `npx` (see configuration below).
38
-
39
- ### Local development fallback
40
-
41
- ```bash
42
- cd verifik-mcp
43
- npm install
44
- node server.js
45
- ```
46
-
47
- ## Environment variables
48
-
49
- | Variable | Required | Default | Description |
50
- | --- | --- | --- | --- |
51
- | `VERIFIK_API_TOKEN` | **Yes** | — | API token / client JWT from Smart-Agent |
52
- | `VERIFIK_API_BASE` | No | `https://api.verifik.co` | API base URL (use `https://staging-api.verifik.co` for staging) |
53
- | `VERIFIK_MCP_SMARTCHECK_ONLY` | No | `true` | Only expose `smartCheckEnabled` features |
54
- | `VERIFIK_MCP_COUNTRY` | No | — | Comma-separated country filter (e.g. `Colombia,world`) |
55
- | `VERIFIK_MCP_BASE_CATEGORY` | No | — | Comma-separated `baseCategory` filter |
56
- | `VERIFIK_MCP_CODES` | No | — | Comma-separated feature code allowlist |
57
- | `VERIFIK_MCP_CATALOG_REFRESH_MS` | No | `0` | Optional in-memory catalog refresh interval |
58
-
59
- Security: keep the token in environment variables only. The server never logs the full JWT.
60
-
61
- ## Cursor configuration (`mcp.json`)
62
-
63
- Add to your Cursor MCP settings (global or project-level):
19
+ ### Cursor (`mcp.json`)
64
20
 
65
21
  ```json
66
22
  {
@@ -71,17 +27,16 @@ Add to your Cursor MCP settings (global or project-level):
71
27
  "env": {
72
28
  "VERIFIK_API_TOKEN": "YOUR_API_TOKEN",
73
29
  "VERIFIK_API_BASE": "https://api.verifik.co",
74
- "VERIFIK_MCP_SMARTCHECK_ONLY": "true",
75
- "VERIFIK_MCP_COUNTRY": "Colombia,world"
30
+ "VERIFIK_MCP_SMARTCHECK_ONLY": "true"
76
31
  }
77
32
  }
78
33
  }
79
34
  }
80
35
  ```
81
36
 
82
- ## Claude Desktop configuration
37
+ ### Claude Desktop
83
38
 
84
- `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent Claude Desktop config file:
39
+ `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent config file on your OS:
85
40
 
86
41
  ```json
87
42
  {
@@ -91,112 +46,410 @@ Add to your Cursor MCP settings (global or project-level):
91
46
  "args": ["-y", "@verifik/mcp"],
92
47
  "env": {
93
48
  "VERIFIK_API_TOKEN": "YOUR_API_TOKEN",
94
- "VERIFIK_API_BASE": "https://api.verifik.co"
49
+ "VERIFIK_API_BASE": "https://api.verifik.co",
50
+ "VERIFIK_MCP_SMARTCHECK_ONLY": "true"
95
51
  }
96
52
  }
97
53
  }
98
54
  }
99
55
  ```
100
56
 
101
- ## Generic MCP JSON (other clients)
57
+ ### CLI (stdio MCP server)
58
+
59
+ ```bash
60
+ export VERIFIK_API_TOKEN="YOUR_API_TOKEN"
61
+ export VERIFIK_API_BASE="https://api.verifik.co"
62
+ export VERIFIK_MCP_SMARTCHECK_ONLY="true"
63
+ npx -y @verifik/mcp
64
+ ```
65
+
66
+ The server speaks MCP over stdio. Point any MCP-compatible client at the same `npx` command and environment variables.
67
+
68
+ ## How tools are discovered
69
+
70
+ You do **not** need to upgrade this package when Verifik adds new API endpoints. The server builds its tool list from your live account catalog at startup.
71
+
72
+ ### 1. Catalog load (`lib/catalog.js`)
73
+
74
+ On boot, the server calls `GET /v2/app-features/my-list` on `VERIFIK_API_BASE` (default `https://api.verifik.co`), paginating through all pages (500 features per page). It sends your `VERIFIK_API_TOKEN` as a `Bearer` token.
75
+
76
+ Each item in the response is an **AppFeature** with fields such as `code`, `name`, `description`, `url`, `method`, `country`, `baseCategory`, `smartCheckEnabled`, `dependencies[]`, and pricing metadata.
77
+
78
+ ### 2. Filtering (`lib/filters.js`)
79
+
80
+ Features are kept or dropped based on your environment:
81
+
82
+ | Filter | Source | Default / behavior |
83
+ | --- | --- | --- |
84
+ | SmartCheck only | `VERIFIK_MCP_SMARTCHECK_ONLY` | `true` — only features with `smartCheckEnabled: true` |
85
+ | Country | `VERIFIK_MCP_COUNTRY` | Optional comma-separated list (e.g. `Colombia,Mexico,world`) |
86
+ | Category | `VERIFIK_MCP_BASE_CATEGORY` | Optional comma-separated `baseCategory` values |
87
+ | Code allowlist | `VERIFIK_MCP_CODES` | Optional comma-separated feature `code` values |
88
+
89
+ A feature must have both `code` and `url` to become a tool.
90
+
91
+ ### 3. Tool schema (`lib/tool-schema.js`)
92
+
93
+ Each eligible feature becomes one MCP tool:
94
+
95
+ - **Tool name** — sanitized from the feature `code` (letters, digits, `.`, `_`, `-`; max 128 characters).
96
+ - **Description** — feature name, country, description, plus a note that the call charges Verifik credits.
97
+ - **Input schema** — built from `dependencies[]`:
98
+ - `String` → JSON Schema `string`
99
+ - `Number` / `Integer` → `number`
100
+ - `Boolean` → `boolean`
101
+ - `enum`, `min`, `max`, `description`, and `required` are preserved when present.
102
+
103
+ Features whose dependencies include **binary fields** (images, selfies, file uploads, multipart) are **skipped** for now — the MCP transport cannot safely carry those payloads yet. Scalar-only endpoints (identity lookups, plates, background checks, etc.) are exposed.
104
+
105
+ ### 4. Meta tools (`lib/meta-tools.js`) — free, no credits
106
+
107
+ Two helper tools are always available and do **not** call paid endpoints:
108
+
109
+ | Tool | Purpose |
110
+ | --- | --- |
111
+ | `verifik_list_catalog` | List features available in the in-memory catalog, with optional `country`, `baseCategory`, `code`, and `smartCheckOnly` filters |
112
+ | `verifik_get_feature` | Return full metadata and the input JSON Schema for one feature by `code` |
113
+
114
+ Use these to search what your account can access before spending credits.
115
+
116
+ ### 5. Tool calls (`lib/proxy.js`)
117
+
118
+ When the assistant calls a feature tool, the server proxies an HTTP request to `${VERIFIK_API_BASE}/${feature.url}` using the feature's `method` (usually `GET`). Arguments become query parameters (GET) or a JSON body (POST/PUT). Your token is sent as `Authorization: Bearer …`.
119
+
120
+ The catalog can optionally refresh in memory when `VERIFIK_MCP_CATALOG_REFRESH_MS` is set to a positive interval (milliseconds).
121
+
122
+ **New Verifik endpoints appear automatically** the next time the catalog loads — no package update required.
123
+
124
+ ## Response format
125
+
126
+ MCP tool results are JSON text. Paid feature calls are wrapped so your assistant always sees the HTTP status and the Verifik body together:
127
+
128
+ ```json
129
+ {
130
+ "httpStatus": 200,
131
+ "statusText": "OK",
132
+ "durationMs": 312,
133
+ "request": {
134
+ "method": "GET",
135
+ "url": "https://api.verifik.co/v2/co/cedula?documentType=CC&documentNumber=1234567890"
136
+ },
137
+ "body": { }
138
+ }
139
+ ```
140
+
141
+ ### Verifik success envelope (`body` on HTTP 2xx)
142
+
143
+ Successful Verifik API responses use a consistent envelope:
144
+
145
+ | Field | Description |
146
+ | --- | --- |
147
+ | `data` | Main result — identity fields, vehicle record, background-check payload, etc. |
148
+ | `signature` | Certification block: `message` (e.g. `"Certified by Verifik.co"`) and `dateTime` |
149
+ | `id` | Short reference id for the certified response |
150
+ | `billing` | Optional — present on some endpoints when dynamic pricing applies (`dynamicQueryApplied`, `chargedCredits`, etc.) |
151
+
152
+ The examples below show the **full MCP tool result** (wrapper + `body`). All names and document numbers are fictional.
153
+
154
+ ---
155
+
156
+ ### Example 1 — Colombian national ID (cédula)
157
+
158
+ **Tool:** `colombia_api_identity_lookup` (or the sanitized name for `v2/co/cedula` in your catalog)
159
+
160
+ **Arguments:**
102
161
 
103
162
  ```json
104
163
  {
105
- "mcpServers": {
106
- "verifik-smartcheck": {
107
- "command": "npx",
108
- "args": ["-y", "@verifik/mcp"],
109
- "env": {
110
- "VERIFIK_API_TOKEN": "YOUR_API_TOKEN",
111
- "VERIFIK_API_BASE": "https://api.verifik.co",
112
- "VERIFIK_MCP_SMARTCHECK_ONLY": "true"
113
- }
114
- }
164
+ "documentType": "CC",
165
+ "documentNumber": "1234567890"
166
+ }
167
+ ```
168
+
169
+ **MCP result (HTTP 200):**
170
+
171
+ ```json
172
+ {
173
+ "httpStatus": 200,
174
+ "statusText": "OK",
175
+ "durationMs": 284,
176
+ "request": {
177
+ "method": "GET",
178
+ "url": "https://api.verifik.co/v2/co/cedula?documentType=CC&documentNumber=1234567890"
179
+ },
180
+ "body": {
181
+ "data": {
182
+ "documentType": "CC",
183
+ "documentNumber": "1234567890",
184
+ "firstName": "María",
185
+ "lastName": "Gómez López",
186
+ "fullName": "María Gómez López"
187
+ },
188
+ "signature": {
189
+ "message": "Certified by Verifik.co",
190
+ "dateTime": "January 16, 2024 3:44 PM"
191
+ },
192
+ "id": "AB123"
115
193
  }
116
194
  }
117
195
  ```
118
196
 
119
- ### Local repo fallback (no npm publish yet)
197
+ ---
198
+
199
+ ### Example 2 — Peruvian DNI
200
+
201
+ **Tool:** feature for `v3/pe/cedula`
202
+
203
+ **Arguments:**
120
204
 
121
205
  ```json
122
206
  {
123
- "mcpServers": {
124
- "verifik-smartcheck": {
125
- "command": "node",
126
- "args": ["/absolute/path/to/verifik-mcp/server.js"],
127
- "env": {
128
- "VERIFIK_API_TOKEN": "YOUR_API_TOKEN",
129
- "VERIFIK_API_BASE": "https://api.verifik.co"
130
- }
131
- }
207
+ "documentType": "DNI",
208
+ "documentNumber": "87654321"
209
+ }
210
+ ```
211
+
212
+ **MCP result (HTTP 200):**
213
+
214
+ ```json
215
+ {
216
+ "httpStatus": 200,
217
+ "statusText": "OK",
218
+ "durationMs": 410,
219
+ "request": {
220
+ "method": "GET",
221
+ "url": "https://api.verifik.co/v3/pe/cedula?documentType=DNI&documentNumber=87654321"
222
+ },
223
+ "body": {
224
+ "data": {
225
+ "documentType": "DNI",
226
+ "documentNumber": "87654321",
227
+ "firstName": "Carlos",
228
+ "lastName": "Vega Mendoza",
229
+ "fullName": "Carlos Vega Mendoza",
230
+ "dateOfBirth": "19-12-1995",
231
+ "civilStatus": "SOLTERO",
232
+ "sex": "M",
233
+ "address": "Av. Ejemplo 100"
234
+ },
235
+ "signature": {
236
+ "message": "Certified by Verifik.co",
237
+ "dateTime": "April 16, 2025 2:43 PM"
238
+ },
239
+ "id": "FHBCC"
132
240
  }
133
241
  }
134
242
  ```
135
243
 
136
- Restart Cursor / Claude Desktop after editing MCP config.
244
+ ---
245
+
246
+ ### Example 3 — Mexico CURP
137
247
 
138
- ## Tools
248
+ **Tool:** feature for `v2/mx/curp`
139
249
 
140
- ### Meta tools (no credit charge)
250
+ **Arguments:**
141
251
 
142
- - `verifik_list_catalog` — filtered feature summaries from the in-memory catalog
143
- - `verifik_get_feature` — full metadata + dependency JSON schema for one `code`
252
+ ```json
253
+ {
254
+ "documentType": "CURP",
255
+ "documentNumber": "GOML900101HDFRNS09"
256
+ }
257
+ ```
144
258
 
145
- ### Feature tools
259
+ **MCP result (HTTP 200):**
146
260
 
147
- One tool per eligible `AppFeature`:
261
+ ```json
262
+ {
263
+ "httpStatus": 200,
264
+ "statusText": "OK",
265
+ "durationMs": 356,
266
+ "request": {
267
+ "method": "GET",
268
+ "url": "https://api.verifik.co/v2/mx/curp?documentType=CURP&documentNumber=GOML900101HDFRNS09"
269
+ },
270
+ "body": {
271
+ "data": {
272
+ "documentType": "CURP",
273
+ "documentNumber": "GOML900101HDFRNS09",
274
+ "firstName": "Luis",
275
+ "lastName": "Ramírez",
276
+ "fullName": "Luis Ramírez",
277
+ "dateOfBirth": "1990-01-01",
278
+ "nationality": "Mexican"
279
+ },
280
+ "signature": {
281
+ "message": "Certified by Verifik.co",
282
+ "dateTime": "January 16, 2024 3:44 PM"
283
+ },
284
+ "id": "MX001"
285
+ }
286
+ }
287
+ ```
148
288
 
149
- - **Name:** sanitized `code` (`A-Za-z0-9._-`, max 128 chars)
150
- - **Description:** name, country, description, credit note
151
- - **Input schema:** built from `dependencies[]`
152
- - `String` → `string`
153
- - `Number` / `Integer` → `number`
154
- - `Boolean` → `boolean`
155
- - `enum`, `min`, `max`, `description`, `required`
156
- - **Call behavior:** HTTP proxy to the feature `url` using `method` (`GET` query params by default)
289
+ ---
157
290
 
158
- Features with binary/file dependencies (images, selfies, uploads) are skipped until a safe transport exists.
291
+ ### Example 4 — Chile RUN / RUT
159
292
 
160
- ## Smoke test
293
+ **Tool:** feature for `v2/cl/cedula`
161
294
 
162
- ### 1. Unit tests (no live token)
295
+ **Arguments:**
163
296
 
164
- ```bash
165
- cd verifik-mcp
166
- npm test
297
+ ```json
298
+ {
299
+ "documentType": "RUN",
300
+ "documentNumber": "123456789"
301
+ }
167
302
  ```
168
303
 
169
- ### 2. Missing token exits cleanly
304
+ **MCP result (HTTP 200):**
170
305
 
171
- ```bash
172
- node server.js
173
- # stderr: VERIFIK_API_TOKEN is required (client JWT / API bearer token)
174
- # exit code: 1
306
+ ```json
307
+ {
308
+ "httpStatus": 200,
309
+ "statusText": "OK",
310
+ "durationMs": 298,
311
+ "request": {
312
+ "method": "GET",
313
+ "url": "https://api.verifik.co/v2/cl/cedula?documentType=RUN&documentNumber=123456789"
314
+ },
315
+ "body": {
316
+ "data": {
317
+ "documentType": "RUN",
318
+ "documentNumber": "123456789",
319
+ "firstName": "Valentina",
320
+ "lastName": "Soto",
321
+ "fullName": "Valentina Soto"
322
+ },
323
+ "signature": {
324
+ "message": "Certified by Verifik.co",
325
+ "dateTime": "January 16, 2024 3:44 PM"
326
+ },
327
+ "id": "CL001"
328
+ }
329
+ }
175
330
  ```
176
331
 
177
- ### 3. Live catalog load (requires token)
332
+ ---
178
333
 
179
- ```bash
180
- export VERIFIK_API_TOKEN="YOUR_API_TOKEN"
181
- node -e "
182
- const { loadConfig } = require('./lib/config');
183
- const { loadCatalogState } = require('./lib/catalog');
184
- (async () => {
185
- const config = loadConfig();
186
- const state = await loadCatalogState(config);
187
- console.log('tools:', state.tools.length);
188
- console.log('sample:', state.tools.slice(0, 3).map(t => t.name));
189
- })().catch(err => { console.error(err.message); process.exit(1); });
190
- "
334
+ ### Example 5 — Colombia vehicle by plate
335
+
336
+ **Tool:** feature for `v2/co/runt/vehicle-by-plate`
337
+
338
+ **Arguments:**
339
+
340
+ ```json
341
+ {
342
+ "plate": "ABC123"
343
+ }
191
344
  ```
192
345
 
193
- ### 4. MCP stdio handshake
346
+ **MCP result (HTTP 200):**
194
347
 
195
- Start the server via Cursor MCP panel, or use any MCP client that supports stdio transport.
348
+ ```json
349
+ {
350
+ "httpStatus": 200,
351
+ "statusText": "OK",
352
+ "durationMs": 520,
353
+ "request": {
354
+ "method": "GET",
355
+ "url": "https://api.verifik.co/v2/co/runt/vehicle-by-plate?plate=ABC123"
356
+ },
357
+ "body": {
358
+ "data": {
359
+ "plate": "ABC123",
360
+ "brand": "Toyota",
361
+ "model": "Corolla",
362
+ "year": 2019,
363
+ "color": "Blanco",
364
+ "status": "Activo"
365
+ },
366
+ "signature": {
367
+ "message": "Certified by Verifik.co",
368
+ "dateTime": "March 10, 2025 11:20 AM"
369
+ },
370
+ "id": "RUNT01"
371
+ }
372
+ }
373
+ ```
374
+
375
+ ---
376
+
377
+ ### Example 6 — Brazil background check (CPF)
378
+
379
+ **Tool:** feature for `v2/br/background-check`
380
+
381
+ **Arguments:**
382
+
383
+ ```json
384
+ {
385
+ "documentType": "CPF",
386
+ "documentNumber": "123.456.789-00",
387
+ "dateOfBirth": "17/02/1990"
388
+ }
389
+ ```
390
+
391
+ **MCP result (HTTP 200):**
392
+
393
+ ```json
394
+ {
395
+ "httpStatus": 200,
396
+ "statusText": "OK",
397
+ "durationMs": 1840,
398
+ "request": {
399
+ "method": "GET",
400
+ "url": "https://api.verifik.co/v2/br/background-check?documentType=CPF&documentNumber=123.456.789-00&dateOfBirth=17%2F02%2F1990"
401
+ },
402
+ "body": {
403
+ "data": {
404
+ "documentType": "CPF",
405
+ "documentNumber": "123.456.789-00",
406
+ "firstName": "Ana",
407
+ "lastName": "Oliveira",
408
+ "fullName": "Ana Oliveira",
409
+ "dateOfBirth": "17/02/1990",
410
+ "status": "clear",
411
+ "canIssueReports": true
412
+ },
413
+ "signature": {
414
+ "message": "Certified by Verifik.co",
415
+ "dateTime": "April 11, 2023 12:25 PM"
416
+ },
417
+ "id": "BR001"
418
+ }
419
+ }
420
+ ```
421
+
422
+ ---
196
423
 
197
- ## Example tool call result
424
+ ### Document / face / KYC endpoints
198
425
 
199
- Non-2xx responses are returned as MCP text with HTTP status and JSON body so agents can handle `404`, `409`, and `402` the same as REST:
426
+ Verifik offers document validation, face comparison, liveness, and enrollment flows (e.g. `v2/face-recognition/*`, `v2/biometric-validations/*`, `v2/document-validations/*`). Those APIs often require **image or file uploads**. This MCP server currently exposes only features with scalar parameters — binary dependencies are filtered out at catalog load time. Use the [Verifik REST API](https://docs.verifik.co) or [SmartEnroll](https://docs.verifik.co) directly for full document and biometric workflows until file upload support is added here.
427
+
428
+ ---
429
+
430
+ ### Error responses
431
+
432
+ Non-2xx responses are still returned as structured JSON (marked as MCP errors) so agents can handle them:
433
+
434
+ **404 — record not found:**
435
+
436
+ ```json
437
+ {
438
+ "httpStatus": 404,
439
+ "statusText": "Not Found",
440
+ "durationMs": 198,
441
+ "request": {
442
+ "method": "GET",
443
+ "url": "https://api.verifik.co/v2/co/cedula?documentType=CC&documentNumber=9999999999"
444
+ },
445
+ "body": {
446
+ "code": "DOCUMENT_NOT_FOUND",
447
+ "message": "Document not found"
448
+ }
449
+ }
450
+ ```
451
+
452
+ **409 — validation / missing parameter:**
200
453
 
201
454
  ```json
202
455
  {
@@ -214,18 +467,78 @@ Non-2xx responses are returned as MCP text with HTTP status and JSON body so age
214
467
  }
215
468
  ```
216
469
 
217
- ## Publishing
470
+ ## Country coverage
471
+
472
+ The exact tools you see depend on **your Verifik plan and enabled features**. The table below lists countries and representative endpoint paths from the [Verifik API catalog](https://docs.verifik.co/reference/endpoint-doc-index/). Each paid call consumes credits on your account.
473
+
474
+ | Country / region | Example capabilities | Example API paths |
475
+ | --- | --- | --- |
476
+ | **Argentina** | National ID, business, vehicle, criminal record | `v2/ar/cedula`, `v2/ar/company`, `v2/ar/vehicle` |
477
+ | **Bolivia** | National ID, business, vehicle, SOAT | `v2/bo/cedula`, `v2/bo/company`, `v2/bo/vehicle` |
478
+ | **Brazil** | National ID, CPF background check, business (CNPJ), vehicle | `v2/br/cedula`, `v2/br/background-check`, `v2/br/company` |
479
+ | **Canada** | Business, provincial driver license & plates | `v2/ca/company`, `v2/ca/ontario/driver-license` |
480
+ | **Chile** | National ID (RUN), taxpayer (RUT), vehicle, driver license | `v2/cl/cedula`, `v2/cl/taxpayer`, `v2/cl/vehicle` |
481
+ | **Colombia** | National ID, foreigner ID, police/judicial checks, RUNT vehicles, business (RUES/DIAN) | `v2/co/cedula`, `v2/co/runt/vehicle-by-plate`, `v2/co/policia/consultar` |
482
+ | **Costa Rica** | National ID, business, vehicle | `v2/cr/cedula`, `v2/cr/company`, `v2/cr/vehicle` |
483
+ | **Dominican Republic** | National ID | `v2/do/cedula` |
484
+ | **Ecuador** | National ID, vehicle & fines | `v2/ec/cedula`, `v2/ec/vehiculo/placa` |
485
+ | **El Salvador** | National ID (DUI) | `v2/sv/dui` |
486
+ | **Guatemala** | National ID | `v2/gt/cedula` |
487
+ | **Honduras** | National ID | `v2/hn/cedula` |
488
+ | **India** | Voter ID (EPIC) | `v2/in/epic` |
489
+ | **Mexico** | CURP, INE validation, business, vehicle by plate | `v2/mx/curp`, `v2/mx/ine`, `v2/mx/vehiculo/placa` |
490
+ | **Panama** | National ID, business | `v2/pa/cedula`, `v2/pa/company` |
491
+ | **Paraguay** | National ID (CIC), business, vehicle | `v2/py/cic`, `v2/py/company`, `v2/py/vehicle` |
492
+ | **Peru** | DNI (v3), foreigner ID, driver license, vehicle & SOAT | `v3/pe/cedula`, `v2/pe/vehiculo/placa`, `v2/pe/driver-license` |
493
+ | **Spain** | National ID, business, vehicle | `v2/es/cedula`, `v2/es/company` |
494
+ | **United States** | SSN verification, business, state driver licenses, vehicle/VIN | `v2/usa/ssn`, `v2/usa/company`, `v2/usa/vehicle` |
495
+ | **Uruguay** | National ID | `v2/uy/cedula` |
496
+ | **Venezuela** | National ID, foreigner ID | `v2/ve/cedula`, `v2/ve/foreigner-id` |
497
+ | **Worldwide** | Sanctions & watchlists (DEA, FBI, Interpol, OFAC, UN, Europol), IP geolocation, phone lookup | `v2/dea`, `v2/ofac`, `v2/interpol`, `v2/look-ups/phone` |
498
+
499
+ Run `verifik_list_catalog` in your MCP client to see the live list for your token. Filter by country with `VERIFIK_MCP_COUNTRY` or the `country` argument on the meta tool.
500
+
501
+ ## Configuration
502
+
503
+ | Variable | Required | Default | Description |
504
+ | --- | --- | --- | --- |
505
+ | `VERIFIK_API_TOKEN` | **Yes** | — | API token from Smart-Agent → API Tokens |
506
+ | `VERIFIK_API_BASE` | No | `https://api.verifik.co` | API base URL (use `https://staging-api.verifik.co` for staging) |
507
+ | `VERIFIK_MCP_SMARTCHECK_ONLY` | No | `true` | When `true`, only expose SmartCheck-enabled features |
508
+ | `VERIFIK_MCP_COUNTRY` | No | — | Comma-separated country filter (e.g. `Colombia,Mexico,world`) |
509
+ | `VERIFIK_MCP_BASE_CATEGORY` | No | — | Comma-separated `baseCategory` filter |
510
+ | `VERIFIK_MCP_CODES` | No | — | Comma-separated feature code allowlist |
511
+ | `VERIFIK_MCP_CATALOG_REFRESH_MS` | No | `0` | In-memory catalog refresh interval in ms (`0` = load once at startup) |
512
+ | `VERIFIK_MCP_REQUEST_TIMEOUT_MS` | No | `90000` | Per-call HTTP timeout in ms (some endpoints can take 40–60s; increase if you see timeout errors) |
513
+
514
+ ## Security
218
515
 
219
- Published as [`@verifik/mcp`](https://www.npmjs.com/package/@verifik/mcp) from this directory.
516
+ - Your API token stays on **your machine** in environment variables (or your MCP client's secure config). The server never logs the full token.
517
+ - Tool calls go **directly** from your machine to `api.verifik.co` (or your configured base URL). This package does not proxy through a third-party host.
518
+ - Use a dedicated API token with the minimum access your workflow needs. Rotate tokens from the Smart-Agent dashboard if compromised.
519
+ - Handle personal data according to your privacy policy and applicable regulations. Verifik responses contain sensitive identity information.
220
520
 
221
- Release tags use the `v*` prefix (for example `v0.1.0`). See the repository workflow `.github/workflows/publish.yml`.
521
+ ## Troubleshooting
222
522
 
223
- ## Follow-ups
523
+ | Symptom | What to check |
524
+ | --- | --- |
525
+ | Server exits immediately with `VERIFIK_API_TOKEN is required` | Set `VERIFIK_API_TOKEN` in your MCP config `env` block |
526
+ | No tools / empty catalog | Confirm the token is valid, your account has SmartCheck features enabled, and `VERIFIK_MCP_SMARTCHECK_ONLY` / country filters are not too restrictive |
527
+ | `401` / authentication errors | Regenerate the token in Smart-Agent → API Tokens |
528
+ | `402` / insufficient credits | Top up credits in your Verifik dashboard |
529
+ | `404` on a lookup | The document or record was not found — normal for invalid or non-existent identifiers |
530
+ | `409` on a lookup | Missing or invalid parameters — call `verifik_get_feature` with the feature `code` to see required fields |
531
+ | Expected tool missing | It may require file/image upload (not supported yet), may not be SmartCheck-enabled, or may not be on your plan — use `verifik_list_catalog` to inspect |
532
+ | Stale tool list after Verifik adds endpoints | Restart the MCP server, or set `VERIFIK_MCP_CATALOG_REFRESH_MS` to refresh periodically |
224
533
 
225
- - Streamable HTTP MCP transport for hosted deployments
226
- - Biometric / multipart endpoints once file upload bridging is defined
534
+ ## Links
227
535
 
228
- ## Related
536
+ - [Verifik documentation](https://docs.verifik.co) — API reference, guides, and endpoint index
537
+ - [Smart-Agent dashboard](https://ai.verifik.co) — API tokens, SmartCheck catalog, Check Lists
538
+ - [Verifik website](https://verifik.co) — product overview and contact
539
+ - [Model Context Protocol](https://modelcontextprotocol.io) — MCP specification
229
540
 
230
- - GitHub issue: https://github.com/Open-Verifik/verifik-backend/issues/370
231
- - Support ticket: #1313
541
+ ## Requirements
542
+
543
+ - Node.js 18+
544
+ - A Verifik account with API access and available credits