Skip to content

About

Web pages and PDFs as clean Markdown/JSON for AI agents, in far fewer tokens. Remote MCP server + REST API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

AgentReader

AgentReader (agentreader.xyz) turns web pages and PDFs into clean Markdown or JSON for AI agents, in a fraction of the tokens.

Use it instead of a plain fetch when a page is JavaScript-only, behind a cookie wall, a PDF, or too big for your context (a React docs page: ~66,000 tokens of raw HTML → ~4,100 via AgentReader, 94% smaller).

Website: https://agentreader.xyz · MCP: https://agentreader.xyz/mcp · Contact: contact@agentreader.xyz

The problem

An agent's built-in fetch often comes back with something it can't use:

  • an empty JavaScript shell (single-page apps that render client-side)
  • a cookie or consent wall instead of the content
  • raw PDF bytes
  • token-heavy HTML full of menus, ads and scripts
  • a "200 OK" that is really a bot challenge or a paywall teaser

AgentReader returns the page's actual content as compact Markdown (or JSON with title, author, date, links and tables). Code blocks are kept verbatim. JSON URLs (APIs such as datasets-server.huggingface.co) come back pretty-printed, or as parsed data with format=json; .txt and .md files (including raw.githubusercontent.com) come back cleaned. When a site blocks bots or a page is paywalled, you get an honest error instead of junk, and you are not charged.

Connect over MCP (remote, Streamable HTTP)

Server URL:

https://agentreader.xyz/mcp

Claude Code

claude mcp add --transport http agentreader https://agentreader.xyz/mcp

Cursor and other MCP clients (e.g. ~/.cursor/mcp.json)

{
  "mcpServers": {
    "agentreader": {
      "url": "https://agentreader.xyz/mcp"
    }
  }
}

With prepaid credits, add a header: "headers": { "Authorization": "Bearer ar_..." }. No key is needed for the free tier. Apps that can't set headers (claude.ai, ChatGPT connectors) can use https://agentreader.xyz/mcp?api_key=ar_... as the connector URL; treat that URL like a password.

MCP clients that speak x402 can also pay per call inside the tool call (x402 MCP transport), without a key.

Tools

Tool What it does
read_url(url, format?, mode?, render?, extract?) Read a web page, feed, PDF, JSON, .txt or .md file as clean Markdown or JSON
search(query, limit?, lang?) Web search; returns titles, URLs and snippets to read next
get_balance() Show remaining free reads and credits
report_issue(url, reason, note?) Report a read that failed or looks wrong (free)

MCP Registry name: xyz.agentreader/agentreader

REST API

curl "https://agentreader.xyz/v1/read?url=https://en.wikipedia.org/wiki/Markdown"
# JSON with title, author, date, word count, links, tables and metadata
curl "https://agentreader.xyz/v1/read?url=https://en.wikipedia.org/wiki/Markdown&format=json"

# Web search
curl "https://agentreader.xyz/v1/search?q=markdown+spec&limit=5"

Useful options: format=markdown|json, mode=auto|article|links|full, render=auto|never|always (headless browser for JS-only pages), extract=title,author,date,price,... (structured fields from JSON-LD/OpenGraph/meta tags, no LLM).

Full reference: llms.txt · OpenAPI

Python: LangChain and LlamaIndex

pip install langchain-agentreader            # from langchain_agentreader import AgentReaderLoader
pip install llama-index-readers-agentreader  # from llama_index.readers.agentreader import AgentReaderWebReader

Source: agentreader-xyz/agentreader-python. Both work on the free tier without a key; set AGENTREADER_API_KEY for credits.

Pricing

  • Free: 5 reads per day, no signup, no key
  • Card packs: $3 for 2,000 reads or $10 for 7,000 reads + VAT where applicable, at https://agentreader.xyz/buy (one-time, no subscription, credits don't expire). The page issues your API key.
  • Crypto (x402): pay $0.005 per call in USDC on Base (REST or inside the MCP tool call), or buy prepaid credit bundles (500 reads for $1, 5,000 for $8) via POST https://agentreader.xyz/v1/credits/buy?bundle=500

Only successful reads are charged. Blocked sites, paywalled pages, timeouts and errors are free.

About this repository

AgentReader is a hosted service; its source code is not public. This repository holds documentation only. Questions, bugs or feedback: contact@agentreader.xyz

About

Web pages and PDFs as clean Markdown/JSON for AI agents, in far fewer tokens. Remote MCP server + REST API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors