@talonic/mcp 0.1.6 → 0.1.8

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.
@@ -0,0 +1,638 @@
1
+ // src/content/seo.ts
2
+ var MCP_NAV_SECTIONS = [
3
+ {
4
+ id: "overview",
5
+ label: "Overview",
6
+ children: [
7
+ { id: "mcp-introduction", label: "Introduction" },
8
+ { id: "why-mcp", label: "Why Use This" },
9
+ { id: "get-api-key", label: "Get an API Key" }
10
+ ]
11
+ },
12
+ {
13
+ id: "install",
14
+ label: "Install",
15
+ children: [
16
+ { id: "install-overview", label: "Overview" },
17
+ { id: "claude-desktop", label: "Claude Desktop" },
18
+ { id: "cursor", label: "Cursor" },
19
+ { id: "cline", label: "Cline" },
20
+ { id: "continue", label: "Continue" },
21
+ { id: "cowork", label: "Cowork" }
22
+ ]
23
+ },
24
+ {
25
+ id: "tools",
26
+ label: "Tool Reference",
27
+ children: [
28
+ { id: "talonic-extract", label: "talonic_extract" },
29
+ { id: "talonic-search", label: "talonic_search" },
30
+ { id: "talonic-filter", label: "talonic_filter" },
31
+ { id: "talonic-get-document", label: "talonic_get_document" },
32
+ { id: "talonic-to-markdown", label: "talonic_to_markdown" },
33
+ { id: "talonic-list-schemas", label: "talonic_list_schemas" },
34
+ { id: "talonic-save-schema", label: "talonic_save_schema" }
35
+ ]
36
+ },
37
+ {
38
+ id: "features",
39
+ label: "Features",
40
+ children: [
41
+ { id: "drag-and-drop", label: "Drag & Drop Files" },
42
+ { id: "how-it-works", label: "How It Works" }
43
+ ]
44
+ },
45
+ {
46
+ id: "configuration",
47
+ label: "Configuration",
48
+ children: [
49
+ { id: "env-variables", label: "Environment Variables" }
50
+ ]
51
+ },
52
+ {
53
+ id: "troubleshooting",
54
+ label: "Troubleshooting",
55
+ children: [
56
+ { id: "common-issues", label: "Common Issues" },
57
+ { id: "known-limitations", label: "Known Limitations" },
58
+ { id: "upgrading", label: "Upgrading" }
59
+ ]
60
+ }
61
+ ];
62
+
63
+ // src/content/helpers.ts
64
+ function deriveBreadcrumbs(sections7, leafId) {
65
+ const root = { label: "MCP Server", slug: "mcp" };
66
+ for (const group of sections7) {
67
+ const child = group.children?.find((c) => c.id === leafId);
68
+ if (child) {
69
+ return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
70
+ }
71
+ }
72
+ const topLevel = sections7.find((s) => s.id === leafId);
73
+ if (topLevel) {
74
+ return [root, { label: topLevel.label, slug: topLevel.id }];
75
+ }
76
+ return [root];
77
+ }
78
+ function derivePrevNext(sections7, leafId) {
79
+ const flat = sections7.flatMap(
80
+ (s) => s.children ?? [{ id: s.id, label: s.label }]
81
+ );
82
+ const idx = flat.findIndex((c) => c.id === leafId);
83
+ if (idx === -1) return { prev: null, next: null };
84
+ const prevItem = idx > 0 ? flat[idx - 1] : void 0;
85
+ const nextItem = idx < flat.length - 1 ? flat[idx + 1] : void 0;
86
+ return {
87
+ prev: prevItem ? { slug: prevItem.id, label: prevItem.label } : null,
88
+ next: nextItem ? { slug: nextItem.id, label: nextItem.label } : null
89
+ };
90
+ }
91
+
92
+ // src/content/sections/overview.ts
93
+ var sections = [
94
+ {
95
+ slug: "mcp-introduction",
96
+ parentSlug: "overview",
97
+ title: "Introduction",
98
+ seoTitle: "MCP Server Introduction \u2014 Talonic Docs",
99
+ description: "Official Talonic MCP server. Lets AI agents extract structured, schema-validated data from any document via the Model Context Protocol.",
100
+ content: [
101
+ { type: "paragraph", text: "Official Talonic MCP server. Lets AI agents extract structured, schema-validated data from any document via the [Model Context Protocol](https://modelcontextprotocol.io)." },
102
+ { type: "paragraph", text: "Seven tools and one resource: `talonic_extract`, `talonic_search`, `talonic_filter`, `talonic_get_document`, `talonic_to_markdown`, `talonic_list_schemas`, `talonic_save_schema`, plus the `talonic://schemas` resource." },
103
+ { type: "paragraph", text: "Listed on the [official MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.talonicdev/talonic-mcp`. Verified end-to-end against production." }
104
+ ],
105
+ related: [
106
+ { label: "Why Use This", slug: "why-mcp" },
107
+ { label: "Claude Desktop", slug: "claude-desktop" },
108
+ { label: "Node SDK", slug: "introduction" }
109
+ ],
110
+ faq: [
111
+ { question: "What is the Talonic MCP server?", answer: "An official MCP server that gives AI agents (Claude Desktop, Cursor, Cline, etc.) the ability to extract structured data from documents using the Model Context Protocol." },
112
+ { question: "Is the Talonic MCP server on the official MCP Registry?", answer: "Yes. It is listed as io.github.talonicdev/talonic-mcp on registry.modelcontextprotocol.io, maintained by Anthropic and the MCP steering group." }
113
+ ],
114
+ mentions: ["MCP", "Model Context Protocol", "AI agents", "document extraction"]
115
+ },
116
+ {
117
+ slug: "why-mcp",
118
+ parentSlug: "overview",
119
+ title: "Why Use This",
120
+ seoTitle: "Why Talonic MCP \u2014 Talonic Docs",
121
+ description: "Why AI agents should use the Talonic MCP server instead of raw OCR plus LLM calls for document extraction.",
122
+ content: [
123
+ { type: "paragraph", text: "When an agent needs to pull structured data out of a PDF, scan, image, or messy document, the usual approach is raw OCR plus an LLM call. Results are unreliable; tables get mangled, dates get misread, totals drift." },
124
+ { type: "paragraph", text: "With this MCP server installed, the agent has a `talonic_extract` tool that returns schema-validated JSON with per-field confidence scores, a detected document type, and stable IDs for follow-up calls. Six other tools cover the rest of the workflow: searching the workspace, filtering by extracted field values, fetching a document's metadata, getting OCR markdown, listing saved schemas, and saving new ones." }
125
+ ],
126
+ related: [
127
+ { label: "talonic_extract", slug: "talonic-extract" },
128
+ { label: "Get an API Key", slug: "get-api-key" }
129
+ ],
130
+ faq: [
131
+ { question: "Why use Talonic MCP instead of OCR + LLM?", answer: "Raw OCR + LLM calls produce unreliable results \u2014 mangled tables, misread dates, drifting totals. Talonic returns schema-validated JSON with per-field confidence scores and stable IDs for follow-up calls." }
132
+ ],
133
+ mentions: ["OCR", "schema-validated", "confidence scores", "structured data"]
134
+ },
135
+ {
136
+ slug: "get-api-key",
137
+ parentSlug: "overview",
138
+ title: "Get an API Key",
139
+ seoTitle: "Get an API Key \u2014 Talonic MCP",
140
+ description: "Get a Talonic API key in 30 seconds. Each user runs against their own isolated workspace with private documents and schemas.",
141
+ content: [
142
+ { type: "paragraph", text: "Each user runs against their own isolated Talonic workspace. Your documents and schemas are private to you." },
143
+ { type: "list", ordered: true, items: [
144
+ "Sign up at [app.talonic.com](https://app.talonic.com). Free tier: 50 extractions per day, no credit card.",
145
+ "Settings \u2192 API Keys \u2192 Create New Key.",
146
+ "Copy the `tlnc_` value into your MCP client config (snippets below)."
147
+ ] }
148
+ ],
149
+ related: [
150
+ { label: "Claude Desktop", slug: "claude-desktop" },
151
+ { label: "Install Overview", slug: "install-overview" }
152
+ ],
153
+ faq: [
154
+ { question: "How do I get a Talonic API key for MCP?", answer: "Sign up at app.talonic.com (free, no credit card), go to Settings > API Keys > Create New Key, and copy the tlnc_ value into your MCP client config." }
155
+ ],
156
+ mentions: ["API key", "tlnc_", "free tier"]
157
+ }
158
+ ];
159
+
160
+ // src/content/sections/install.ts
161
+ var MCP_CONFIG_SNIPPET = `{
162
+ "mcpServers": {
163
+ "talonic": {
164
+ "command": "npx",
165
+ "args": ["-y", "@talonic/mcp@latest"],
166
+ "env": {
167
+ "TALONIC_API_KEY": "tlnc_your_key_here"
168
+ }
169
+ }
170
+ }
171
+ }`;
172
+ var sections2 = [
173
+ {
174
+ slug: "install-overview",
175
+ parentSlug: "install",
176
+ title: "Install Overview",
177
+ seoTitle: "Install Talonic MCP \u2014 Talonic Docs",
178
+ description: "Install the Talonic MCP server with a one-line npx invocation. No clone, no build. Works with every MCP client.",
179
+ content: [
180
+ { type: "paragraph", text: "The package is on npm. Every MCP client launches it the same way: a one-line `npx` invocation with your API key in the `env` block. No clone, no build." },
181
+ { type: "code", language: "jsonc", title: "Universal config shape", code: `{
182
+ "command": "npx",
183
+ "args": ["-y", "@talonic/mcp@latest"],
184
+ "env": { "TALONIC_API_KEY": "tlnc_..." }
185
+ }` },
186
+ { type: "paragraph", text: "The `-y` flag skips the npm install prompt. Pinning to `@latest` means new versions are picked up on the next client restart. To pin to a specific version, replace `@latest` with `@0.1.6`." }
187
+ ],
188
+ related: [
189
+ { label: "Claude Desktop", slug: "claude-desktop" },
190
+ { label: "Cursor", slug: "cursor" }
191
+ ],
192
+ faq: [
193
+ { question: "How do I install the Talonic MCP server?", answer: 'Add a one-line npx invocation to your MCP client config: command "npx", args ["-y", "@talonic/mcp@latest"], with your API key in the env block. No clone or build needed.' }
194
+ ],
195
+ mentions: ["npx", "npm", "MCP client", "install"]
196
+ },
197
+ {
198
+ slug: "claude-desktop",
199
+ parentSlug: "install",
200
+ title: "Claude Desktop",
201
+ seoTitle: "Claude Desktop Setup \u2014 Talonic MCP",
202
+ description: "Configure the Talonic MCP server in Claude Desktop on macOS and Windows.",
203
+ content: [
204
+ { type: "paragraph", text: "Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):" },
205
+ { type: "code", language: "json", code: MCP_CONFIG_SNIPPET },
206
+ { type: "paragraph", text: "Fully restart Claude Desktop (Cmd+Q on macOS, not just close the window). Talonic appears in the connected servers list with all seven tools." }
207
+ ],
208
+ related: [
209
+ { label: "Cursor", slug: "cursor" },
210
+ { label: "Tool Reference", slug: "talonic-extract" }
211
+ ],
212
+ faq: [
213
+ { question: "How do I add Talonic to Claude Desktop?", answer: "Edit claude_desktop_config.json, add the Talonic MCP server config with your API key, and fully restart Claude Desktop (Cmd+Q on macOS)." }
214
+ ],
215
+ mentions: ["Claude Desktop", "macOS", "Windows"]
216
+ },
217
+ {
218
+ slug: "cursor",
219
+ parentSlug: "install",
220
+ title: "Cursor",
221
+ seoTitle: "Cursor Setup \u2014 Talonic MCP",
222
+ description: "Configure the Talonic MCP server in Cursor IDE.",
223
+ content: [
224
+ { type: "paragraph", text: "Edit `~/.cursor/mcp.json` (or open Cursor settings \u2192 MCP \u2192 edit config):" },
225
+ { type: "code", language: "json", code: MCP_CONFIG_SNIPPET }
226
+ ],
227
+ related: [
228
+ { label: "Claude Desktop", slug: "claude-desktop" },
229
+ { label: "Cline", slug: "cline" }
230
+ ],
231
+ faq: [
232
+ { question: "How do I add Talonic MCP to Cursor?", answer: "Edit ~/.cursor/mcp.json and add the Talonic MCP server config with your API key." }
233
+ ],
234
+ mentions: ["Cursor", "IDE"]
235
+ },
236
+ {
237
+ slug: "cline",
238
+ parentSlug: "install",
239
+ title: "Cline",
240
+ seoTitle: "Cline Setup \u2014 Talonic MCP",
241
+ description: "Configure the Talonic MCP server in the Cline VS Code extension.",
242
+ content: [
243
+ { type: "paragraph", text: "Open the Cline panel \u2192 settings (gear icon) \u2192 MCP Servers \u2192 Edit. Add the standard config entry. Save and restart the panel." },
244
+ { type: "code", language: "json", code: MCP_CONFIG_SNIPPET }
245
+ ],
246
+ related: [
247
+ { label: "Continue", slug: "continue" },
248
+ { label: "Cursor", slug: "cursor" }
249
+ ],
250
+ faq: [
251
+ { question: "How do I add Talonic MCP to Cline?", answer: "Open the Cline panel settings, go to MCP Servers, click Edit, and add the Talonic config entry." }
252
+ ],
253
+ mentions: ["Cline", "VS Code"]
254
+ },
255
+ {
256
+ slug: "continue",
257
+ parentSlug: "install",
258
+ title: "Continue",
259
+ seoTitle: "Continue Setup \u2014 Talonic MCP",
260
+ description: "Configure the Talonic MCP server in Continue for VS Code and JetBrains.",
261
+ content: [
262
+ { type: "paragraph", text: "Edit `~/.continue/config.json`. Add to the `mcpServers` array:" },
263
+ { type: "code", language: "json", code: `{
264
+ "name": "talonic",
265
+ "command": "npx",
266
+ "args": ["-y", "@talonic/mcp@latest"],
267
+ "env": {
268
+ "TALONIC_API_KEY": "tlnc_your_key_here"
269
+ }
270
+ }` }
271
+ ],
272
+ related: [
273
+ { label: "Cowork", slug: "cowork" },
274
+ { label: "Cline", slug: "cline" }
275
+ ],
276
+ faq: [
277
+ { question: "How do I add Talonic MCP to Continue?", answer: "Edit ~/.continue/config.json and add a Talonic entry to the mcpServers array with your API key." }
278
+ ],
279
+ mentions: ["Continue", "VS Code", "JetBrains"]
280
+ },
281
+ {
282
+ slug: "cowork",
283
+ parentSlug: "install",
284
+ title: "Cowork",
285
+ seoTitle: "Cowork Setup \u2014 Talonic MCP",
286
+ description: "Configure the Talonic MCP server in Cowork.",
287
+ content: [
288
+ { type: "paragraph", text: "Open Cowork settings \u2192 MCP Servers \u2192 Add. Use the same shape as Claude Desktop above." },
289
+ { type: "code", language: "json", code: MCP_CONFIG_SNIPPET }
290
+ ],
291
+ related: [
292
+ { label: "Claude Desktop", slug: "claude-desktop" },
293
+ { label: "Tool Reference", slug: "talonic-extract" }
294
+ ],
295
+ faq: [
296
+ { question: "How do I add Talonic MCP to Cowork?", answer: "Open Cowork settings, go to MCP Servers, click Add, and paste the standard Talonic config with your API key." }
297
+ ],
298
+ mentions: ["Cowork"]
299
+ }
300
+ ];
301
+
302
+ // src/content/sections/tools.ts
303
+ var sections3 = [
304
+ {
305
+ slug: "talonic-extract",
306
+ parentSlug: "tools",
307
+ title: "talonic_extract",
308
+ seoTitle: "talonic_extract Tool \u2014 Talonic MCP",
309
+ description: "Extract structured, schema-validated data from a document. Returns clean JSON with per-field confidence scores.",
310
+ content: [
311
+ { type: "paragraph", text: "Extract structured, schema-validated data from a document." },
312
+ { type: "paragraph", text: "Inputs: one of `file_data` + `filename` (recommended for chat clients), `file_path`, `file_url`, or `document_id`, plus a `schema` (or `schema_id`). Returns clean JSON with per-field confidence scores." },
313
+ { type: "param-table", params: [
314
+ { name: "file_data", type: "string", description: "Base64-encoded file bytes. Recommended for chat clients (drag-and-drop)." },
315
+ { name: "filename", type: "string", description: "Original filename (used for MIME type inference when using `file_data`)." },
316
+ { name: "file_path", type: "string", description: "Local file path." },
317
+ { name: "file_url", type: "string", description: "Remote file URL." },
318
+ { name: "document_id", type: "string", description: "ID of a previously uploaded document." },
319
+ { name: "schema", type: "object", description: "Inline schema definition (JSON Schema)." },
320
+ { name: "schema_id", type: "string", description: "UUID of a saved schema." }
321
+ ] },
322
+ { type: "callout", variant: "warning", text: "Always provide a `schema` or `schema_id`. Auto-discovery extract (no schema) is not reliable in v0.1." }
323
+ ],
324
+ related: [
325
+ { label: "talonic_to_markdown", slug: "talonic-to-markdown" },
326
+ { label: "talonic_save_schema", slug: "talonic-save-schema" },
327
+ { label: "Drag & Drop Files", slug: "drag-and-drop" }
328
+ ],
329
+ faq: [
330
+ { question: "How does talonic_extract work?", answer: "Send a document (file_data, file_path, file_url, or document_id) with a schema or schema_id. The tool returns schema-validated JSON with per-field confidence scores." }
331
+ ],
332
+ mentions: ["extract", "schema", "confidence scores", "file_data"]
333
+ },
334
+ {
335
+ slug: "talonic-search",
336
+ parentSlug: "tools",
337
+ title: "talonic_search",
338
+ seoTitle: "talonic_search Tool \u2014 Talonic MCP",
339
+ description: "Omnisearch across documents, fields, sources, and schemas in the workspace. Supports conceptual and fuzzy queries.",
340
+ content: [
341
+ { type: "paragraph", text: "Omnisearch across documents, fields, sources, and schemas in the workspace. Use for conceptual or fuzzy queries." },
342
+ { type: "param-table", params: [
343
+ { name: "query", type: "string", required: true, description: "The search query. Supports fuzzy and conceptual matching." }
344
+ ] }
345
+ ],
346
+ related: [
347
+ { label: "talonic_filter", slug: "talonic-filter" }
348
+ ],
349
+ faq: [
350
+ { question: "What does talonic_search do?", answer: "It searches across documents, fields, sources, and schemas in the workspace using fuzzy and conceptual matching." }
351
+ ],
352
+ mentions: ["search", "omnisearch", "fuzzy"]
353
+ },
354
+ {
355
+ slug: "talonic-filter",
356
+ parentSlug: "tools",
357
+ title: "talonic_filter",
358
+ seoTitle: "talonic_filter Tool \u2014 Talonic MCP",
359
+ description: "Filter documents by extracted field values using composable conditions like eq, gt, between, and contains.",
360
+ content: [
361
+ { type: "paragraph", text: "Filter documents by extracted field values using composable conditions (`eq`, `gt`, `between`, `contains`, etc.)." },
362
+ { type: "paragraph", text: "Accepts canonical field names (e.g. `vendor.name`, `policy.0_coverage_type`) which the Talonic API resolves to IDs server-side, or UUIDs directly." },
363
+ { type: "callout", variant: "warning", text: "The `is_not_empty` operator currently underreports. Use specific operators (`eq`, `gt`, `contains`, etc.) against known values when possible." }
364
+ ],
365
+ related: [
366
+ { label: "talonic_search", slug: "talonic-search" },
367
+ { label: "Known Limitations", slug: "known-limitations" }
368
+ ],
369
+ faq: [
370
+ { question: "How do I filter documents by field value?", answer: "Use talonic_filter with canonical field names and operators like eq, gt, between, contains. The API resolves field names to IDs server-side." }
371
+ ],
372
+ mentions: ["filter", "canonical field names", "operators"]
373
+ },
374
+ {
375
+ slug: "talonic-get-document",
376
+ parentSlug: "tools",
377
+ title: "talonic_get_document",
378
+ seoTitle: "talonic_get_document Tool \u2014 Talonic MCP",
379
+ description: "Fetch full metadata for a single document by ID, including processing log and link URLs.",
380
+ content: [
381
+ { type: "paragraph", text: "Fetch full metadata for a single document by ID, including processing log and link URLs." },
382
+ { type: "param-table", params: [
383
+ { name: "document_id", type: "string", required: true, description: "The document UUID." }
384
+ ] }
385
+ ],
386
+ related: [
387
+ { label: "talonic_to_markdown", slug: "talonic-to-markdown" },
388
+ { label: "talonic_extract", slug: "talonic-extract" }
389
+ ],
390
+ faq: [
391
+ { question: "How do I get document metadata via MCP?", answer: "Call talonic_get_document with the document UUID to get full metadata including processing log and link URLs." }
392
+ ],
393
+ mentions: ["document", "metadata", "processing log"]
394
+ },
395
+ {
396
+ slug: "talonic-to-markdown",
397
+ parentSlug: "tools",
398
+ title: "talonic_to_markdown",
399
+ seoTitle: "talonic_to_markdown Tool \u2014 Talonic MCP",
400
+ description: "Get OCR-converted markdown for a document. Accepts document_id, file_data + filename, file_path, or file_url.",
401
+ content: [
402
+ { type: "paragraph", text: "Get OCR-converted markdown for a document. Accepts `document_id` (cheapest \u2014 no re-upload), `file_data` + `filename`, `file_path`, or `file_url`." }
403
+ ],
404
+ related: [
405
+ { label: "talonic_extract", slug: "talonic-extract" },
406
+ { label: "Drag & Drop Files", slug: "drag-and-drop" }
407
+ ],
408
+ faq: [
409
+ { question: "How do I get markdown from a document via MCP?", answer: "Call talonic_to_markdown with a document_id (cheapest), or provide the file directly via file_data, file_path, or file_url." }
410
+ ],
411
+ mentions: ["markdown", "OCR", "document_id"]
412
+ },
413
+ {
414
+ slug: "talonic-list-schemas",
415
+ parentSlug: "tools",
416
+ title: "talonic_list_schemas",
417
+ seoTitle: "talonic_list_schemas Tool \u2014 Talonic MCP",
418
+ description: "List all saved schemas with their definitions in the workspace.",
419
+ content: [
420
+ { type: "paragraph", text: "List all saved schemas with their definitions. Returns schema IDs (both UUID and `SCH-XXXXXXXX` short format), names, and field definitions." },
421
+ { type: "paragraph", text: "The `talonic://schemas` resource exposes the same data to clients that browse resources separately (Claude Desktop and Cowork render these in the UI)." }
422
+ ],
423
+ related: [
424
+ { label: "talonic_save_schema", slug: "talonic-save-schema" },
425
+ { label: "talonic_extract", slug: "talonic-extract" }
426
+ ],
427
+ faq: [
428
+ { question: "How do I list schemas via MCP?", answer: "Call talonic_list_schemas to get all saved schemas with their definitions. The talonic://schemas resource also exposes this data." }
429
+ ],
430
+ mentions: ["schemas", "list", "SCH-XXXXXXXX"]
431
+ },
432
+ {
433
+ slug: "talonic-save-schema",
434
+ parentSlug: "tools",
435
+ title: "talonic_save_schema",
436
+ seoTitle: "talonic_save_schema Tool \u2014 Talonic MCP",
437
+ description: "Save a schema definition to the workspace for reuse across extractions.",
438
+ content: [
439
+ { type: "paragraph", text: "Save a schema definition to the workspace for reuse. Returns a `schema_id` that can be passed to `talonic_extract`." },
440
+ { type: "callout", text: 'Prefer full JSON Schema format with `type: "object"` and `properties`. The flat key-type map format is not fully supported server-side yet.' }
441
+ ],
442
+ related: [
443
+ { label: "talonic_list_schemas", slug: "talonic-list-schemas" },
444
+ { label: "talonic_extract", slug: "talonic-extract" }
445
+ ],
446
+ faq: [
447
+ { question: "How do I save a schema via MCP?", answer: "Call talonic_save_schema with a name and JSON Schema definition. It returns a schema_id for reuse in talonic_extract calls." }
448
+ ],
449
+ mentions: ["save schema", "JSON Schema", "reuse"]
450
+ }
451
+ ];
452
+
453
+ // src/content/sections/features.ts
454
+ var sections4 = [
455
+ {
456
+ slug: "drag-and-drop",
457
+ parentSlug: "features",
458
+ title: "Drag & Drop Files",
459
+ seoTitle: "Drag & Drop File Support \u2014 Talonic MCP",
460
+ description: "Drop PDFs and documents directly into Claude Desktop, Cursor, or Cowork and extract data without file path configuration.",
461
+ content: [
462
+ { type: "paragraph", text: "When the user drag-drops a PDF (or any supported file) into a chat-style MCP host such as Claude Desktop, Cowork, or Cursor, the file lands in a host-owned sandbox directory the MCP server cannot read. The path the host hands the agent is meaningless to a separately-running `npx` MCP process." },
463
+ { type: "paragraph", text: "`@talonic/mcp@0.1.4` and later solve this by accepting **`file_data`** (base64-encoded file bytes) and **`filename`** on `talonic_extract` and `talonic_to_markdown`. The agent reads the file bytes from the conversation, base64-encodes them, and passes them through the MCP tool call. The MCP server decodes, infers MIME type from the filename, and uploads to the Talonic API." },
464
+ { type: "callout", text: "Tool descriptions advertise `file_data` as the recommended input for chat-style clients, so well-trained agents reach for it automatically. No client-side configuration required." }
465
+ ],
466
+ related: [
467
+ { label: "talonic_extract", slug: "talonic-extract" },
468
+ { label: "talonic_to_markdown", slug: "talonic-to-markdown" }
469
+ ],
470
+ faq: [
471
+ { question: "Can I drag and drop files into Claude Desktop with Talonic?", answer: "Yes. Since @talonic/mcp@0.1.4, talonic_extract and talonic_to_markdown accept base64 file data directly, so you can drop a PDF into Claude Desktop and extract data without file path setup." }
472
+ ],
473
+ mentions: ["drag-and-drop", "file_data", "base64", "Claude Desktop"]
474
+ },
475
+ {
476
+ slug: "how-it-works",
477
+ parentSlug: "features",
478
+ title: "How It Works",
479
+ seoTitle: "How Talonic MCP Works \u2014 Talonic Docs",
480
+ description: "Architecture of the Talonic MCP server: MCP protocol over stdio to the agent, HTTPS with Bearer auth to api.talonic.com.",
481
+ content: [
482
+ { type: "code", language: "text", title: "Architecture", code: `Agent (Claude Desktop / Cursor / Cline / etc.)
483
+ \u2193 MCP protocol over stdio
484
+ Talonic MCP server (this package)
485
+ \u2193 HTTPS, Bearer auth
486
+ api.talonic.com` },
487
+ { type: "paragraph", text: "Each tool call is one HTTP request to the Talonic API, using your API key. The server handles auth, retries on transient failures (429, 5xx), MIME-type detection on file uploads, multipart serialisation, and structured error formatting." }
488
+ ],
489
+ related: [
490
+ { label: "Environment Variables", slug: "env-variables" },
491
+ { label: "Node SDK", slug: "introduction" }
492
+ ],
493
+ faq: [
494
+ { question: "How does the Talonic MCP server work?", answer: "The MCP server communicates with AI agents over stdio using the MCP protocol. Each tool call translates to one HTTPS request to api.talonic.com with automatic auth, retries, and error formatting." }
495
+ ],
496
+ mentions: ["stdio", "HTTPS", "Bearer auth", "architecture"]
497
+ }
498
+ ];
499
+
500
+ // src/content/sections/configuration.ts
501
+ var sections5 = [
502
+ {
503
+ slug: "env-variables",
504
+ parentSlug: "configuration",
505
+ title: "Environment Variables",
506
+ seoTitle: "Configuration \u2014 Talonic MCP",
507
+ description: "Environment variables for configuring the Talonic MCP server: API key and optional base URL override.",
508
+ content: [
509
+ { type: "paragraph", text: "Set via the `env` block in your MCP client config:" },
510
+ { type: "param-table", params: [
511
+ { name: "TALONIC_API_KEY", type: "string", required: true, description: "Your Talonic API key. Starts with `tlnc_`." },
512
+ { name: "TALONIC_BASE_URL", type: "string", description: "Override the API base URL.", default: "https://api.talonic.com" }
513
+ ] }
514
+ ],
515
+ related: [
516
+ { label: "Install Overview", slug: "install-overview" },
517
+ { label: "Get an API Key", slug: "get-api-key" }
518
+ ],
519
+ faq: [
520
+ { question: "What environment variables does the Talonic MCP server need?", answer: "TALONIC_API_KEY (required, starts with tlnc_) and optionally TALONIC_BASE_URL to override the API endpoint." }
521
+ ],
522
+ mentions: ["TALONIC_API_KEY", "TALONIC_BASE_URL", "environment variables"]
523
+ }
524
+ ];
525
+
526
+ // src/content/sections/troubleshooting.ts
527
+ var sections6 = [
528
+ {
529
+ slug: "common-issues",
530
+ parentSlug: "troubleshooting",
531
+ title: "Common Issues",
532
+ seoTitle: "Troubleshooting \u2014 Talonic MCP",
533
+ description: "Solutions for common Talonic MCP server issues: missing API key, server not appearing, extract errors, and filter validation.",
534
+ content: [
535
+ { type: "heading", level: 3, id: "missing-api-key", text: "TALONIC_API_KEY environment variable is required" },
536
+ { type: "paragraph", text: "The `env` block in your MCP client config is missing or not being read. Double-check the JSON shape. After editing the config, fully restart the client (not just the conversation)." },
537
+ { type: "heading", level: 3, id: "server-not-found", text: "Talonic does not appear in connected servers" },
538
+ { type: "paragraph", text: 'Make sure the `command` is `npx` and the `args` are exactly `["-y", "@talonic/mcp@latest"]`. Sanity check: run `npx -y @talonic/mcp@latest --version` in any terminal \u2014 it should print `talonic 0.1.6` (or newer).' },
539
+ { type: "heading", level: 3, id: "extract-500", text: "talonic_extract returns 500 with auto-discovery" },
540
+ { type: "paragraph", text: "Known limitation. Always provide either an inline `schema` or a `schema_id`. The auto-discovery code path is being stabilised." },
541
+ { type: "heading", level: 3, id: "unsupported-file", text: "talonic_extract rejects with unsupported_file_type" },
542
+ { type: "paragraph", text: "The MIME type was inferred as `application/octet-stream`. The SDK infers from common file extensions; if your filename has an unusual extension, this may occur. A future tool version will expose explicit `content_type` passthrough." },
543
+ { type: "heading", level: 3, id: "filter-validation", text: 'talonic_filter VALIDATION_ERROR / "No field matches name"' },
544
+ { type: "paragraph", text: "The field name is not in the API's field registry. Field names must be canonical names (e.g. `vendor.name`, `policy.0_term_end`). Call `talonic_search` first; canonical names appear in `fields[].canonicalName`." },
545
+ { type: "heading", level: 3, id: "stale-descriptions", text: "Tool descriptions look wrong in my client" },
546
+ { type: "paragraph", text: "Some MCP clients cache tool descriptions. Restart the client after a server update." }
547
+ ],
548
+ related: [
549
+ { label: "Known Limitations", slug: "known-limitations" },
550
+ { label: "Upgrading", slug: "upgrading" }
551
+ ],
552
+ faq: [
553
+ { question: "Why does Talonic MCP not appear in Claude Desktop?", answer: 'Check that command is "npx" and args are ["-y", "@talonic/mcp@latest"]. Run npx -y @talonic/mcp@latest --version in a terminal to verify. Fully restart Claude Desktop (Cmd+Q).' }
554
+ ],
555
+ mentions: ["troubleshooting", "API key", "VALIDATION_ERROR"]
556
+ },
557
+ {
558
+ slug: "known-limitations",
559
+ parentSlug: "troubleshooting",
560
+ title: "Known Limitations",
561
+ seoTitle: "Known Limitations \u2014 Talonic MCP",
562
+ description: "Current limitations in the Talonic MCP server v0.1: auto-discovery, schema format, filter operators, and schema_id format.",
563
+ content: [
564
+ { type: "list", items: [
565
+ "**Auto-discovery extract (no schema) is not reliable on production.** Always pass a `schema` or `schema_id` to `talonic_extract`.",
566
+ "**Schema definition: prefer full JSON Schema for now.** The flat key-type map is documented as supported but the server-side normaliser does not translate it yet.",
567
+ "**`is_not_empty` filter currently underreports.** Use specific operators (`eq`, `gt`, `contains`, etc.) against known values instead.",
568
+ "**`schema_id` on `talonic_extract` requires the UUID form.** Other endpoints accept either UUID or `SCH-XXXXXXXX`, but `/v1/extract` currently only accepts UUIDs. Pass the UUID from `talonic_list_schemas`."
569
+ ] }
570
+ ],
571
+ related: [
572
+ { label: "Common Issues", slug: "common-issues" },
573
+ { label: "talonic_extract", slug: "talonic-extract" }
574
+ ],
575
+ faq: [
576
+ { question: "What are the known limitations of Talonic MCP?", answer: "Auto-discovery extract without a schema is unreliable, flat key-type schema maps are not yet translated, is_not_empty filter underreports, and schema_id on extract requires UUID format." }
577
+ ],
578
+ mentions: ["limitations", "auto-discovery", "is_not_empty", "schema_id"]
579
+ },
580
+ {
581
+ slug: "upgrading",
582
+ parentSlug: "troubleshooting",
583
+ title: "Upgrading",
584
+ seoTitle: "Upgrading from Older Versions \u2014 Talonic MCP",
585
+ description: "How to upgrade from older @talonic/mcp versions that had the silent-bin bug affecting MCP client launches.",
586
+ content: [
587
+ { type: "paragraph", text: "Versions before `0.1.3` had a bug where the bundled MCP server bin would exit silently when launched via the npm bin symlink, which is exactly how every MCP client invokes it. If you see no `talonic_*` tools despite correct config, you are hitting that bug." },
588
+ { type: "paragraph", text: "The fix: point your `args` at `@latest` (or `@0.1.3` explicitly) and fully restart the client:" },
589
+ { type: "code", language: "jsonc", code: '"args": ["-y", "@talonic/mcp@latest"]' }
590
+ ],
591
+ related: [
592
+ { label: "Install Overview", slug: "install-overview" },
593
+ { label: "Common Issues", slug: "common-issues" }
594
+ ],
595
+ faq: [
596
+ { question: "How do I upgrade the Talonic MCP server?", answer: 'Set args to ["-y", "@talonic/mcp@latest"] in your MCP client config and fully restart the client. Versions before 0.1.3 had a silent-bin bug that prevented the server from booting.' }
597
+ ],
598
+ mentions: ["upgrade", "silent-bin bug", "0.1.3"]
599
+ }
600
+ ];
601
+
602
+ // src/content/index.ts
603
+ var ALL_RAW = [
604
+ ...sections,
605
+ ...sections2,
606
+ ...sections3,
607
+ ...sections4,
608
+ ...sections5,
609
+ ...sections6
610
+ ];
611
+ function enrich(raw) {
612
+ return raw.map((r) => {
613
+ const { prev, next } = derivePrevNext(MCP_NAV_SECTIONS, r.slug);
614
+ return {
615
+ ...r,
616
+ breadcrumbs: deriveBreadcrumbs(MCP_NAV_SECTIONS, r.slug),
617
+ prev,
618
+ next
619
+ };
620
+ });
621
+ }
622
+ var _sections = null;
623
+ function getSectionsAll() {
624
+ if (!_sections) {
625
+ _sections = enrich(ALL_RAW);
626
+ }
627
+ return _sections;
628
+ }
629
+ function getMcpSection(slug) {
630
+ return getSectionsAll().find((s) => s.slug === slug) ?? null;
631
+ }
632
+ function getAllMcpSections() {
633
+ return getSectionsAll();
634
+ }
635
+
636
+ export { MCP_NAV_SECTIONS, getAllMcpSections, getMcpSection };
637
+ //# sourceMappingURL=content.js.map
638
+ //# sourceMappingURL=content.js.map