fantoma — Claude Code MCP server: what it does, how to install
An accessibility-tree browser MCP server for coding agents. It serves structured text instead of screenshots to keep token usage low.
claude mcp add fantoma -- uvx fantomaWhat fantoma 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.
What it helps with
- 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 for the agent
- 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
How to install fantoma
Platform CLI
claude mcp add fantoma -- uvx fantomauvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>
Platform CLI
codex mcp add fantoma -- uvx fantomauvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
gemini mcp add fantoma uvx fantomauvx runs the command named after the package; if the README names another one, use uvx --from fantoma <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fantoma
How to install fantoma in Claude Code?
Run the command claude mcp add fantoma -- uvx fantoma. The Camoufox browser binaries will download automatically on initial execution.
What does fantoma do?
It drives a stealth browser that exposes web content as structured accessibility text instead of screenshots. This cuts token consumption down to about 500 tokens per action and allows local models to inspect sites.
Do you need an LLM to read pages with fantoma?
No, fantoma_read and fantoma_login execute purely through deterministic code without querying any model. An LLM connection is only required when invoking fantoma_run or fantoma_extract.