Skip to main content
Glama
tamperlens-mcp

tamperlens-mcp

tamperlens-mcp

面向 Tamperlens 的 MCA 服务器 —— 用于在文档进入你的 Agent 上下文之前,检查它是否被编辑过、它的遮盖行为是否仍然有效,以及让一个模型来读取它是否安全。

// Claude Desktop / Claude Code — claude_desktop_config.json or .mcp.json
{
  "mcpServers": {
    "tamperlens": {
      "command": "npx",
      "args": ["-y", "tamperlens-mcp"],
      "env": { "TAMPERLENS_API_KEY": "tl_..." }
    }
  }
}

无需密钥即可试用;即使没有密钥,也有一个匿名使用的额度,即每小时 10 份文档。在 tamperlens.com/account 认领一个免费密钥,就可以让额度提升到每月 50 份,并且不需要绑定任何卡片。

工具

工具

回答的问题

inspect_document

这个文档在写完之后是否又被人编辑过了?包括:原始保存之后追加的修订、自相矛盾的元数据、编辑器指纹、签名覆盖范围与完整性、隐藏文本、没有展示的宏、图像中的 AI 生成痕迹 —— 以及该文档是否带有专门写给语言模型的文本,而不是写给读者的文本。

check_redaction

所说的"遮盖"是否真的删除或者化掉了内容?用黑色四边形把文字盖起来,只是让人看不见它,而对文件本身并没做任何删除。

compare_documents

这个文件与我现在已经持有的原始文件是否完全一样、又没有任何变化?

支持 PDF;Word、Excel 和 PowerPoint(.docx、.xlsx、.pptx 以及它们带宏的兄弟版本),以及 JPEG、PNG、WebP、HEIC/HEIF 与 AVIF。

Related MCP server: subtext-scan

为什么你值得把这个放在你的 Agents 前面

一份文档会被两群人阅读,而其中只有一群会看到页面本身。真正的读取管线会读取标题、关键词、XM P 通信包、加注、附件的名字——这些字段是专门设计成用"软件的方式"来读取的。被放到这些位置的文字,本来就可以被写成要让人去执行的,而不是要被人阅读的。

inspect_document 会在你的 Agent 正式摄取该文件之前把这些情况报告出来,而且这个服务器会把恢复出来的大块载荷一律略去。这并不是为了图省事:Tamperlense 报告最有可能下一个阅读者,就是那台已经打算读文档的模型本身。换句话说,如果一个 MCP 服务器把攻击者注入的那句话原样传回上下文,那它就等于完成了一次自己本来探查到的那次攻击。你拿到的,是它出现在哪个字段、什么位置、属于哪个提示"类别,而不是那句原文。

它不做的事

  • 本地分析没有人在做。 这里的每个工具只是运行着 Tamperlens REST API 的一个部署上一层的薄壳。并没有一个单独这么多的一套引擎,会慢慢和前面的那个引擎产生偏差。

  • 不下任何结论。 Tamperlens 提供的是带着证据的风险信号,而不会说"这份文档是伪抄袭的"。收到这些之后,需要你自己结合自己的业务判断决定。

  • 文档永远不进进入模型的上下文。 工具会拿到调用者文件系统里的一份路径,并直接在这里读取字节。如果采用工具调用把 Base64 抛进去,那是相当于把几十 MB 的文档搬进上下文窗口,仅仅为了去服务一个需要"字节"而不需要"模型重点"的接口。

  • 一切都不会被保存。 文件会让 API 在内存中读出并解析,然后当响应返回时一并丢弃。

配置方式

变量

默认值

含义

TAMPERLENS_API_KEY

无

可选。不设置时就照旧使用匿名额度(每小 时10份文档).

TAMPERLENS_BASE_URL

https://tamperlens.com

可改成面向自己的部署。

相关链接

