tor-mcp CLAUDE.md

tor-mcp CLAUDE.md is an instructions file for coding agents from rushikeshmore/tor-mcp. It costs 1,132 tokens per session, scanned A, original, MIT.

A development guide for tor-mcp, a server that sends selected web requests through Tor, a network designed to provide privacy and route traffic through relays.

In plain words
What is it for?
Use it when developing, testing, linting, or running tor-mcp. It covers its Python server, SOCKS5 Tor connection, URL routing, circuit rotation, input validation, and mocked tests.
Why use it?
It explains the project’s structure, technologies, commands, and tests so changes can follow the existing design. It also documents how URL-based routing and Tor circuit control are organized.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rushikeshmore/tor-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/rushikeshmore/tor-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tor-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rushikeshmore/tor-mcp/claude-md.svg)](https://agentmods.dev/instructions/rushikeshmore/tor-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/rushikeshmore/tor-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/rushikeshmore/tor-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,132 This file is loaded in full into every session.
When invoked 1,132 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01132 $0.01132
Opus 5 $0.00566 $0.00566
Sonnet 5 $0.00226 $0.00226
Haiku 4.5 $0.00113 $0.00113

Measured 4d ago against content hash a355fddba33f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tor-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tor-mcp

MCP server that routes LLM tool web requests through Tor with selective per-URL routing. Built on FastMCP, httpx[socks], stem.

Project structure

tor-mcp/
├── src/tor_mcp/
│   ├── __init__.py        # Version
│   ├── __main__.py        # `python -m tor_mcp` entry
│   ├── server.py          # FastMCP server + 4 tools, validators, error handling
│   ├── tor.py             # TorManager: SOCKS5h client + stem control
│   └── router.py          # URLRouter: 7-priority pattern-based routing
├── tests/                 # 89 tests, fully mocked
├── .github/workflows/     # CI: pytest + ruff on push/PR
├── pyproject.toml         # Python 3.11+, hatchling build, ruff config
└── README.md              # User-facing docs

Stack

  • Python 3.11+
  • FastMCP (mcp SDK, stdio transport)
  • httpx[socks] for SOCKS5h Tor routing (DNS-safe)
  • stem for Tor control protocol (circuit rotation)
  • Pydantic v2 for input validation

Common commands

uv sync --dev                                  # install deps
uv run python -m pytest                        # tests (mocked, no Tor needed)
uv run python -m ruff check src/ tests/        # lint
uv run tor-mcp                                 # start MCP server (stdio)
uv run python -m tor_mcp                       # alternative launch
uv build                                       # wheel + sdist

MCP tools

All tool names use the tor_ service prefix per MCP builder conventions.

Tool Annotations Purpose
tor_private_fetch read-only Fetch URL with auto Tor/direct routing. force_tor and force_direct are mutually exclusive.
tor_check_anonymity read-only Verify Tor connection. Direct-IP compare with ipify → httpbin → ifconfig.co fallback chain.
tor_new_identity side-effect Rotate circuit. Requires control port. 10s rate limit enforced by Tor.
tor_privacy_status read-only Full health: connection, exit IP, control port, routing rules.

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 115 lines · 1,132 tokens per session scan A a355fddba33f

Subscribe to this mod's changes

tor-mcp CLAUDE.md is an instructions file published in the GitHub repository rushikeshmore/tor-mcp (2 stars, last pushed 3mo ago), licensed MIT. It adds 1,132 tokens to every session, about $0.0057 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.