Tamperlens MCP is a server based on the MCP protocol, used for forensic inspection of documents before they enter an AI agent's context. It analyzes documents through the Tamperlens REST API and answers three core questions: whether a document has been edited after creation, whether redaction is effective, and whether the document is safe for a model to read.
Main capabilities include:
- Support for multiple file formats: PDF; Word, Excel, and PowerPoint (.docx, .xlsx, .pptx, and macro-enabled versions); JPEG, PNG, WebP, HEIC/HEIF, and AVIF images.
- Provides tools such as inspect_document, check_redaction, compare_documents, and inspect_case, which can accept local paths or http/https URLs (the two cannot be used at the same time).
- Detects prompt injection embedded in documents and reports the field, location, and clue category, but does not echo the attacker's statement, avoiding secondary injection.
- Supports configuring read directory restrictions (TAMPERLENS_ALLOWED_DIRS), URL fetch timeout (TAMPERLENS_FETCH_TIMEOUT_MS), and allowed internal IPs (TAMPERLENS_FETCH_ALLOW_IPS) through environment variables.
Usage:
- Can be tried without a key, with an anonymous quota of 10 documents per hour. After obtaining a free key at tamperlens.com/account, the quota increases to 50 per month, with no credit card required.
- The tools accept local file paths or URLs. URLs are fetched by the local server through the user's own network, and only the bytes are sent to Tamperlens, to avoid SSRF risks. The fetch process has strict protections: http/https only, redirect limit, 30-second timeout, 10 MB size limit, and checks whether the target IP is a loopback, link-local, private, or non-routable address, with the address pinned to prevent DNS rebinding.
- Local path reading has no default directory sandbox and no extension filtering; the read scope can be restricted through TAMPERLENS_ALLOWED_DIRS.
Applicable scenarios:
- Perform security screening before an AI agent reads a document, to prevent prompt injection.
- Verify whether document redaction is thorough, to avoid leakage of sensitive information.
- Compare document versions and detect edits after creation.
Limitations:
- No local analysis; all tools are thin wrappers around the Tamperlens REST API.
- Does not provide a final verdict, only reports risk signals and evidence, which must be combined with your own decision logic.
- Documents do not enter the model context; the tools read bytes locally.
- Data retention policy depends on account settings: no retention when there is no key; when there is a key and account history is enabled, the API retains a brief derived record (hashes, signal IDs, and scores), and the file itself is retained only when the account opts in. It can be set to retention: none through PATCH /api/v1/retention to retain nothing.
- This server should be run only with trusted agents and inputs, because it can read the local file system.
This project is licensed under the MIT License; source code and issue feedback are available at github.com/haruodev/tamperlens-mcp.