# fantoma

An accessibility-tree browser MCP server for coding agents. It serves structured text instead of screenshots to keep token usage low.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: Huzy85
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Huzy85/fantoma
- Updated: 2026-10-13
- HTML: https://affpapa.org/en/nevibecode/mcp/fantoma

## What it does

Fantoma drives a stealth Camoufox browser and interprets web pages through their accessibility tree. Instead of feeding multi-thousand-token screenshots into vision models, it converts content into plain text and Markdown. A single navigation step takes roughly 500 tokens. This makes page navigation feasible even on small local models.

Routine browser duties bypass the model entirely. Code handles authentication forms and clicks checkboxes, storing sessions with encryption so logins survive across calls. If a target page presents a bot barrier or a sign-in prompt, Fantoma tags the result as blocked rather than passing broken markup.

Commands like fantoma_read and fantoma_login operate independently, while open tasks like fantoma_extract require an active endpoint in FANTOMA_LLM_URL. The server demands Python 3.10 or newer on Linux or macOS. Windows environments need WSL to run it.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add fantoma -- uvx fantoma
```
uvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>

### Codex

**Platform CLI**
```bash
codex mcp add fantoma -- uvx fantoma
```
uvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fantoma": {
            "command": "uvx",
            "args": [
                "fantoma"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fantoma": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "fantoma"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add fantoma uvx fantoma
```
uvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>

## When to use it
- browse web pages without vision models or screenshots
- submit login forms programmatically without model calls
- cut per-step token consumption during web navigation
- detect bot barriers and login walls automatically

## Example prompts
- Use fantoma to read https://news.ycombinator.com and extract the headlines in Markdown
- Log in to https://github.com/login with fantoma_login using my credentials
- Check https://example.com/pricing for anti-bot barriers or authentication walls

## Similar
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32260
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23283
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13181
- [apify-mcp-server](https://affpapa.org/en/nevibecode/mcp/apify-mcp-server.md) — MCP server · ★ 13345

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
