跳到主要内容

PDFCheck MCP 服务器

在支持远程 HTTP 服务器或本地 MCP 桥接程序的 AI 助手中检查 PDF 元数据,并访问您的分析历史。

管理API令牌

通过 HTTP 连接

Add this URL to a client that supports remote HTTP MCP servers. For account access, configure a bearer Authorization header.

Use the MCP endpoint
https://pdfcheck.online/api/mcp

复制失败。请选中代码并手动复制。

Anonymous metadata analysis: 10 checks per day per IP. Free account: 100 checks per day. Individual tools can have different limits.

不使用令牌(每天 10 次免费检查)

To analyze a PDF, your assistant needs a file-reading tool that can send its base64 contents. Connecting MCP alone does not provide access to your files.

.cursor/mcp.json
{
    "mcpServers": {
        "pdfcheck": {
            "url": "https://pdfcheck.online/api/mcp"
        }
    }
}

复制失败。请选中代码并手动复制。

客户端配置

Connect your app

在客户端配置中替换 YOUR_API_TOKEN。移除 Authorization 请求头即可匿名访问。

Cursor
.cursor/mcp.json
{
    "mcpServers": {
        "pdfcheck": {
            "url": "https://pdfcheck.online/api/mcp",
            "headers": {
                "Authorization": "Bearer YOUR_API_TOKEN"
            }
        }
    }
}

复制失败。请选中代码并手动复制。

Official setup docs
VS Code
.vscode/mcp.json
{
    "servers": {
        "pdfcheck": {
            "type": "http",
            "url": "https://pdfcheck.online/api/mcp",
            "headers": {
                "Authorization": "Bearer YOUR_API_TOKEN"
            }
        }
    }
}

复制失败。请选中代码并手动复制。

VS Code uses a servers object and an explicit HTTP transport. Store your token through your client’s supported secret settings.

Official setup docs
Windsurf / Cascade
~/.codeium/windsurf/mcp_config.json
{
    "mcpServers": {
        "pdfcheck": {
            "serverUrl": "https://pdfcheck.online/api/mcp",
            "headers": {
                "Authorization": "Bearer YOUR_API_TOKEN"
            }
        }
    }
}

复制失败。请选中代码并手动复制。

These steps apply to the legacy Cascade client, now documented under Devin Desktop. Devin Local uses a different configuration; follow its current client documentation.

Official setup docs

检查连接

先让助手调用 check_usage,再通过能读取文件并进行 base64 编码的客户端分析 PDF。远程 HTTP 无法仅凭本地文件路径读取文件。

请求示例
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "check_usage",
        "arguments": {}
    }
}

复制失败。请选中代码并手动复制。

可用的 MCP 工具

这些 MCP 工具涵盖元数据分析和账户历史。压缩、结构检查、签名及其他浏览器工具不通过这些方法提供。

工具 参数 访问权限
analyze_pdf file_base64, filename 无需令牌
get_analysis token 公开结果或账户令牌
list_analyses {} 账户令牌
check_usage {} 无需令牌

analyze_pdf

检查元数据、日期、软件字段和页数。远程工具接收 file_base64 和 filename;本地桥接程序接收 filePath。元数据不能证明文档的真实性或由 AI 撰写。

get_analysis

将返回的 data.id 作为 token,获取您账户中的分析或公开结果。远程服务器允许匿名获取公开结果;本地桥接程序需要令牌。新的匿名分析为私密分析,之后无法获取。

list_analyses

需要 API 令牌。远程服务器最多返回 50 条最近的账户分析;本地桥接程序返回 REST 结果的第一页。条目包括文件名、日期和分析 ID。

check_usage

查看剩余的每日元数据分析额度。远程 HTTP 支持匿名查询;账户详情和本地桥接程序需要 API 令牌。

Send the PDF contents

The analyze_pdf tool accepts file_base64 and filename. Your client must read the PDF and encode it as base64; a local file path alone will not work.

