@atlascompiler/mcp 1.0.0 → 1.0.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.
@@ -313,7 +313,8 @@ function createRemoteCompileExecutor(context) {
313
313
  const fetchFn = context.fetch ?? fetch;
314
314
  const headers = {
315
315
  "Content-Type": "application/json",
316
- Accept: "application/json"
316
+ Accept: "application/json",
317
+ "Idempotency-Key": crypto.randomUUID()
317
318
  };
318
319
  if (context.apiKey) {
319
320
  headers.Authorization = `Bearer ${context.apiKey}`;
@@ -886,10 +887,21 @@ function createRemoteScrapeExecutor(context) {
886
887
  await assertOkResponse(response);
887
888
  const data = await response.json();
888
889
  const root = data.data ?? data;
889
- const title = root.title ?? args.url;
890
+ const title = data.metadata?.title ?? root.title ?? args.url;
891
+ const resolvedUrl = data.metadata?.canonicalUrl ?? root.url ?? args.url;
890
892
  let markdown = root.markdown;
891
893
  let text = root.text ?? (requestedFormats.includes("text") ? markdown : void 0);
892
- const links = root.links;
894
+ const rawLinks = root.links ?? data.links;
895
+ const links = Array.isArray(rawLinks) ? rawLinks.map((item) => {
896
+ if (typeof item === "string") {
897
+ return { url: item, text: item };
898
+ }
899
+ if (item && typeof item === "object" && "url" in item) {
900
+ const obj = item;
901
+ return { url: obj.url, text: obj.text || obj.url };
902
+ }
903
+ return { url: String(item), text: String(item) };
904
+ }) : void 0;
893
905
  const maxChars = args.max_output_chars ?? 3e4;
894
906
  let truncated = false;
895
907
  if (markdown && markdown.length > maxChars) {
@@ -910,7 +922,7 @@ function createRemoteScrapeExecutor(context) {
910
922
  const wordCount = (markdown ?? text ?? "").split(/\s+/).filter(Boolean).length;
911
923
  const readTimeSeconds = Math.max(1, Math.ceil(wordCount / 4));
912
924
  return {
913
- url: root.url ?? args.url,
925
+ url: resolvedUrl,
914
926
  title,
915
927
  markdown,
916
928
  text,
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createAtlasMcpServer
4
- } from "./chunk-QNNAZCBS.js";
4
+ } from "./chunk-YURB56AN.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  scrapeToolDefinition,
35
35
  sectionResourceTemplate,
36
36
  wrapFetchError
37
- } from "./chunk-QNNAZCBS.js";
37
+ } from "./chunk-YURB56AN.js";
38
38
 
39
39
  // src/index.ts
40
40
  import {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlascompiler/mcp",
3
- "version": "1.0.0",
4
- "description": "Official Model Context Protocol (MCP) server for Atlas - Deterministic Zero-LLM Web Compiler",
3
+ "version": "1.0.2",
4
+ "description": "Official Model Context Protocol (MCP) server for Atlas - Deterministic Zero-LLM Web Compiler and Scraper for AI Agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -10,7 +10,10 @@
10
10
  "atlas": "./dist/cli.js",
11
11
  "mcp": "./dist/cli.js"
12
12
  },
13
- "files": ["dist", "skills"],
13
+ "files": [
14
+ "dist",
15
+ "skills"
16
+ ],
14
17
  "scripts": {
15
18
  "build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
16
19
  "check": "pnpm build && pnpm lint && pnpm typecheck && pnpm test",
@@ -31,7 +34,27 @@
31
34
  "typescript": "5.9.3",
32
35
  "vitest": "2.1.9"
33
36
  },
34
- "keywords": ["atlas", "mcp", "model-context-protocol", "llm", "web-compiler", "markdown"],
37
+ "keywords": [
38
+ "atlas",
39
+ "mcp",
40
+ "model-context-protocol",
41
+ "web-scraping",
42
+ "web-scraper",
43
+ "web-crawler",
44
+ "web-crawling",
45
+ "content-extraction",
46
+ "html-to-markdown",
47
+ "markdown",
48
+ "web-compiler",
49
+ "ai-agent",
50
+ "ai-agents",
51
+ "agentic-ai",
52
+ "llm",
53
+ "rag",
54
+ "claude",
55
+ "cursor",
56
+ "windsurf"
57
+ ],
35
58
  "license": "MIT",
36
59
  "publishConfig": {
37
60
  "access": "public"