@atlascompiler/mcp 1.0.1 → 1.0.3

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.
@@ -887,10 +887,21 @@ function createRemoteScrapeExecutor(context) {
887
887
  await assertOkResponse(response);
888
888
  const data = await response.json();
889
889
  const root = data.data ?? data;
890
- 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;
891
892
  let markdown = root.markdown;
892
893
  let text = root.text ?? (requestedFormats.includes("text") ? markdown : void 0);
893
- 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;
894
905
  const maxChars = args.max_output_chars ?? 3e4;
895
906
  let truncated = false;
896
907
  if (markdown && markdown.length > maxChars) {
@@ -911,7 +922,7 @@ function createRemoteScrapeExecutor(context) {
911
922
  const wordCount = (markdown ?? text ?? "").split(/\s+/).filter(Boolean).length;
912
923
  const readTimeSeconds = Math.max(1, Math.ceil(wordCount / 4));
913
924
  return {
914
- url: root.url ?? args.url,
925
+ url: resolvedUrl,
915
926
  title,
916
927
  markdown,
917
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-RTUIB2VO.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-RTUIB2VO.js";
37
+ } from "./chunk-YURB56AN.js";
38
38
 
39
39
  // src/index.ts
40
40
  import {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@atlascompiler/mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
+ "mcpName": "com.atlas-compiler/atlas",
4
5
  "description": "Official Model Context Protocol (MCP) server for Atlas - Deterministic Zero-LLM Web Compiler and Scraper for AI Agents",
5
6
  "type": "module",
6
7
  "main": "./dist/index.js",