Example tools/call payload
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "analyze_pdf",
        "arguments": {
            "file_base64": "BASE64_PDF_CONTENT",
            "filename": "document.pdf"
        }
    }
}

复制失败。请选中代码并手动复制。

读取响应

工具结果的 result.content[0].text 包含 JSON 文本。解析该文本以读取 success、data 和 remaining_checks;失败时还可能返回 isError。

读取响应
if (response.error) throw new Error(response.error.message);
const payload = JSON.parse(response.result.content[0].text);
if (response.result.isError || payload.success === false) {
  throw new Error(payload.message || payload.error);
}
console.log(payload.data, payload.remaining_checks);

复制失败。请选中代码并手动复制。

使用本地桥接

将以下文件另存为 pdfcheck-mcp-server.mjs,保存到计算机上的任意位置。这个轻量级脚本负责在您的 AI 工具与 PDFCheck API 之间建立连接。

可选的本地脚本需要 Node.js 18 或更高版本。远程 HTTP 连接无需 Node.js,也无需下载脚本。

将脚本保存在专用目录中,在该目录安装依赖,并在客户端配置中使用脚本的完整路径。

一次性设置:
mkdir pdfcheck-mcp
cd pdfcheck-mcp
npm init -y
npm install @modelcontextprotocol/sdk@1 zod

复制失败。请选中代码并手动复制。

MCP 服务器脚本
pdfcheck-mcp-server.mjs
#!/usr/bin/env node
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import { readFileSync } from "node:fs";
import { basename } from "node:path";

const API_BASE = "https://pdfcheck.online/api/v1";
const TOKEN = process.env.PDFCHECK_API_TOKEN || null;
const headers = TOKEN
  ? { Authorization: `Bearer ${TOKEN}`, Accept: "application/json" }
  : { Accept: "application/json" };

const server = new McpServer({ name: "pdfcheck", version: "1.0.0" });
const result = (data) => ({
  content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
});

server.tool(
  "analyze_pdf",
  "Inspect PDF metadata, dates, software fields, and page count.",
  { filePath: z.string().describe("Absolute path to the PDF file") },
  async ({ filePath }) => {
    const file = new Blob([readFileSync(filePath)], { type: "application/pdf" });
    const body = new FormData();
    body.append("file", file, basename(filePath));
    const response = await fetch(`${API_BASE}/pdf/analyze`, {
      method: "POST", headers, body,
    });
    return result(await response.json());
  }
);

server.tool(
  "get_analysis",
  "Retrieve an accessible analysis by its share token.",
  { token: z.string().describe("Analysis share token") },
  async ({ token }) => {
    const response = await fetch(`${API_BASE}/pdf/${encodeURIComponent(token)}`, { headers });
    return result(await response.json());
  }
);

server.tool("list_analyses", "List your account analyses.", {}, async () => {
  const response = await fetch(`${API_BASE}/pdf`, { headers });
  return result(await response.json());
});

server.tool("check_usage", "Check your account allowance.", {}, async () => {
  const response = await fetch(`${API_BASE}/user`, { headers });
  return result(await response.json());
});

await server.connect(new StdioServerTransport());

复制失败。请选中代码并手动复制。

Claude / Cursor

将脚本路径替换为绝对路径。将 PDFCHECK_API_TOKEN 设为账户令牌,或省略 env 以匿名分析。

claude_desktop_config.json / .cursor/mcp.json
{
    "mcpServers": {
        "pdfcheck": {
            "command": "node",
            "args": [
                "/absolute/path/pdfcheck-mcp-server.mjs"
            ],
            "env": {
                "PDFCHECK_API_TOKEN": "YOUR_API_TOKEN"
            }
        }
    }
}

复制失败。请选中代码并手动复制。

连接后,请在能够读取相应文件的客户端中使用以下提示。远程 analyze_pdf 需要 file_base64 和 filename,仅提供本地路径是不够的。本地桥接程序接受 filePath。

