tor-mcp
Routes web fetches and headless browser sessions through Tor, enabling access to .onion sites, reporting the Tor exit IP, and obtaining new circuits/identities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tor-mcp open the Tor Project's onion site and archive it with a hash"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tor-mcp
Give Claude Code and Codex a browser that goes through Tor.
Open .onion sites, keep your real IP away from every site your agent visits, and archive pages with timestamps and SHA-256 hashes for your reporting.
Built for journalists, researchers and OSINT analysts who already use Tor and want an AI assistant to do the slow part: open the pages, read them, follow links, summarize, and keep a verifiable copy.
What you can ask
"Open the Tor Project's onion site and tell me what changed in the latest release notes."
"Check whether
example.comadvertises an onion address.""Read this leak-site page, list every mention of Acme Corp, and archive the page as evidence."
"Open this news site that is blocked on my network and summarize the front page."
"Get a new identity and check the page again from a different exit."
Related MCP server: tor-browser-mcp
Install
Requires Node.js 20+. Tor is downloaded automatically on first use (the official Tor Expert Bundle, checked against SHA-256 hashes pinned in the source). If you already have tor on your PATH, that one is used instead.
Claude Code
claude mcp add tor -- npx -y tor-mcpCodex (~/.codex/config.toml)
[mcp_servers.tor]
command = "npx"
args = ["-y", "tor-mcp"]Any other MCP client: run npx -y tor-mcp over stdio.
For tor_browse you need Google Chrome or Edge installed (or run npx playwright install chromium). tor_fetch works without a browser.
Tools
Tool | What it does |
| Starts Tor, shows version, bootstrap and the exit IP websites see |
| Downloads a page over Tor (no JavaScript) and returns readable Markdown, links, HTTP status, UTC time and SHA-256 of the response. Reports |
| Opens a page in headless Chromium routed through Tor, with a throwaway in-memory profile. |
| Interact with the open page |
| Saves HTML, Markdown, a full-page screenshot and |
| New Tor circuits and a wiped browser session |
How it protects you
Every request, including DNS, goes through Tor.
.onionnames resolve inside Tor.Tor runs as a private process with a temporary data folder and random ports. It is deleted when the client closes.
The browser uses a fresh in-memory profile: no history, cookies or cache on disk. WebRTC is restricted, downloads are disabled, only
http/httpsare allowed, and local network addresses are blocked.tor_archiveis the only tool that writes to disk, and only when you ask.
What this does NOT do
Read this before relying on it.
The AI provider sees everything. Page content and your prompts go to Anthropic, OpenAI or whoever runs your model. Tor hides your IP from websites, not from your AI provider.
This is not Tor Browser. Chromium over Tor has a different fingerprint than Tor Browser, and sites can tell. If your safety depends on anonymity, use Tor Browser yourself, ideally on Tails.
Don't use it to submit anything identifying. Never log in, type real names, or upload documents through it. For sending documents to newsrooms, use their SecureDrop directly in Tor Browser.
Page text is untrusted. A page can contain text that tries to steer your agent. The tools label page content as untrusted, but review what your agent does.
It does not index or recommend sites. You bring the addresses. Use it legally and responsibly.
Configuration
Variable | Default | Purpose |
| none | Use this tor binary |
| unset |
|
|
| Where the downloaded Tor lives |
|
| Where |
| auto | Chromium-based browser for |
Develop
npm install
npm test
npm run test:integration # real Tor: downloads Tor, opens an onion site
npm run typecheck
npm run dev # runs the server over stdioSee docs/arquitetura.md for how the pieces fit together.
License
MIT
Available Tools
8 toolstor_archiveArchive a page as evidenceA
Save a copy of a page for reporting: HTML, readable Markdown, a screenshot (browser mode) and manifest.json with UTC time, final URL, HTTP status, Tor exit IP and a SHA-256 for every file. Saved under ~/tor-mcp-archive (or TOR_MCP_ARCHIVE_DIR). This is the only tool that writes to disk.
Inputs: url, note.
tor_browseOpen a page in the Tor browserA
Open a URL (including .onion) in a headless Chromium that routes all traffic through Tor, with a throwaway in-memory profile. Returns readable text and links. Use tor_click, tor_type and tor_screenshot afterwards. Set javascript=false for a safer, Tor-Browser-'Safest'-like mode.
Inputs: url (required), javascript.
tor_clickClick on the open pageA
Click an element on the page opened by tor_browse, by CSS selector or by visible text. Returns the resulting page.
Inputs: text, selector.
tor_fetchFetch a page over TorARead-only
Download a web page (including .onion addresses) through Tor and return its readable text as Markdown plus its links. Fast and light: no JavaScript runs. Includes retrieval time and SHA-256 of the raw response. Use tor_browse for pages that need JavaScript or interaction.
Inputs: url (required), raw.
tor_new_identityNew Tor identityA
Switch to new Tor circuits (new exit IP for new connections) and wipe the browser's cookies, storage and open page.
Inputs: no named parameters.
tor_screenshotScreenshot the open pageARead-only
Take a PNG screenshot of the page opened by tor_browse.
Inputs: fullPage.
tor_statusTor statusARead-only
Start Tor if needed and report whether it is connected, the Tor version and the current exit IP as seen by websites. Call this first to confirm traffic really goes through Tor.
Inputs: no named parameters.
tor_typeType into a fieldA
Fill a field on the open page (e.g. a search box) and optionally press Enter. Never use this to enter passwords, real names or other personal data.
Inputs: text (required), selector (required), submit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action: status check, static fetch, JS-capable browsing, page interaction (click/type/screenshot), archiving, and circuit reset. The only potential overlap — tor_fetch vs tor_browse — is explicitly resolved in both descriptions (lightweight no-JS retrieval vs headless Chromium with interaction follow-ups). tor_click, tor_type and tor_screenshot are clearly scoped as continuations of a tor_browse session.
All names share a uniform tor_ snake_case prefix with single-word verbs (fetch, browse, click, type, screenshot, archive), which is highly predictable. Minor deviation: tor_status and tor_new_identity are noun-phrase style rather than verb_noun, but semantics remain obvious.
Eight tools is well within the sweet spot and each one maps to a real capability: connectivity check, two retrieval modes, three interaction primitives, evidence capture, and identity rotation. Nothing feels redundant or padded for a Tor browsing server.
The surface covers the full core lifecycle: verify Tor connectivity, retrieve pages (static or JS), interact, capture evidence, archive, and rotate identity. Gaps are minor — no back/forward navigation or history control, no explicit session close/cleanup beyond tor_new_identity, and no scroll or multi-element form submission — but agents can largely work around these.
Maintenance
Related MCP Connectors
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Browser sessions for agents: navigate, interact, read and screenshot. Pay in stablecoins.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access Tor hidden services and the dark web through tools for search, fetch, and analysis over Tor.20MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Tor Browser with full anonymity preservation, including navigation, Tor circuit management, and traffic interception.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to retrieve verified web evidence via headless Chromium rendering, sitemap navigation, and search candidate discovery, returning clean Markdown, structured JSON, and verbatim quoted proof.12 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents and compatible MCP clients to fetch, search, and download web content—including .onion services—anonymously through the Tor network, using a fresh circuit per call and retrying when exit nodes are blocked.62MIT