@atlascompiler/mcp 1.0.0

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,595 @@
1
+ import { ReadResourceResult, ResourceTemplate, McpServer } from '@modelcontextprotocol/server';
2
+ export { WebStandardStreamableHTTPServerTransport, createMcpHandler, validateHostHeader } from '@modelcontextprotocol/server';
3
+ import { z } from 'zod';
4
+
5
+ /**
6
+ * Atlas Model Context Protocol (MCP) Shared Types
7
+ */
8
+ interface AtlasClientContext {
9
+ apiKey?: string;
10
+ workspaceId?: string;
11
+ userId?: string;
12
+ baseUrl?: string;
13
+ fetch?: typeof fetch;
14
+ }
15
+ interface AtlasScrapeArgs {
16
+ url: string;
17
+ formats?: ('markdown' | 'links' | 'text')[];
18
+ max_output_chars?: number;
19
+ timeout_ms?: number;
20
+ }
21
+ interface AtlasScrapeResult {
22
+ url: string;
23
+ title: string;
24
+ markdown?: string;
25
+ text?: string;
26
+ links?: Array<{
27
+ url: string;
28
+ text: string;
29
+ }>;
30
+ stats: {
31
+ character_count: number;
32
+ word_count: number;
33
+ read_time_seconds: number;
34
+ };
35
+ truncated: boolean;
36
+ resource_uri?: string;
37
+ }
38
+ interface AtlasCompileArgs {
39
+ url: string;
40
+ format?: 'markdown' | 'semantic' | 'markdown+links';
41
+ max_output_chars?: number;
42
+ force_fresh?: boolean;
43
+ }
44
+ interface AtlasHeading {
45
+ level: number;
46
+ text: string;
47
+ id?: string;
48
+ resource_uri?: string;
49
+ }
50
+ interface AtlasCompileResult {
51
+ url: string;
52
+ compilation_id: string;
53
+ title: string;
54
+ markdown?: string;
55
+ ast?: Record<string, unknown>;
56
+ headings?: AtlasHeading[];
57
+ resources: {
58
+ compiled_artifact_uri: string;
59
+ ast_uri?: string;
60
+ };
61
+ stats: {
62
+ character_count: number;
63
+ tokens_saved_pct?: number;
64
+ compilation_time_ms: number;
65
+ };
66
+ truncated: boolean;
67
+ }
68
+ interface AtlasMapArgs {
69
+ url: string;
70
+ limit?: number;
71
+ include_subdomains?: boolean;
72
+ sitemap?: 'include' | 'skip' | 'only';
73
+ }
74
+ interface AtlasMapResult {
75
+ root_url: string;
76
+ urls: string[];
77
+ count: number;
78
+ sitemaps_found: string[];
79
+ duration_ms: number;
80
+ }
81
+ interface AtlasBatchCompileArgs {
82
+ urls: string[];
83
+ format?: 'markdown' | 'semantic' | 'markdown+links';
84
+ max_output_chars_per_page?: number;
85
+ }
86
+ interface AtlasBatchItemResult {
87
+ url: string;
88
+ status: 'success' | 'failed';
89
+ compilation_id?: string;
90
+ title?: string;
91
+ markdown?: string;
92
+ resource_uri?: string;
93
+ character_count?: number;
94
+ error?: string;
95
+ }
96
+ interface AtlasBatchCompileResult {
97
+ total_requested: number;
98
+ successful: number;
99
+ failed: number;
100
+ results: AtlasBatchItemResult[];
101
+ }
102
+ interface AtlasCrawlArgs {
103
+ url: string;
104
+ max_pages?: number;
105
+ max_depth?: number;
106
+ include_paths?: string[];
107
+ exclude_paths?: string[];
108
+ }
109
+ interface AtlasCrawlPageResult {
110
+ url: string;
111
+ title: string;
112
+ depth: number;
113
+ compilation_id?: string;
114
+ resource_uri: string;
115
+ character_count?: number;
116
+ }
117
+ interface AtlasCrawlResult {
118
+ crawl_id: string;
119
+ root_url: string;
120
+ pages_crawled: number;
121
+ pages_failed: number;
122
+ summary_markdown: string;
123
+ pages: AtlasCrawlPageResult[];
124
+ duration_ms: number;
125
+ }
126
+
127
+ /**
128
+ * Atlas MCP Error Codes and Standardized Error Formatting
129
+ */
130
+ type AtlasMcpErrorCode = 'ATLAS_INVALID_URL' | 'ATLAS_SSRF_BLOCKED' | 'ATLAS_FETCH_TIMEOUT' | 'ATLAS_FETCH_HTTP_ERROR' | 'ATLAS_RATE_LIMITED' | 'ATLAS_UNAUTHORIZED' | 'ATLAS_QUOTA_EXCEEDED' | 'ATLAS_JOB_FAILED' | 'ATLAS_RESOURCE_NOT_FOUND' | 'ATLAS_INTERNAL_ERROR';
131
+ interface AtlasMcpErrorPayload {
132
+ code: AtlasMcpErrorCode;
133
+ message: string;
134
+ retryable: boolean;
135
+ retryAfterSeconds?: number;
136
+ details?: unknown;
137
+ }
138
+ declare class AtlasMcpError extends Error {
139
+ readonly code: AtlasMcpErrorCode;
140
+ readonly retryable: boolean;
141
+ readonly retryAfterSeconds?: number;
142
+ readonly details?: unknown;
143
+ constructor(payload: AtlasMcpErrorPayload);
144
+ toToolErrorResult(): {
145
+ isError: boolean;
146
+ content: {
147
+ type: "text";
148
+ text: string;
149
+ }[];
150
+ structuredContent: {
151
+ error: {
152
+ code: AtlasMcpErrorCode;
153
+ message: string;
154
+ retryable: boolean;
155
+ retry_after_seconds: number | undefined;
156
+ details: unknown;
157
+ };
158
+ };
159
+ };
160
+ }
161
+ declare function wrapFetchError(err: unknown): AtlasMcpError;
162
+ declare function assertOkResponse(response: Response): Promise<void>;
163
+ declare function formatErrorToToolResult(err: unknown): {
164
+ isError: boolean;
165
+ content: {
166
+ type: "text";
167
+ text: string;
168
+ }[];
169
+ structuredContent: {
170
+ error: {
171
+ code: AtlasMcpErrorCode;
172
+ message: string;
173
+ retryable: boolean;
174
+ retry_after_seconds: number | undefined;
175
+ details: unknown;
176
+ };
177
+ };
178
+ } | {
179
+ isError: boolean;
180
+ content: {
181
+ type: "text";
182
+ text: string;
183
+ }[];
184
+ structuredContent: {
185
+ error: {
186
+ code: string;
187
+ message: string;
188
+ retryable: boolean;
189
+ };
190
+ };
191
+ };
192
+
193
+ declare const compilationResourceTemplate: ResourceTemplate;
194
+ declare const sectionResourceTemplate: ResourceTemplate;
195
+ declare const crawlResourceTemplate: ResourceTemplate;
196
+ declare const astResourceTemplate: ResourceTemplate;
197
+ type ResourceContentItem = {
198
+ uri: string;
199
+ text: string;
200
+ mimeType?: string;
201
+ } | {
202
+ uri: string;
203
+ blob: string;
204
+ mimeType?: string;
205
+ };
206
+ type ResourceReadResult = ReadResourceResult;
207
+ type ResourceReader = (uri: string, variables: Record<string, string>) => Promise<ResourceReadResult>;
208
+ declare function createRemoteResourceReader(context: AtlasClientContext): ResourceReader;
209
+
210
+ declare const batchInputSchema: {
211
+ urls: z.ZodArray<z.ZodString>;
212
+ format: z.ZodDefault<z.ZodEnum<{
213
+ markdown: "markdown";
214
+ semantic: "semantic";
215
+ "markdown+links": "markdown+links";
216
+ }>>;
217
+ max_output_chars_per_page: z.ZodDefault<z.ZodNumber>;
218
+ };
219
+ declare const batchOutputSchema: {
220
+ total_requested: z.ZodNumber;
221
+ successful: z.ZodNumber;
222
+ failed: z.ZodNumber;
223
+ results: z.ZodArray<z.ZodObject<{
224
+ url: z.ZodString;
225
+ status: z.ZodEnum<{
226
+ success: "success";
227
+ failed: "failed";
228
+ }>;
229
+ compilation_id: z.ZodOptional<z.ZodString>;
230
+ title: z.ZodOptional<z.ZodString>;
231
+ markdown: z.ZodOptional<z.ZodString>;
232
+ resource_uri: z.ZodOptional<z.ZodString>;
233
+ character_count: z.ZodOptional<z.ZodNumber>;
234
+ error: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strip>>;
236
+ };
237
+ declare const batchToolDefinition: {
238
+ name: string;
239
+ description: string;
240
+ inputSchema: {
241
+ urls: z.ZodArray<z.ZodString>;
242
+ format: z.ZodDefault<z.ZodEnum<{
243
+ markdown: "markdown";
244
+ semantic: "semantic";
245
+ "markdown+links": "markdown+links";
246
+ }>>;
247
+ max_output_chars_per_page: z.ZodDefault<z.ZodNumber>;
248
+ };
249
+ outputSchema: {
250
+ total_requested: z.ZodNumber;
251
+ successful: z.ZodNumber;
252
+ failed: z.ZodNumber;
253
+ results: z.ZodArray<z.ZodObject<{
254
+ url: z.ZodString;
255
+ status: z.ZodEnum<{
256
+ success: "success";
257
+ failed: "failed";
258
+ }>;
259
+ compilation_id: z.ZodOptional<z.ZodString>;
260
+ title: z.ZodOptional<z.ZodString>;
261
+ markdown: z.ZodOptional<z.ZodString>;
262
+ resource_uri: z.ZodOptional<z.ZodString>;
263
+ character_count: z.ZodOptional<z.ZodNumber>;
264
+ error: z.ZodOptional<z.ZodString>;
265
+ }, z.core.$strip>>;
266
+ };
267
+ annotations: {
268
+ readOnlyHint: boolean;
269
+ destructiveHint: boolean;
270
+ openWorldHint: boolean;
271
+ idempotentHint: boolean;
272
+ };
273
+ cacheHint: {
274
+ ttlMs: number;
275
+ cacheScope: "private";
276
+ };
277
+ };
278
+ type BatchExecutor = (args: AtlasBatchCompileArgs) => Promise<AtlasBatchCompileResult>;
279
+ declare function createRemoteBatchExecutor(context: AtlasClientContext): BatchExecutor;
280
+ declare function formatBatchResult(res: AtlasBatchCompileResult): {
281
+ content: {
282
+ type: "text";
283
+ text: string;
284
+ }[];
285
+ structuredContent: AtlasBatchCompileResult;
286
+ };
287
+
288
+ declare const compileInputSchema: {
289
+ url: z.ZodString;
290
+ format: z.ZodDefault<z.ZodEnum<{
291
+ markdown: "markdown";
292
+ semantic: "semantic";
293
+ "markdown+links": "markdown+links";
294
+ }>>;
295
+ max_output_chars: z.ZodDefault<z.ZodNumber>;
296
+ force_fresh: z.ZodDefault<z.ZodBoolean>;
297
+ };
298
+ declare const compileOutputSchema: {
299
+ url: z.ZodString;
300
+ compilation_id: z.ZodString;
301
+ title: z.ZodString;
302
+ markdown: z.ZodOptional<z.ZodString>;
303
+ ast: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
304
+ headings: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
+ level: z.ZodNumber;
306
+ text: z.ZodString;
307
+ id: z.ZodOptional<z.ZodString>;
308
+ resource_uri: z.ZodOptional<z.ZodString>;
309
+ }, z.core.$strip>>>;
310
+ resources: z.ZodObject<{
311
+ compiled_artifact_uri: z.ZodString;
312
+ ast_uri: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strip>;
314
+ stats: z.ZodObject<{
315
+ character_count: z.ZodNumber;
316
+ tokens_saved_pct: z.ZodOptional<z.ZodNumber>;
317
+ compilation_time_ms: z.ZodNumber;
318
+ }, z.core.$strip>;
319
+ truncated: z.ZodBoolean;
320
+ };
321
+ declare const compileToolDefinition: {
322
+ name: string;
323
+ description: string;
324
+ inputSchema: {
325
+ url: z.ZodString;
326
+ format: z.ZodDefault<z.ZodEnum<{
327
+ markdown: "markdown";
328
+ semantic: "semantic";
329
+ "markdown+links": "markdown+links";
330
+ }>>;
331
+ max_output_chars: z.ZodDefault<z.ZodNumber>;
332
+ force_fresh: z.ZodDefault<z.ZodBoolean>;
333
+ };
334
+ outputSchema: {
335
+ url: z.ZodString;
336
+ compilation_id: z.ZodString;
337
+ title: z.ZodString;
338
+ markdown: z.ZodOptional<z.ZodString>;
339
+ ast: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
340
+ headings: z.ZodOptional<z.ZodArray<z.ZodObject<{
341
+ level: z.ZodNumber;
342
+ text: z.ZodString;
343
+ id: z.ZodOptional<z.ZodString>;
344
+ resource_uri: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strip>>>;
346
+ resources: z.ZodObject<{
347
+ compiled_artifact_uri: z.ZodString;
348
+ ast_uri: z.ZodOptional<z.ZodString>;
349
+ }, z.core.$strip>;
350
+ stats: z.ZodObject<{
351
+ character_count: z.ZodNumber;
352
+ tokens_saved_pct: z.ZodOptional<z.ZodNumber>;
353
+ compilation_time_ms: z.ZodNumber;
354
+ }, z.core.$strip>;
355
+ truncated: z.ZodBoolean;
356
+ };
357
+ annotations: {
358
+ readOnlyHint: boolean;
359
+ destructiveHint: boolean;
360
+ openWorldHint: boolean;
361
+ idempotentHint: boolean;
362
+ };
363
+ cacheHint: {
364
+ ttlMs: number;
365
+ cacheScope: "private";
366
+ };
367
+ };
368
+ type CompileExecutor = (args: AtlasCompileArgs) => Promise<AtlasCompileResult>;
369
+ declare function createRemoteCompileExecutor(context: AtlasClientContext): CompileExecutor;
370
+ declare function formatCompileResult(res: AtlasCompileResult): {
371
+ content: {
372
+ type: "text";
373
+ text: string;
374
+ }[];
375
+ structuredContent: AtlasCompileResult;
376
+ };
377
+
378
+ declare const crawlInputSchema: {
379
+ url: z.ZodString;
380
+ max_pages: z.ZodDefault<z.ZodNumber>;
381
+ max_depth: z.ZodDefault<z.ZodNumber>;
382
+ include_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
383
+ exclude_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
384
+ };
385
+ declare const crawlOutputSchema: {
386
+ crawl_id: z.ZodString;
387
+ root_url: z.ZodString;
388
+ pages_crawled: z.ZodNumber;
389
+ pages_failed: z.ZodNumber;
390
+ summary_markdown: z.ZodString;
391
+ pages: z.ZodArray<z.ZodObject<{
392
+ url: z.ZodString;
393
+ title: z.ZodString;
394
+ depth: z.ZodNumber;
395
+ compilation_id: z.ZodOptional<z.ZodString>;
396
+ resource_uri: z.ZodString;
397
+ character_count: z.ZodOptional<z.ZodNumber>;
398
+ }, z.core.$strip>>;
399
+ duration_ms: z.ZodNumber;
400
+ };
401
+ declare const crawlToolDefinition: {
402
+ name: string;
403
+ description: string;
404
+ inputSchema: {
405
+ url: z.ZodString;
406
+ max_pages: z.ZodDefault<z.ZodNumber>;
407
+ max_depth: z.ZodDefault<z.ZodNumber>;
408
+ include_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
409
+ exclude_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
410
+ };
411
+ outputSchema: {
412
+ crawl_id: z.ZodString;
413
+ root_url: z.ZodString;
414
+ pages_crawled: z.ZodNumber;
415
+ pages_failed: z.ZodNumber;
416
+ summary_markdown: z.ZodString;
417
+ pages: z.ZodArray<z.ZodObject<{
418
+ url: z.ZodString;
419
+ title: z.ZodString;
420
+ depth: z.ZodNumber;
421
+ compilation_id: z.ZodOptional<z.ZodString>;
422
+ resource_uri: z.ZodString;
423
+ character_count: z.ZodOptional<z.ZodNumber>;
424
+ }, z.core.$strip>>;
425
+ duration_ms: z.ZodNumber;
426
+ };
427
+ annotations: {
428
+ readOnlyHint: boolean;
429
+ destructiveHint: boolean;
430
+ openWorldHint: boolean;
431
+ idempotentHint: boolean;
432
+ };
433
+ cacheHint: {
434
+ ttlMs: number;
435
+ cacheScope: "private";
436
+ };
437
+ };
438
+ type CrawlExecutor = (args: AtlasCrawlArgs) => Promise<AtlasCrawlResult>;
439
+ declare function createRemoteCrawlExecutor(context: AtlasClientContext): CrawlExecutor;
440
+ declare function formatCrawlResult(res: AtlasCrawlResult): {
441
+ content: {
442
+ type: "text";
443
+ text: string;
444
+ }[];
445
+ structuredContent: AtlasCrawlResult;
446
+ };
447
+
448
+ declare const mapInputSchema: {
449
+ url: z.ZodString;
450
+ limit: z.ZodDefault<z.ZodNumber>;
451
+ include_subdomains: z.ZodDefault<z.ZodBoolean>;
452
+ sitemap: z.ZodDefault<z.ZodEnum<{
453
+ skip: "skip";
454
+ include: "include";
455
+ only: "only";
456
+ }>>;
457
+ };
458
+ declare const mapOutputSchema: {
459
+ root_url: z.ZodString;
460
+ urls: z.ZodArray<z.ZodString>;
461
+ count: z.ZodNumber;
462
+ sitemaps_found: z.ZodArray<z.ZodString>;
463
+ duration_ms: z.ZodNumber;
464
+ };
465
+ declare const mapToolDefinition: {
466
+ name: string;
467
+ description: string;
468
+ inputSchema: {
469
+ url: z.ZodString;
470
+ limit: z.ZodDefault<z.ZodNumber>;
471
+ include_subdomains: z.ZodDefault<z.ZodBoolean>;
472
+ sitemap: z.ZodDefault<z.ZodEnum<{
473
+ skip: "skip";
474
+ include: "include";
475
+ only: "only";
476
+ }>>;
477
+ };
478
+ outputSchema: {
479
+ root_url: z.ZodString;
480
+ urls: z.ZodArray<z.ZodString>;
481
+ count: z.ZodNumber;
482
+ sitemaps_found: z.ZodArray<z.ZodString>;
483
+ duration_ms: z.ZodNumber;
484
+ };
485
+ annotations: {
486
+ readOnlyHint: boolean;
487
+ destructiveHint: boolean;
488
+ openWorldHint: boolean;
489
+ idempotentHint: boolean;
490
+ };
491
+ cacheHint: {
492
+ ttlMs: number;
493
+ cacheScope: "private";
494
+ };
495
+ };
496
+ type MapExecutor = (args: AtlasMapArgs) => Promise<AtlasMapResult>;
497
+ declare function createRemoteMapExecutor(context: AtlasClientContext): MapExecutor;
498
+ declare function formatMapResult(res: AtlasMapResult): {
499
+ content: {
500
+ type: "text";
501
+ text: string;
502
+ }[];
503
+ structuredContent: AtlasMapResult;
504
+ };
505
+
506
+ declare const scrapeInputSchema: {
507
+ url: z.ZodString;
508
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<{
509
+ text: "text";
510
+ markdown: "markdown";
511
+ links: "links";
512
+ }>>>;
513
+ max_output_chars: z.ZodDefault<z.ZodNumber>;
514
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
515
+ };
516
+ declare const scrapeOutputSchema: {
517
+ url: z.ZodString;
518
+ title: z.ZodString;
519
+ markdown: z.ZodOptional<z.ZodString>;
520
+ text: z.ZodOptional<z.ZodString>;
521
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
522
+ url: z.ZodString;
523
+ text: z.ZodString;
524
+ }, z.core.$strip>>>;
525
+ stats: z.ZodObject<{
526
+ character_count: z.ZodNumber;
527
+ word_count: z.ZodNumber;
528
+ read_time_seconds: z.ZodNumber;
529
+ }, z.core.$strip>;
530
+ truncated: z.ZodBoolean;
531
+ resource_uri: z.ZodOptional<z.ZodString>;
532
+ };
533
+ declare const scrapeToolDefinition: {
534
+ name: string;
535
+ description: string;
536
+ inputSchema: {
537
+ url: z.ZodString;
538
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<{
539
+ text: "text";
540
+ markdown: "markdown";
541
+ links: "links";
542
+ }>>>;
543
+ max_output_chars: z.ZodDefault<z.ZodNumber>;
544
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
545
+ };
546
+ outputSchema: {
547
+ url: z.ZodString;
548
+ title: z.ZodString;
549
+ markdown: z.ZodOptional<z.ZodString>;
550
+ text: z.ZodOptional<z.ZodString>;
551
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ url: z.ZodString;
553
+ text: z.ZodString;
554
+ }, z.core.$strip>>>;
555
+ stats: z.ZodObject<{
556
+ character_count: z.ZodNumber;
557
+ word_count: z.ZodNumber;
558
+ read_time_seconds: z.ZodNumber;
559
+ }, z.core.$strip>;
560
+ truncated: z.ZodBoolean;
561
+ resource_uri: z.ZodOptional<z.ZodString>;
562
+ };
563
+ annotations: {
564
+ readOnlyHint: boolean;
565
+ destructiveHint: boolean;
566
+ openWorldHint: boolean;
567
+ idempotentHint: boolean;
568
+ };
569
+ cacheHint: {
570
+ ttlMs: number;
571
+ cacheScope: "private";
572
+ };
573
+ };
574
+ type ScrapeExecutor = (args: AtlasScrapeArgs) => Promise<AtlasScrapeResult>;
575
+ declare function createRemoteScrapeExecutor(context: AtlasClientContext): ScrapeExecutor;
576
+ declare function formatScrapeResult(res: AtlasScrapeResult): {
577
+ content: {
578
+ type: "text";
579
+ text: string;
580
+ }[];
581
+ structuredContent: AtlasScrapeResult;
582
+ };
583
+
584
+ interface CreateAtlasMcpServerOptions {
585
+ context?: AtlasClientContext;
586
+ scrapeExecutor?: ScrapeExecutor;
587
+ compileExecutor?: CompileExecutor;
588
+ mapExecutor?: MapExecutor;
589
+ batchExecutor?: BatchExecutor;
590
+ crawlExecutor?: CrawlExecutor;
591
+ resourceReader?: ResourceReader;
592
+ }
593
+ declare function createAtlasMcpServer(options?: CreateAtlasMcpServerOptions): McpServer;
594
+
595
+ export { type AtlasBatchCompileArgs, type AtlasBatchCompileResult, type AtlasBatchItemResult, type AtlasClientContext, type AtlasCompileArgs, type AtlasCompileResult, type AtlasCrawlArgs, type AtlasCrawlPageResult, type AtlasCrawlResult, type AtlasHeading, type AtlasMapArgs, type AtlasMapResult, AtlasMcpError, type AtlasMcpErrorCode, type AtlasMcpErrorPayload, type AtlasScrapeArgs, type AtlasScrapeResult, type BatchExecutor, type CompileExecutor, type CrawlExecutor, type CreateAtlasMcpServerOptions, type MapExecutor, type ResourceContentItem, type ResourceReadResult, type ResourceReader, type ScrapeExecutor, assertOkResponse, astResourceTemplate, batchInputSchema, batchOutputSchema, batchToolDefinition, compilationResourceTemplate, compileInputSchema, compileOutputSchema, compileToolDefinition, crawlInputSchema, crawlOutputSchema, crawlResourceTemplate, crawlToolDefinition, createAtlasMcpServer, createRemoteBatchExecutor, createRemoteCompileExecutor, createRemoteCrawlExecutor, createRemoteMapExecutor, createRemoteResourceReader, createRemoteScrapeExecutor, formatBatchResult, formatCompileResult, formatCrawlResult, formatErrorToToolResult, formatMapResult, formatScrapeResult, mapInputSchema, mapOutputSchema, mapToolDefinition, scrapeInputSchema, scrapeOutputSchema, scrapeToolDefinition, sectionResourceTemplate, wrapFetchError };
package/dist/index.js ADDED
@@ -0,0 +1,84 @@
1
+ import {
2
+ AtlasMcpError,
3
+ assertOkResponse,
4
+ astResourceTemplate,
5
+ batchInputSchema,
6
+ batchOutputSchema,
7
+ batchToolDefinition,
8
+ compilationResourceTemplate,
9
+ compileInputSchema,
10
+ compileOutputSchema,
11
+ compileToolDefinition,
12
+ crawlInputSchema,
13
+ crawlOutputSchema,
14
+ crawlResourceTemplate,
15
+ crawlToolDefinition,
16
+ createAtlasMcpServer,
17
+ createRemoteBatchExecutor,
18
+ createRemoteCompileExecutor,
19
+ createRemoteCrawlExecutor,
20
+ createRemoteMapExecutor,
21
+ createRemoteResourceReader,
22
+ createRemoteScrapeExecutor,
23
+ formatBatchResult,
24
+ formatCompileResult,
25
+ formatCrawlResult,
26
+ formatErrorToToolResult,
27
+ formatMapResult,
28
+ formatScrapeResult,
29
+ mapInputSchema,
30
+ mapOutputSchema,
31
+ mapToolDefinition,
32
+ scrapeInputSchema,
33
+ scrapeOutputSchema,
34
+ scrapeToolDefinition,
35
+ sectionResourceTemplate,
36
+ wrapFetchError
37
+ } from "./chunk-QNNAZCBS.js";
38
+
39
+ // src/index.ts
40
+ import {
41
+ createMcpHandler,
42
+ validateHostHeader,
43
+ WebStandardStreamableHTTPServerTransport
44
+ } from "@modelcontextprotocol/server";
45
+ export {
46
+ AtlasMcpError,
47
+ WebStandardStreamableHTTPServerTransport,
48
+ assertOkResponse,
49
+ astResourceTemplate,
50
+ batchInputSchema,
51
+ batchOutputSchema,
52
+ batchToolDefinition,
53
+ compilationResourceTemplate,
54
+ compileInputSchema,
55
+ compileOutputSchema,
56
+ compileToolDefinition,
57
+ crawlInputSchema,
58
+ crawlOutputSchema,
59
+ crawlResourceTemplate,
60
+ crawlToolDefinition,
61
+ createAtlasMcpServer,
62
+ createMcpHandler,
63
+ createRemoteBatchExecutor,
64
+ createRemoteCompileExecutor,
65
+ createRemoteCrawlExecutor,
66
+ createRemoteMapExecutor,
67
+ createRemoteResourceReader,
68
+ createRemoteScrapeExecutor,
69
+ formatBatchResult,
70
+ formatCompileResult,
71
+ formatCrawlResult,
72
+ formatErrorToToolResult,
73
+ formatMapResult,
74
+ formatScrapeResult,
75
+ mapInputSchema,
76
+ mapOutputSchema,
77
+ mapToolDefinition,
78
+ scrapeInputSchema,
79
+ scrapeOutputSchema,
80
+ scrapeToolDefinition,
81
+ sectionResourceTemplate,
82
+ validateHostHeader,
83
+ wrapFetchError
84
+ };