Polygon x402 AI Data Agent
⚡ x402-cleanweb-agent
지저분한 웹페이지, YouTube 동영상, PDF 논문을 Polygon에서 순수하고 LLM-ready한 깨끗한 Markdown으로 변환하세요.
가입 없음. 구독 없음. 자율 AI 에이전트를 위한 진정한 M2M HTTP 402 마이크로페이먼트.
💡 왜 x402-cleanweb-agent인가?
기존 웹 스크래핑 및 데이터 추출 API는 비싼 월 $49 구독과 복잡한 API 키 관리를 강요합니다.
x402-cleanweb-agent는 자율 AI 에이전트, 스크래퍼, 개발자를 위해 이 문제를 해결합니다:
❌ 월 구독 없음: 쿼리한 만큼만 지불 (호출당 USDC $0.005 ~ $0.05).
❌ 가입 또는 API 키 불필요: 네이티브 HTTP 402 Payment Required M2M 프로토콜.
🤖 무인 AI 에이전트 준비: 암호화폐 지갑을 가진 AI 에이전트가 24/7 자율적으로 데이터를 구매할 수 있습니다.
⚡ 1초 미만 속도: 광고, 추적 스크립트, 잡음을 제거하고 순수하고 구조화된 Markdown을 반환합니다.
🪙 초저가스 수수료: Polygon PoS 기반 (< $0.005 네트워크 가스).
📊 토큰 절감 엔진: 원본 대비 정제된 토큰 감소율(평균 60~85% 절감)과 예상 LLM 프롬프트 비용 절감액($)을 계산합니다.
Related MCP server: ToolSnap MCP
🚀 라이브 데모 및 서비스 엔드포인트
🌐 Web3 DApp UI: https://x402-cleanweb-agent.onrender.com
📚 Swagger API Docs: https://x402-cleanweb-agent.onrender.com/docs
📂 GitHub Repo: https://github.com/nohosa001-pixel/x402-cleanweb-agent
서비스 | 엔드포인트 | 가격 | 출력 및 설명 |
🌐 웹 정제 |
| 0.01 USDC | 광고/노이즈 제거 + AI-ready Markdown + 토큰 절감 분석 |
🎬 YouTube 트랜스크립트 |
| 0.02 USDC | 타임스탬프가 포함된 전체 동영상 트랜스크립트를 Markdown 형식으로 제공 |
📑 PDF 논문 및 보고서 |
| 0.05 USDC | arXiv 논문 및 실적 보고서를 구조화된 Markdown으로 변환 |
📝 순수 일반 텍스트 |
| 0.005 USDC | 빠른 벡터 인덱싱을 위한 초경량 원본 텍스트 추출 |
🤖 무인 자율 AI 에이전트 통합 (Python SDK)
Polygon 지갑(개인 키)을 가진 AI 에이전트는 인간의 개입 없이 결제와 데이터 추출을 자율적으로 처리할 수 있습니다:
from autonomous_agent_client import AutonomousX402Agent
# 1. Initialize Autonomous Agent with Polygon Wallet
agent = AutonomousX402Agent(private_key="0xYOUR_AGENT_PRIVATE_KEY")
# 2. Autonomous Clean Web Extraction (0.01 USDC)
result = agent.clean_web("https://example.com/article")
print("AI-Ready Markdown:\n", result["markdown_content"])
print("Token Savings:", result["token_analytics"]["token_savings_percentage"])
# 3. Autonomous YouTube Transcript Extraction (0.02 USDC)
yt_result = agent.clean_youtube("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
print("YouTube Transcripts:\n", yt_result["markdown_transcript"])
# 4. Autonomous PDF Paper Extraction (0.05 USDC)
pdf_result = agent.clean_pdf("https://arxiv.org/pdf/2301.00001.pdf")
print("PDF Paper Markdown:\n", pdf_result["markdown_content"])🛠️ 작동 방식 (M2M 아키텍처)
sequenceDiagram
autonumber
actor Agent as Autonomous AI Agent
participant Server as x402 Gateway (FastAPI)
participant Polygon as Polygon Mainnet (Bor RPC)
participant Scraper as AI Data Cleaning Engine
Agent->>Server: GET /api/v1/clean-web?url=https://example.com
Note over Server: Check X-Payment-Tx header
Server-->>Agent: 402 Payment Required (Chain ID: 137, Recipient, Amount)
Agent->>Polygon: Send USDC Transfer (e.g. 0.01 USDC)
Polygon-->>Agent: Return Tx Hash (0xabc...123)
Agent->>Server: GET /api/v1/clean-web?url=... with Header [X-Payment-Tx: 0xabc...123]
Server->>Polygon: Verify Receipt, Event Logs, Recipient & Nonce
Polygon-->>Server: Tx Confirmed (Status: 1)
Server->>Scraper: Sanitize and Structure to Clean Markdown
Scraper-->>Server: Return Clean Markdown + Token Analytics
Server-->>Agent: 200 OK (Clean Markdown & Analytics JSON)⚡ 직접 cURL 빠른 시작
# Step 1: Query without payment to inspect 402 payment requirements
curl -i -X GET "https://x402-cleanweb-agent.onrender.com/api/v1/clean-web?url=https://example.com"
# Step 2: After sending USDC on Polygon, query with transaction hash
curl -X GET "https://x402-cleanweb-agent.onrender.com/api/v1/clean-web?url=https://example.com" \
-H "X-Payment-Tx: 0x<YOUR_POLYGON_TX_HASH>"샘플 응답
{
"status": "success",
"service": "clean-web",
"source_url": "https://example.com",
"title": "Example Domain",
"markdown_content": "# Example Domain\n\nThis domain is for use in illustrative examples...",
"token_analytics": {
"raw_html_estimated_tokens": 1250,
"clean_markdown_estimated_tokens": 280,
"tokens_saved": 970,
"token_savings_percentage": "77.6%",
"estimated_llm_cost_saved_usd": "$0.0029"
},
"processing_time_seconds": 0.38
}🔌 Model Context Protocol (MCP) 설정
옵션 1: 원클릭 자동 설치 프로그램 (권장)
JSON 파일을 편집하지 않고 Claude Desktop 및 Cursor를 자동으로 구성합니다:
# Windows
install_mcp.bat
# macOS / Linux
python install_mcp.py옵션 2: uvx로 실행 (설치 불필요)
claude_desktop_config.json 또는 Cursor에 직접 추가하세요:
{
"mcpServers": {
"polygon-x402-cleanweb": {
"command": "uvx",
"args": ["--from", "git+https://github.com/nohosa001-pixel/x402-cleanweb-agent", "x402-agent"]
}
}
}옵션 3: 수동 로컬 구성
{
"mcpServers": {
"polygon-x402-cleanweb": {
"command": "python",
"args": ["-u", "/absolute/path/to/x402-micro-agent/mcp_server.py"],
"env": {
"PYTHONUNBUFFERED": "1",
"POLYGON_RPC_URL": "https://polygon-bor-rpc.publicnode.com",
"SERVER_WALLET_ADDRESS": "0x255F9991233f86B29dB847c8d5b8CB9915e80dCf",
"USDC_CONTRACT_ADDRESS": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"
}
}
}
}노출된 MCP 도구
get_payment_info(): 가격 등급과 수신자 주소를 조회합니다.fetch_clean_markdown(url, payment_tx_hash): 웹 정제 스크래퍼 (0.01 USDC).fetch_youtube_transcript(url, language, payment_tx_hash): YouTube 트랜스크립트 추출기 (0.02 USDC).fetch_pdf_markdown(url, payment_tx_hash): PDF 연구 논문 변환기 (0.05 USDC).fetch_plain_text(url, payment_tx_hash): 경량 텍스트 스크래퍼 (0.005 USDC).
🛠️ 로컬 개발 및 실행
# 1. Clone repository
git clone https://github.com/nohosa001-pixel/x402-cleanweb-agent.git
cd x402-cleanweb-agent
# 2. Setup virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Start local server
python main.py
# Server running at: http://localhost:8000📜 온체인 계약 및 네트워크 세부 정보
네트워크: Polygon Mainnet (체인 ID:
137)토큰 계약 (USDC):
0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359수신자 재무부:
0x255F9991233f86B29dB847c8d5b8CB9915e80dCf
🤝 기여 및 라이선스
기여와 제안을 환영합니다!
GitHub에서 이슈 또는 풀 리퀘스트를 자유롭게 열어주세요: https://github.com/nohosa001-pixel/x402-cleanweb-agent/issues
MIT 라이선스 하에 배포됩니다.
Maintenance
Related MCP Servers
- AlicenseAqualityBmaintenancePay-per-use clean web reader for AI agents. URL in, markdown plus metadata out, in milliseconds. Settled per-call in USDC over x402 — no signup, no API keys.21852MIT
- AlicenseAqualityAmaintenanceContext-efficient MCP server for AI agents. fetch_extract reduces token usage by a median 98.1% (53,820 → 2,001 tokens) vs raw HTML — saves ~$0.156/call at Sonnet pricing. Pay $0.02 USDC on Base via x402. First call free per wallet. 10 always-free utility tools included.331MIT
- AlicenseNot gradedqualityBmaintenanceMCP server providing 17 keyless, pay-per-use web-data tools with signed-provenance receipts, enabling AI agents to autonomously fetch, extract, and verify web content on Base mainnet.44MIT

nanoparse-mcpofficial
AlicenseAqualityBmaintenanceMCP server that enables AI agents to fetch web content as clean, structured Markdown via NanoParse's hosted API, using x402 micropayments in USDC on Base.1253MIT
Related MCP Connectors
Pay-per-call web scraping for AI agents via x402 on Base USDC. Six tools, no signup.
Web intelligence for AI agents: fetch, render, extract, research. x402 micropayments, no API keys.
Scrape, crawl, map and extract the web. Pay per call in USDC, no account or API key.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nohosa001-pixel/x402-cleanweb-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server