@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.
- package/LICENSE +21 -0
- package/README.md +365 -0
- package/dist/chunk-QNNAZCBS.js +1164 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +612 -0
- package/dist/index.d.ts +595 -0
- package/dist/index.js +84 -0
- package/package.json +48 -0
- package/skills/atlas/SKILL.md +193 -0
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlascompiler/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Official Model Context Protocol (MCP) server for Atlas - Deterministic Zero-LLM Web Compiler",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"atlas-mcp": "./dist/cli.js",
|
|
10
|
+
"atlas": "./dist/cli.js",
|
|
11
|
+
"mcp": "./dist/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"files": ["dist", "skills"],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
|
|
16
|
+
"check": "pnpm build && pnpm lint && pnpm typecheck && pnpm test",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"lint": "biome check .",
|
|
19
|
+
"typecheck": "tsc --noEmit",
|
|
20
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@modelcontextprotocol/core": "2.0.0",
|
|
24
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
25
|
+
"zod": "^3.24.0 || ^4.0.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@biomejs/biome": "1.9.4",
|
|
29
|
+
"@types/node": "26.1.1",
|
|
30
|
+
"tsup": "8.5.1",
|
|
31
|
+
"typescript": "5.9.3",
|
|
32
|
+
"vitest": "2.1.9"
|
|
33
|
+
},
|
|
34
|
+
"keywords": ["atlas", "mcp", "model-context-protocol", "llm", "web-compiler", "markdown"],
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/Atlas-Compiler/Atlas.git",
|
|
42
|
+
"directory": "mcp"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://docs.atlas-compiler.com/mcp",
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atlas
|
|
3
|
+
description: "Official Atlas Agent Skill for deterministic zero-LLM web compilation, visual markdown extraction, DOM scraping, site mapping, and batch processing."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Works with any MCP-enabled AI client (Claude Desktop, Cursor, VS Code, Goose, Windsurf, Antigravity).
|
|
7
|
+
metadata:
|
|
8
|
+
author: Atlas Compiler Team
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Atlas Agent Skill
|
|
13
|
+
|
|
14
|
+
Atlas is a deterministic, zero-LLM web compiler and extraction engine that transforms modern web pages, SPAs, dynamic tables, and complex documentation sites into clean, token-efficient, visually accurate Markdown and structured ASTs.
|
|
15
|
+
|
|
16
|
+
This skill equips AI agents to effectively select and execute the right Atlas tool for any web retrieval, research, compilation, or mapping task.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Quickstart & Authentication
|
|
21
|
+
|
|
22
|
+
Atlas connects to your environment through the `@atlascompiler/mcp` server.
|
|
23
|
+
|
|
24
|
+
### Initial Setup (One-Time)
|
|
25
|
+
Run the interactive setup wizard in your terminal:
|
|
26
|
+
```bash
|
|
27
|
+
npx -y @atlascompiler/mcp init
|
|
28
|
+
```
|
|
29
|
+
The wizard:
|
|
30
|
+
1. Validates your Atlas API key (`atlas_...`).
|
|
31
|
+
2. Securely stores it in `~/.atlas/credentials.json` (`chmod 0600`).
|
|
32
|
+
3. Automatically configures your editor (`claude_desktop_config.json`, Cursor `mcp.json`).
|
|
33
|
+
|
|
34
|
+
### Headless & CI/CD Environments
|
|
35
|
+
In containerized, CI/CD, or ephemeral environments, supply credentials via environment variable:
|
|
36
|
+
```bash
|
|
37
|
+
export ATLAS_API_KEY="atlas_your_api_key_here"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> [!IMPORTANT]
|
|
41
|
+
> Never hardcode API keys in project configuration files, commits, or prompts. Atlas resolves credentials automatically from `ATLAS_API_KEY` or `~/.atlas/credentials.json`.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 2. Tool Selection Matrix
|
|
46
|
+
|
|
47
|
+
Use this decision matrix to pick the most efficient tool:
|
|
48
|
+
|
|
49
|
+
| Goal / Use Case | Recommended Tool | Why |
|
|
50
|
+
| :--- | :--- | :--- |
|
|
51
|
+
| Read single article, blog post, or standard page | `atlas_scrape` | Fast-path extraction with minimal latency and automatic link discovery. |
|
|
52
|
+
| Extract pricing tables, interactive SPAs, complex layouts | `atlas_compile` | Full deterministic visual compilation preserving CSS positioning, table geometry, and AST. |
|
|
53
|
+
| Discover site architecture, all docs pages, or sitemap | `atlas_map` | High-speed URL tree discovery without downloading page bodies. |
|
|
54
|
+
| Spider documentation section or multi-page domain | `atlas_crawl` | Recursive spidering with depth control and path pattern filtering. |
|
|
55
|
+
| Compile a predefined list of 1–20 URLs in parallel | `atlas_batch_compile` | Concurrent execution with uniform per-page budget and error isolation. |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 3. Playbooks & Workflows
|
|
60
|
+
|
|
61
|
+
### Playbook 1: Fast-Path Single-Page Extraction (`atlas_scrape`)
|
|
62
|
+
|
|
63
|
+
Use `atlas_scrape` when you need immediate content from a specific URL.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"name": "atlas_scrape",
|
|
68
|
+
"arguments": {
|
|
69
|
+
"url": "https://example.com/blog/article",
|
|
70
|
+
"formats": ["markdown", "links"],
|
|
71
|
+
"max_output_chars": 30000
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Key Parameters**:
|
|
77
|
+
- `formats`: `["markdown"]` (clean markdown), `["links"]` (extracted hyperlinks), `["text"]` (raw plain text).
|
|
78
|
+
- `max_output_chars`: Maximum character budget (default: 30,000, max: 200,000). Content exceeding the budget is cleanly truncated at paragraph boundaries.
|
|
79
|
+
- `timeout_ms`: Request timeout in milliseconds (default: 15,000).
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### Playbook 2: Visual Compilation & Dynamic Content (`atlas_compile`)
|
|
84
|
+
|
|
85
|
+
Use `atlas_compile` for pages rendered heavily with JavaScript, multi-column pricing grids, dashboards, or when visual layout hierarchy matters.
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"name": "atlas_compile",
|
|
90
|
+
"arguments": {
|
|
91
|
+
"url": "https://stripe.com/pricing",
|
|
92
|
+
"format": "markdown",
|
|
93
|
+
"max_output_chars": 30000,
|
|
94
|
+
"force_fresh": false
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Key Parameters**:
|
|
100
|
+
- `format`: `'markdown'` (clean LLM-ready markdown), `'semantic'` (structured AST section graph), or `'markdown+links'` (markdown with navigation links).
|
|
101
|
+
- `max_output_chars`: Character budget (default: 30,000). Content exceeding this budget is indexed with a Table of Contents and navigable `atlas://` resource links.
|
|
102
|
+
- `force_fresh`: Set `true` to bypass edge cache and force re-compilation from origin.
|
|
103
|
+
|
|
104
|
+
**Reading Long Compilation Artifacts via MCP Resources**:
|
|
105
|
+
If a compiled page produces very large output, inspect the returned `resource_uri` using:
|
|
106
|
+
- `atlas://compilations/{job_id}/markdown` — Full formatted Markdown.
|
|
107
|
+
- `atlas://compilations/{job_id}/ast` — Structured JSON AST.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Playbook 3: Site Reconnaissance & Hierarchy Discovery (`atlas_map`)
|
|
112
|
+
|
|
113
|
+
Before launching deep crawls or when exploring unfamiliar APIs/documentation, map the site first to find relevant paths without wasting tokens.
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"name": "atlas_map",
|
|
118
|
+
"arguments": {
|
|
119
|
+
"url": "https://docs.anthropic.com",
|
|
120
|
+
"limit": 100,
|
|
121
|
+
"include_subdomains": false,
|
|
122
|
+
"sitemap": "include"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Key Parameters**:
|
|
128
|
+
- `limit`: Maximum number of URLs to discover (1–500, default: 100).
|
|
129
|
+
- `include_subdomains`: Whether to traverse subdomains (default: `false`).
|
|
130
|
+
- `sitemap`: `'include'` (checks sitemaps first, then crawls links), `'skip'` (only crawls links), or `'only'` (strictly reads sitemaps).
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### Playbook 4: Recursive Section Spidering (`atlas_crawl`)
|
|
135
|
+
|
|
136
|
+
Use `atlas_crawl` to ingest an entire documentation section or guide hierarchy.
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"name": "atlas_crawl",
|
|
141
|
+
"arguments": {
|
|
142
|
+
"url": "https://docs.example.com/guides/",
|
|
143
|
+
"max_depth": 2,
|
|
144
|
+
"max_pages": 15,
|
|
145
|
+
"include_paths": ["/guides/**"],
|
|
146
|
+
"exclude_paths": ["*.pdf", "**/changelog/**"]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Key Parameters**:
|
|
152
|
+
- `max_depth`: Crawl depth from origin (1–5, default: 2).
|
|
153
|
+
- `max_pages`: Maximum total pages to spider (1–50, default: 10).
|
|
154
|
+
- `include_paths`: Path glob patterns to restrict compilation (e.g., `["/guides/**"]`).
|
|
155
|
+
- `exclude_paths`: Path glob patterns to exclude from compilation (e.g., `["*.pdf"]`).
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### Playbook 5: Parallel Multi-Page Batching (`atlas_batch_compile`)
|
|
160
|
+
|
|
161
|
+
When you have a known set of URLs (e.g., from search results or comparison benchmarks), retrieve them concurrently with `atlas_batch_compile`.
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"name": "atlas_batch_compile",
|
|
166
|
+
"arguments": {
|
|
167
|
+
"urls": [
|
|
168
|
+
"https://example.com/feature-a",
|
|
169
|
+
"https://example.com/feature-b",
|
|
170
|
+
"https://example.com/pricing"
|
|
171
|
+
],
|
|
172
|
+
"format": "markdown",
|
|
173
|
+
"max_output_chars_per_page": 15000
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Key Parameters**:
|
|
179
|
+
- `urls`: List of URLs to compile in parallel (maximum 20 per call).
|
|
180
|
+
- `format`: `'markdown'`, `'semantic'`, or `'markdown+links'`.
|
|
181
|
+
- `max_output_chars_per_page`: Character limit allocated per individual page (1,000–50,000, default: 15,000).
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 4. Operational Guardrails & Best Practices
|
|
186
|
+
|
|
187
|
+
1. **Token Budgeting**: Always set an appropriate `max_output_chars`. For standard research summaries, 20,000–30,000 characters is ideal.
|
|
188
|
+
2. **SSRF & Private Network Protection**: Atlas strictly rejects egress to private IP ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `127.0.0.1`, `localhost`) and cloud instance metadata (`169.254.169.254`). Do not attempt internal network scans.
|
|
189
|
+
3. **Error Handling**:
|
|
190
|
+
- `ATLAS_RATE_LIMITED`: Back off exponentially and reduce concurrency.
|
|
191
|
+
- `ATLAS_SSRF_BLOCKED`: The target resolves to a restricted internal address.
|
|
192
|
+
- `ATLAS_AUTH_INVALID`: Run `npx @atlascompiler/mcp init` to update credentials.
|
|
193
|
+
4. **Prefer Map Before Crawl**: For large websites, run `atlas_map` first to inspect the URL structure and craft precise `include_paths` before running `atlas_crawl`.
|