Skip to main content
Glama
CleanParse A2A Document & Table Extractor

CleanParse A2A Document & Table Extractor

by ZhannaBee

CleanParse A2A Micro-API (Stage 3)

Try it live & Automation Suite:

Zero-LLM-cost deterministic Web/HTML/Text extraction & lossless Table normalizer with FastAPI REST + MCP JSON-RPC 2.0 dual endpoints, SQLite billing/rate-limit metering, RapidAPI proxy verification, and one-click Render cloud deployment.

Architecture

  • Zero External LLM Cost ($0.00/call): Pure local parsing (BeautifulSoup4 + lxml) strips nav/ads/scripts, expands complex colspan/rowspan HTML tables into lossless 2D JSON + GFM Markdown, and reduces token footprint for downstream AI agents.

  • Dual A2A Interface:

    • REST API: POST /v1/extract, POST /v1/extract/tables, POST /v1/keys/issue, GET /v1/usage, GET /v1/pricing, GET /health, GET /.well-known/agent.json

    • MCP JSON-RPC 2.0: POST /mcp (initialize, tools/list, tools/call for extract_document, extract_tables, check_quota)

  • Billing & Rate-Limit Gate (SQLite WAL):

    • SHA-256 hashed API keys (X-API-Key / Authorization: Bearer)

    • Constant-time RapidAPI proxy verification (X-RapidAPI-Proxy-Secret + X-RapidAPI-User + X-RapidAPI-Subscription)

    • UTC daily plan quotas (free: 50/day, pro: 2,000/day, enterprise: 50,000/day) returning 429 Too Many Requests with Retry-After

    • Per-request usage & estimated USD revenue logging (GET /v1/admin/revenue)

  • Security: SSRF protection blocking loopback, RFC1918 private IPs, cloud metadata (169.254.169.254), and non-HTTP(S) schemes.

Related MCP server: genpark-markdown-table-to-json-transformer-skill

Local Run & Test

.\.venv\Scripts\python.exe -m pytest tests -v
.\.venv\Scripts\python.exe scripts\export_openapi.py
.\.venv\Scripts\python.exe -m uvicorn app.main:app --host 127.0.0.1 --port 8000

Cloud Deployment & RapidAPI Registration

  1. Push micro_api_stage3/ to a GitHub repo and connect via Render Blueprint (render.yaml, free tier).

  2. Copy the Render URL (https://<service>.onrender.com) and import artifacts/openapi_rapidapi.json into RapidAPI Studio.

  3. Copy RapidAPI's X-RapidAPI-Proxy-Secret into Render's RAPIDAPI_PROXY_SECRET environment variable.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Converts web pages and HTML strings into clean, LLM-optimized Markdown with metadata extraction and token estimation. It uses a lightweight, browserless approach to provide token-efficient output for more effective LLM processing.
      2
      353 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables converting Markdown and HTML tables into structured JSON records with automatic column type inference and format normalization. It also offers supporting web-agent primitives such as DOM semantic pruning, form field auto-mapping, and execution trajectory evaluation, all via a zero-dependency MCP server.
      7
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI agents and MCP clients to fetch web pages and distill them into clean, token-efficient markdown by stripping cookie banners, navigation bars, and ads. Runs with zero external dependencies over JSON-RPC stdio, delivering deterministic sub-millisecond results without LLM round-trips.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Fetch any web page as clean Markdown or plain text, split it into heading-aware, token-bounded RAG chunks, convert raw HTML, and read page metadata. Uses the Web2MD API on RapidAPI with your own key (free BASIC plan).
      4
      54 npm
      MIT