Skip to main content
Glama
docconv-mcp
by nicklee002e

docconv-mcp

MCP server for Doc_Conv — convert PDF / Word / Excel / PowerPoint documents to Markdown, paid per conversion with USDC on Base via the x402 protocol (gasless, EIP-3009). No account, no API key: the agent signs a USDC payment and the service returns Markdown.

Why? Feeding formatted files (PDF/PPT/DOCX) straight into an LLM can cost 5–50× more tokens than the same content as Markdown. This lets an agent cheaply pre-convert documents before use.

Tools

  • estimate_conversion(file_path) — free price quote (pages, credits, priceUsdc, jobId, jobToken). No payment, no side effects.

  • convert_document(file_path, max_usdc=1.0, poll_seconds=300) — pays via x402 (rejects if the quote exceeds max_usdc) and converts. Returns inline markdown for text documents, or a downloadUrl (zip) when the document contains images.

Related MCP server: x402-md-mcp

Try it without a wallet

Pricing is free and needs no key, no account, no wallet — install it and ask for a quote:

claude mcp add doc-conv -- uvx docconv-mcp

Then: "How much would it cost to convert ~/papers/report.pdf?" — the agent calls estimate_conversion and answers. Add a wallet only when you want an actual conversion.

Install

Published to PyPI as docconv-mcp. Run with uvx (no install) or pip install docconv-mcp.

Configuration (env)

Variable

Description

Default

DOC_CONV_AGENT_PK

Private key of the agent's Base wallet (must hold USDC). Signs x402 payments. Needed only by convert_document — estimate_conversion works without it. Secret — never commit or share.

(unset: pricing only)

DOC_CONV_BASE_URL

Doc_Conv service base URL. Override only if self-hosting.

https://converter.crepe.fund

The wallet needs USDC on Base; gas is paid by the service's x402 facilitator (the agent needs no ETH). Pricing is by document size: 50 pages = 1 credit = 0.2 USDC (call estimate_conversion for the exact amount).

Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json)

{
  "mcpServers": {
    "doc-conv": {
      "command": "uvx",
      "args": ["docconv-mcp"],
      "env": { "DOC_CONV_AGENT_PK": "0x<your-agent-wallet-private-key>" }
    }
  }
}

Claude Code one-liner:

claude mcp add doc-conv -- env DOC_CONV_AGENT_PK=0x<key> uvx docconv-mcp

Example

"Convert ~/papers/report.pdf to Markdown."

The agent calls estimate_conversion to see the price (e.g. 0.3 USDC), then convert_document to pay via x402 and return the Markdown. If conversion fails, the paid credit is retained on the payer wallet for reuse.

⚠️ convert_document spends real USDC. Use max_usdc to cap per-call cost.

License

MIT © CREPE Foundation

Available Tools

2 tools
convert_documentA

문서를 Markdown으로 변환한다. x402로 USDC를 자동 결제한다.

가격이 max_usdc를 넘으면 결제하지 않고 거부한다(비용 폭주 방지). 이미지가 없는 문서는 markdown 텍스트를, 이미지가 포함된 문서는 zip 다운로드 URL을 반환한다.

Args: file_path: 변환할 로컬 파일 경로. max_usdc: 허용 최대 결제액(USDC). 견적이 이보다 크면 결제하지 않는다. poll_seconds: 변환 완료를 기다리는 최대 초. Returns: paid, txHash, priceUsdc, status, 그리고 markdown(이미지 없을 때) 또는 downloadUrl+format(이미지 있을 때).

Inputs: file_path (required), max_usdc, poll_seconds.

estimate_conversionA

문서 변환 가격을 미리 확인한다(결제·변환 없음).

Args: file_path: 변환할 로컬 파일 경로(pdf/docx/xlsx/pptx). Returns: pages(페이지 상당), credits, priceUsdc(예 "0.3"), payTo, jobId/jobToken.

Inputs: file_path (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one estimates cost, the other performs conversion with payment. No overlap or ambiguity.

    Naming Consistency5/5

    Both tool names follow a consistent verb_noun pattern in snake_case (estimate_conversion, convert_document).

    Tool Count5/5

    The server is focused on document conversion with a clear two-step workflow (estimate then convert). Two tools are exactly right for this scope.

    Completeness5/5

    The server covers the essential lifecycle: estimate cost and perform conversion. No obvious gaps for the stated purpose of converting documents.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables extracting clean Markdown from any webpage by paying $0.005 USDC per call via the x402 protocol, with automatic wallet-based payment settlement.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for StructDoc that converts documents (PDFs, images) into structured data like Markdown, OCR text, and invoice/receipt fields for AI agents, with pay-per-call via x402 (USDC on Base/Solana).
      MIT