MCP server for Doc_Conv — convert PDF/Word/Excel/PowerPoint to Markdown, paid per call with USDC via the x402 protocol (Base).
Project description
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 exceedsmax_usdc) and converts. Returns inlinemarkdownfor text documents, or adownloadUrl(zip) when the document contains images.
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. Secret — never commit or share. | (required) |
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.pdfto 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_documentspends real USDC. Usemax_usdcto cap per-call cost.
Links
- Service: https://converter.crepe.fund
- Agent API (OpenAPI): https://converter.crepe.fund/openapi.json
- x402 discovery: https://converter.crepe.fund/.well-known/x402.json
- Operator: CREPE Foundation
License
MIT © CREPE Foundation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docconv_mcp-1.0.1.tar.gz.
File metadata
- Download URL: docconv_mcp-1.0.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b59f99f87b14e668bb5519d8e39f6f4bf1f9a37934e0067c50b477e643fdc422
|
|
| MD5 |
e9576e367f51a6847ffc1a29695261ca
|
|
| BLAKE2b-256 |
2650a928b12ebd3417fb4dd2c7a6cc7737d1a0fd17a4ed57be304f929bfd430a
|
File details
Details for the file docconv_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: docconv_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d01f4b1b165b0b9858c0212ba6036020248561d44a2dd088cdbf3bc4ceea586c
|
|
| MD5 |
9e6fdcc3c901d2f293fdeffc0b66e552
|
|
| BLAKE2b-256 |
e3a3bedf2908006b6c9ded2d145241eccf54eee65835a60d398d0a181358bb56
|