convez.ai
MCP Server
hasindu-madushan

slim-atlas-ai

hasindu-madushan/slim-atlas-ai

Ver no GitHub
InicialPluginScore · de 0 a 100

A Model Context Protocol (MCP) server that provides extremely lightweight browser automation capabilities using Lightpanda browser. This server enables LLMs to interact with web pages through browser automation.

Instalação

$npx convez-ai hasindu-madushan/slim-atlas-ai

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
3
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

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.

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

ToolDescriptionValue
browser_navigateNavigate to a URL with configurable wait strategyEntry point for all web interactions. Supports load, domcontentloaded, networkidle0, networkidle2
browser_snapshotGet YAML accessibility tree with unique node IDsStructured page representation ideal for LLM understanding. Node IDs enable precise targeting for clicks/types
browser_view_nodeView specific node content by ID (text or image)Inspect individual elements without full page re-read. Returns images as base64 for visual verification
browser_clickClick element by node ID or CSS selectorNode ID (from snapshot) is recommended over CSS selectors for reliability and simplicity
browser_typeType text into element with optional keystroke delaySimulates human typing. Use for search boxes, forms, and text inputs
browser_fillFill input element with a value instantlyFaster than browser_type for form fields. Clears existing value before filling
browser_go_backNavigate back in browser historyEssential for multi-step workflows and correcting navigation mistakes
browser_go_forwardNavigate forward in browser historyComplements browser_go_back for bidirectional navigation
browser_reloadReload the current pageRefresh dynamic content or recover from stale page state
browser_get_page_infoGet current page URL and titleQuick way to verify navigation success and current context
browser_closeClose browser session and free resourcesImportant 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

Ver o original no GitHub

Bom para

Relacionados