信号全方位指南 ·[这份文件模型可以安全阅读吗? · API 参考 · 安全与隐私工程师剖面

MIT 许可。问题与源码:github.com/haruodev/tamperlens-mcpu。他身后要通信的引擎是 tamperlens.com.本仓库只包含 MCP 的客户端部分。

Available Tools

4 tools
check_redactionA

Check whether a PDF's redactions actually removed anything. Covering text with a black box hides it from a reader and removes nothing from the file, so the words stay extractable. This reads paint order to catch a plain drawn rectangle — which carries no redaction annotation at all and is the failure behind most published redaction leaks — and separately catches redaction marks that were never applied. Use this before a document is filed or released.

Inputs: url, path.

compare_documentsA

Compare a candidate document against the original you already hold, and answer the question a single-file check cannot: is this the same file, unchanged? Reports byte identity (the only proof), revision ancestry when the candidate contains the original as a byte prefix, or a field-by-field structural diff when both were rewritten whole. Renders nothing and compares no pixels.

Inputs: originalUrl, candidateUrl, originalPath, candidatePath.

inspect_documentA

Inspect a document or image for fraud and tamper signals: revisions appended after the original save, metadata that disagrees with itself, editor fingerprints, signature coverage gaps, text still readable under a redaction box, unaccepted tracked changes whose deleted text is still recoverable, hidden text, hidden spreadsheet sheets, macros, and AI-generator or editor traces in images. Returns risk signals with the raw evidence behind each one — never a verdict on authenticity. Accepts PDF; Word, Excel and PowerPoint documents (.docx, .xlsx, .pptx and macro-enabled twins); and JPEG, PNG, WebP, HEIC/HEIF and AVIF images.

ALSO ANSWERS: is this file safe for a model to read? Document properties, XMP, annotations, attachment names, docProps, comments and hidden Word runs are checked for text written to be read by a language model rather than by a person — the prompt-injection carriers an extraction pipeline surfaces and a human reader never sees. Call this BEFORE the document reaches your own context. The recovered text itself is never returned through this tool: you get the cue categories, the counts and which kind of field carried it, because reading the payload is the attack.

Inputs: url, path, issuer, policy.

triage_documentA

CHEAP PRE-FLIGHT for document intake: is this file worth ingesting, and what does it cost to open? Reads structure, metadata, signatures and presence flags (revisions appended after the original, editor fingerprints, macros, JavaScript, embedded files, signature coverage) WITHOUT the expensive per-page content walk — a fraction of the I/O of inspect_document. Returns the risk band, the medium-or-high signals it CAN see, and the measured cost: bytes read, bytes expanded (decompressed) and the expansion ratio, so an agent can reject a decompression-heavy or high-risk file before committing to a full parse.

NOT A CLEAN BILL OF HEALTH. A quiet triage means only that the cheap structural tells were absent. Hidden text, redaction failure, altered arithmetic, glyph tampering, embedded-image anomalies and broken certifications are NOT checked in this mode — they need the page-content walk inspect_document runs. Use triage to ROUTE (reject now, or escalate to inspect_document), never as the verdict. PDFs get the cheap scope; Office documents and images have no separate expensive walk, so they return their full report.

Inputs: path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a clear action-object purpose: deep inspection, cheap pre-flight triage, PDF redaction verification, and original-vs-candidate comparison. The only real overlap is that check_redaction is a specialized slice of what inspect_document also covers, and triage_document vs inspect_document are two depths of the same scanning workflow, but the descriptions explain the intended routing well.

    Naming Consistency5/5

    All tools follow a consistent lowercase snake_case verb_target pattern: inspect_document, triage_document, check_redaction, compare_documents. The only minor variation is pluralization on compare_documents, which is semantically natural and does not hurt predictability.

    Tool Count5/5

    Four tools is well-scoped for a document-forensics server: one cheap intake preflight, one comprehensive deep inspection, one targeted redaction gate, and one comparison operation. Each tool has a distinct place in the workflow, and none feels redundant.

    Completeness4/5

    The surface covers the full relevant progression: triage to route, inspect to get detailed signals, check_redact before release, and compare to validate against an original. It also covers both document files and in images; the main gap is that check_redaction is PDF-only and there is no explicit batch/attation/report operation, but these are obstacles behind the core workflow.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables agents to inspect PDF, Microsoft Office, and Apple iWork documents without rendering them, providing page/slide counts, metadata, security signals, structure, and integrity as deterministic JSON via typed tools and batch operations.
      4
      53 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to check a document file or a retrieved piece of text for text a person cannot see and for instruction-style payloads before the agent reads or acts on it, returning findings with location, reason and severity plus a blocked flag when the content should not be trusted. The hidden text itself is withheld from tool results by default so the payload is not delivered to the requesting agent.
      10 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables agents to analyze documents for hidden text and indirect prompt-injection indicators before reading them, returning report metadata without exposing the hidden content.
      1
      Apache 2.0