分析 PDF
{
    "name": "analyze_pdf",
    "arguments": {
        "filePath": "/absolute/path/document.pdf"
    }
}

复制失败。请选中代码并手动复制。

使用示例

连接后,请在能够读取相应文件的客户端中使用以下提示。远程 analyze_pdf 需要 file_base64 和 filename,仅提供本地路径是不够的。本地桥接程序接受 filePath。

分析 PDF
分析文件 /Users/me/Documents/contract.pdf,告诉我它的创建时间以及使用了什么软件。
检查软件迹象
检查 /Users/me/Downloads/report.pdf 中的创建者和生成者字段。解释其中的软件迹象,但不要将其视为 AI 撰写的证据。
批量分析
逐个分析我从“下载”文件夹中选择的 PDF。比较它们记录的创建日期和修改日期,并说明缺失或不一致的元数据。
查看配额
我今天在 PDFCheck 上还剩多少次 PDF 检查?

用量与限制

Anonymous metadata analysis: 10 checks per day per IP. Free account: 100 checks per day. Individual tools can have different limits.

元数据分析:匿名用户和 Free 套餐的上传上限为 50 MB。Pro 和 AI 套餐的上传上限为 100 MB。

API 元数据分析采用有处理范围限制的轻量模式。会跳过详细的字体、图像和颜色分析;metadata.basic.partial_analysis 为 true。

元数据和软件特征不能证明作者身份、真实性或标准合规性。

生成 API 令牌 可选

请将令牌作为机密信息管理。使用环境变量,并在账户中撤销不再使用的令牌。

匿名访问时,每个 IP 每天可进行 10 次元数据分析。拥有 API 令牌的免费账户每天可进行 100 次检查。如果希望以后通过账户查看结果,请在分析时使用令牌。

什么是 Model Context Protocol?

Model Context Protocol(MCP)是一种开放标准,允许 AI 助手连接外部工具和数据源。您可以把它看作一个通用插头,让 AI 助手直接在聊天窗口中与 PDFCheck 等服务通信。

远程 HTTP 服务器从您的客户端接收 base64 编码的 PDF 内容。可选的本地桥接程序会从您的计算机读取 PDF 并上传到 REST API。两者都会在 content[0].text 中以 JSON 格式返回元数据分析结果。

选择传输方式

请使用支持带 Bearer 请求头的远程 HTTP MCP 的客户端,或能够运行本地 stdio 桥接程序的客户端。此设置不支持仅限 OAuth 的连接。

PDF 通过 HTTPS 发送至 PDFCheck。根据其设计,您的 MCP 客户端或 AI 提供商也可能会处理该文件或工具参数。发送敏感文档前,请查看其数据政策以及 PDFCheck 隐私政策。

隐私政策

常见问题

我需要 API 令牌吗?

匿名访问时,每个 IP 每天可进行 10 次元数据分析。拥有 API 令牌的免费账户每天可进行 100 次检查。如果希望以后通过账户查看结果,请在分析时使用令牌。

我的 PDF 文件会存储在你们的服务器上吗?

API 不会在请求结束后保留原始检查上传文件。提取的元数据和结果记录会根据您的账户状态及隐私政策保留。

MCP 服务器会将我的文件发送给第三方吗?

PDF 通过 HTTPS 发送至 PDFCheck。根据其设计,您的 MCP 客户端或 AI 提供商也可能会处理该文件或工具参数。发送敏感文档前,请查看其数据政策以及 PDFCheck 隐私政策。

如果我的 AI 工具不在此列表中怎么办?

请确认您的客户端是否支持带 Bearer 请求头的远程 HTTP MCP,或能否通过 command 和 args 运行本地 stdio 服务器。各客户端的配置格式不尽相同。此设置不支持仅限 OAuth 的远程连接。

我可以将其用于自托管的 PDFCheck 实例吗?

可以。将服务器脚本中的 API_BASE 常量改为指向您自己实例的 URL 即可。