doc2x-mcp

doc2x-mcp is a skill for Claude Code, Codex from NoEdgeAI/doc2x-mcp. It costs 0 tokens per session (1,663 once invoked), scanned A, original, MIT.

An MCP server that lets an agent send PDFs and images to Doc2x for parsing, export results as Markdown, TeX, or DOCX, and save files locally. MCP is a standard way for an agent to use external tools.

In plain words
What is it for?
Use it to extract content from PDFs or images, convert documents into other formats, and save layout data or downloaded files.
Why use it?
It removes the need to handle document parsing, format conversion, downloads, and saved output separately.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to extract content from PDFs or images, convert documents into other formats, and save layout data or downloaded files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/noedgeai/doc2x-mcp/doc2x-mcp
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.

Any agent
npx skills add NoEdgeAI/doc2x-mcp --skill doc2x-mcp
Clone the repo
git clone --depth 1 https://github.com/NoEdgeAI/doc2x-mcp

Made for: Claude Code, Codex.

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 doc2x-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/noedgeai/doc2x-mcp/doc2x-mcp/github.svg)](https://agentmods.dev/skills/noedgeai/doc2x-mcp/doc2x-mcp)
Your own site
<a href="https://agentmods.dev/skills/noedgeai/doc2x-mcp/doc2x-mcp"><img src="https://agentmods.dev/badge/skills/noedgeai/doc2x-mcp/doc2x-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc2x-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/noedgeai/doc2x-mcp/doc2x-mcp"><img src="https://agentmods.dev/badge/skills/noedgeai/doc2x-mcp/doc2x-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01663
Opus 5 $0.00000 $0.00831
Sonnet 5 $0.00000 $0.00333
Haiku 4.5 $0.00000 $0.00166

Measured 9d ago against content hash 431aea2dc188, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

doc2x-mcp 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 9d 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.

SKILL.md · 143 lines

How it starts

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

doc2x-mcp 开发指南

项目概览

@noedgeai-org/doc2x-mcp 是一个 MCP(Model Context Protocol)服务器,通过 stdio 提供 Doc2x PDF/图片解析、格式导出和文件落盘能力。

  • 语言:TypeScript(ESM,Node ≥18)
  • 包管理:pnpm
  • 入口src/index.ts → 构建产物 dist/index.js
  • 发布包名@noedgeai-org/doc2x-mcp

目录结构

src/
  config/index.ts          # 配置:API Key、超时、环境变量解析
  doc2x/
    client.ts              # HTTP 客户端
    pdf.ts                 # PDF 解析 API
    convert.ts             # 导出 API(md/tex/docx)
    image.ts               # 图片解析 API
    materialize.ts         # layout JSON 落盘
    download.ts            # 文件下载(含 allowlist 校验)
    paths.ts               # API 路径常量
    constants.ts           # 通用常量
    http.ts                # HTTP 工具
  mcp/
    registerTools.ts       # 入口:统一注册所有 tool
    registerPdfTools.ts    # PDF 相关 tools
    registerConvertTools.ts# 导出相关 tools
    registerImageTools.ts  # 图片相关 tools
    registerMiscTools.ts   # 杂项 tools(debug config 等)
    registerToolsShared.ts # 共享类型、LRU 缓存、Zod schema、工具函数
    results.ts             # MCP 结果格式化
  errors/
    error.ts               # ToolError
    errorCodes.ts          # 错误码常量
  shared/utils.ts          # 通用工具函数
skills/doc2x-mcp/SKILL.md  # 用户侧 skill(用于 Claude/Codex 调用指导)

常用命令

just install          # pnpm install
just build            # tsc 编译
just start            # node dist/index.js(stdio MCP 服务器)
just run              # build + start
just fmt              # prettier 格式化
just fmt-check        # 格式检查(CI 用)
just check            # fmt-check + build
just clean            # 删除 dist/

# 测试
pnpm test             # 单元测试 + e2e 测试
pnpm test:unit        # 仅单元测试
pnpm test:e2e         # 仅 e2e 测试

# skill 安装(开发本地调试用)
just install-skill         # 安装到 Codex + Claude
just install-skill-force   # 强制覆盖
just install-skill-codex   # 仅 Codex
just install-skill-claude  # 仅 Claude

环境变量

变量 说明 默认值
DOC2X_API_KEY API Key(也可内嵌在 src/config/index.tsINLINE_DOC2X_API_KEY
DOC2X_BASE_URL API Base URL https://v2.doc2x.noedgeai.com
DOC2X_HTTP_TIMEOUT / DOC2X_HTTP_TIMEOUT_MS HTTP 超时(sms 60s
DOC2X_POLL_INTERVAL_MS 轮询间隔 2000ms
DOC2X_MAX_WAIT_MS 最大等待时长 600000ms
DOC2X_PARSE_PDF_MAX_OUTPUT_CHARS 文本预览最大字符数 5000
DOC2X_PARSE_PDF_MAX_OUTPUT_PAGES 文本预览最大页数 10
DOC2X_DOWNLOAD_URL_ALLOWLIST 下载域名白名单(逗号分隔,* 表示全放行) .amazonaws.com.cn,.aliyuncs.com,.noedgeai.com

Read the full file on GitHub · 143 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. 9d ago First seen · 143 lines · 0 tokens per session scan A 431aea2dc188

Subscribe to this mod's changes

doc2x-mcp is a skill published in the GitHub repository NoEdgeAI/doc2x-mcp (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,663 tokens. 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.

Related

Other skills, from other repositories