SlimAtlas AI
An MCP server for lightweight browser automation using Lightpanda with Chrome fallback, providing LLM-optimized accessibility tree snapshots for precise element targeting.
README
<div align="center"> <img src="img/slim-atlas-logo.svg" alt="SlimAtlas AI Logo" width="180"> </div>
<h1 align="center">SlimAtlas AI</h1>
<p align="center"> A Model Context Protocol (MCP) server for extremely lightweight browser automation. </p>
<p align="center"> Works with <strong>macOS</strong> and <strong>Linux</strong>. </p>
<p align="center"> Built on top of <a href="https://pptr.dev/">Puppeteer</a> and <a href="https://github.com/lightpanda-io/browser">Lightpanda</a>. </p>
Features
- Browser Automation: Navigate, click, type, fill forms, and evaluate JavaScript
- Page Snapshots: Get compact YAML accessibility tree snapshots with unique node IDs for precise element targeting
- LLM-Optimized Context: Snapshots are stripped to semantic essentials, keeping context usage tiny so you can fit more pages and longer sessions into the same window
- Node Inspection: View specific nodes by ID to inspect text content or images
- History Navigation: Go back, go forward, and reload pages
- Lightweight by Default: Uses Lightpanda browser (9x less memory than Chrome, 11x faster)
- Automatic Chrome Fallback: If Lightpanda crashes or fails, automatically switches to Chrome for reliability
- Session Management: Reuse sessions across multiple operations with unique session IDs
- Cross-Platform: Works on macOS and Linux (Lightpanda), with automatic Chrome fallback when needed
Installation
# Install dependencies
npm install
Lightpanda binary will be downloaded automatically on first run. You can also manually download it:
# Linux x86_64
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda
# macOS aarch64 (Apple Silicon)
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda
# macOS x86_64
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-macos && chmod a+x ./lightpanda
Chrome Fallback: If Lightpanda crashes or a page triggers bot detection, the server automatically switches to Chrome (via Puppeteer) for that session. Chrome/Chromium can be installed locally, or Puppeteer can download it automatically.
Usage
Run the MCP Server
# Run with npm
npm run dev
Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"slimatlas": {
"command": "npx",
"args": ["tsx", "path/to/mcp/src/index.ts"]
}
}
}
Tip: Set CHROME_ENABLED=false to disable Chrome fallback and use Lightpanda only.
CLI Flags
Every environment variable in .env.example can also be passed as a lower-case CLI flag in --flag=value form. CLI flags override environment variables.
npx tsx src/index.ts --chrome-enabled=false --lightpanda-pool-size=3 --navigate-timeout=60000
To use flags from an MCP client, append them to the args array:
{
"mcpServers": {
"slimatlas": {
"command": "npx",
"args": [
"tsx",
"path/to/mcp/src/index.ts",
"--chrome-enabled=false",
"--lightpanda-pool-size=3"
]
}
}
}
Usage Workflow
# Example: Navigate, snapshot, and interact with a page
# 1. Navigate to a URL (creates a new session automatically)
result = mcp.call("browser_navigate", {"url": "https://example.com"})
# Returns: session_id: abc1, result: [lightpanda] Navigated to https://example.com. Title: Example Domain
# 2. Take a snapshot to see the page structure
snapshot = mcp.call("browser_snapshot", {"session_id": "abc1"})
# Returns YAML with node IDs like: 0: {type: div, children: ...}
# 3. Click a node by ID (from the snapshot)
mcp.call("browser_click", {"session_id": "abc1", "nodeId": 2})
# 4. Type into a search box
mcp.call("browser_type", {"session_id": "abc1", "nodeId": 5, "text": "search query"})
# 5. Close the session when done
mcp.call("browser_close", {"session_id": "abc1"})
Available Tools
| Tool | Description | Value |
|---|---|---|
browser_navigate |
Navigate to a URL with configurable wait strategy | Entry point for all web interactions. Supports load, domcontentloaded, networkidle0, networkidle2 |
browser_snapshot |
Get YAML accessibility tree with unique node IDs | Structured page representation ideal for LLM understanding. Node IDs enable precise targeting for clicks/types |
browser_view_node |
View specific node content by ID (text or image) | Inspect individual elements without full page re-read. Returns images as base64 for visual verification |
browser_click |
Click element by node ID or CSS selector | Node ID (from snapshot) is recommended over CSS selectors for reliability and simplicity |
browser_type |
Type text into element with optional keystroke delay | Simulates human typing. Use for search boxes, forms, and text inputs |
browser_fill |
Fill input element with a value instantly | Faster than browser_type for form fields. Clears existing value before filling |
browser_go_back |
Navigate back in browser history | Essential for multi-step workflows and correcting navigation mistakes |
browser_go_forward |
Navigate forward in browser history | Complements browser_go_back for bidirectional navigation |
browser_reload |
Reload the current page | Refresh dynamic content or recover from stale page state |
browser_get_page_info |
Get current page URL and title | Quick way to verify navigation success and current context |
browser_close |
Close browser session and free resources | Important for cleanup. Sessions auto-close on timeout, but explicit closing is recommended |
Running Tests
# Run all tests
npm test
# Run tests in watch mode
npx vitest
Requirements
- Node.js 18+
- Lightpanda browser (macOS/Linux, downloads automatically) or Chrome/Chromium (fallback)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。