Skip to main content
Glama
bch1212

agentfetch-mcp

by bch1212

agentfetch-mcp

AI 에이전트를 위한 웹 인텔리전스 — 토큰 추정, 스마트 캐싱, 지능형 라우팅이 내장된 URL 가져오기 MCP 서버입니다.

License: MIT Python 3.11+

AgentFetch는 에이전트와 오픈 웹 사이의 가교 역할을 합니다. Jina, FireCrawl, pypdf 및 자체 캐싱 계층을 별도로 통합하는 대신, 에이전트가 하나의 MCP 도구를 호출하면 AgentFetch가 라우팅, 캐싱, 토큰 예산 관리 및 깔끔한 마크다운 추출을 자동으로 처리합니다.

이 저장소에는 오픈 소스 MCP 서버가 포함되어 있습니다. 호스팅된 API + 대시보드 + 결제 기능은 www.agentfetch.dev를 참조하세요.

주요 기능

도구

용도

fetch_url

URL 가져오기 → 깔끔한 마크다운 + 메타데이터 + 토큰 수 + 캐시 정보

estimate_tokens

가져오기 에 토큰 수를 확인하여 에이전트가 거대한 페이지에서 컨텍스트 창을 낭비하지 않도록 방지

fetch_multiple

최대 20개의 URL을 동시에 가져오기

search_and_fetch

웹 검색 + 상위 N개 결과를 한 번의 왕복으로 가져오기

AgentFetch는 내부적으로 URL을 가장 비용 효율적인 페처로 라우팅합니다:

  • Trafilatura (무료, 로컬): 표준 웹 페이지의 약 70% 처리

  • Jina Reader: 나머지 HTML 처리

  • FireCrawl: JS가 많은 페이지(Twitter/X, LinkedIn, Notion 등) 처리

  • pypdf: PDF 처리 (외부 비용 없음)

캐시는 6시간 TTL이 설정된 Redis를 사용하며, 직접 구축하거나 캐싱 없이 실행할 수도 있습니다.

Related MCP server: Fetch MCP Server

빠른 시작

PyPI에서 설치

pip install agentfetch-mcp

또는 복제 후 로컬에서 설치

git clone https://github.com/bch1212/agentfetch-mcp
cd agentfetch-mcp
pip install -e .

환경 변수 설정

jina.ai에서 무료 Jina Reader 키를 받으세요(월 100만 토큰 무료 티어). FireCrawl은 선택 사항이지만 JS가 많은 페이지에 권장됩니다.

export JINA_API_KEY=jina_xxx
export FIRECRAWL_API_KEY=fc-xxx       # optional
export REDIS_URL=redis://localhost:6379  # optional

Claude Desktop 또는 Claude Code에 추가

MCP 설정(~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 또는 Claude Code에서 claude mcp add 실행)을 편집하세요:

{
  "mcpServers": {
    "agentfetch": {
      "command": "python",
      "args": ["-m", "agentfetch.mcp.server"],
      "env": {
        "JINA_API_KEY": "jina_xxx",
        "FIRECRAWL_API_KEY": "fc-xxx"
      }
    }
  }
}

Claude를 재시작하세요. 네 가지 도구(fetch_url, estimate_tokens, fetch_multiple, search_and_fetch)가 자동으로 나타납니다.

독립형 서버로 실행

python -m agentfetch.mcp.server

이 서버는 stdio(데스크톱 통합을 위한 표준 전송 방식)를 통해 MCP를 지원합니다.

에이전트가 일반 web_fetch보다 AgentFetch를 선호하는 이유

기능

AgentFetch

일반 web_fetch

가져오기 전 토큰 추정

스마트 캐시 (6시간 TTL)

URL 유형별 자동 라우팅

JS 렌더링 페이지 처리

✓ (FireCrawl 사용)

부분 지원

PDF 추출

컨텍스트 예산에 맞춘 잘림

수동

예시

토큰 예산을 설정하여 가져오기

# Inside any MCP-aware agent (Claude Desktop, Claude Code, etc.)
result = fetch_url(
    url="https://news.ycombinator.com",
    max_tokens=2000,           # cap response size
    use_cache=True,            # serve from cache if <6h old
)
# result.markdown      → clean Markdown, ≤2000 tokens
# result.metadata      → title, author, word_count, language
# result.cache.hit     → True if served from cache
# result.fetch_info    → which fetcher ran, cost, duration

실행 전 추정하기

estimate = estimate_tokens(url="https://very-long-article.com")
if estimate.estimated_tokens and estimate.estimated_tokens < 5000:
    result = fetch_url(url="https://very-long-article.com")
else:
    # too big — skip or summarize via search_and_fetch with max_tokens_each
    pass

병렬 가져오기

results = fetch_multiple(
    urls=["https://docs.python.org/3/", "https://fastapi.tiangolo.com/", ...],
    max_tokens_each=1500,
)

설정

환경 변수

필수 여부

기본값

참고

JINA_API_KEY

권장

무료 티어로 월 약 100만 토큰 지원. 없으면 Trafilatura만 작동(페이지의 약 70%에 유용).

FIRECRAWL_API_KEY

선택

JS가 많은 도메인(Twitter, LinkedIn, Notion)에 필요. 가입 시 500 크레딧 무료 제공.

REDIS_URL

선택

Redis가 없으면 캐시 없이 실행됨.

CACHE_TTL_SECONDS

선택

21600 (6시간)

가져오기 결과에 대한 캐시 TTL.

개발

git clone https://github.com/bch1212/agentfetch-mcp
cd agentfetch-mcp
pip install -e ".[dev]"
pytest tests/

호스팅 버전

직접 키, Redis, 라우팅을 관리하고 싶지 않다면 www.agentfetch.dev의 호스팅 버전을 사용하세요:

  • 호출당 $0.001부터 시작하는 종량제 요금

  • 가입 시 500회 무료 가져오기 제공, 신용카드 불필요

  • 관리형 Redis 캐시, 페처 간 자동 장애 조치

  • 사용량 추적 및 청구서가 포함된 대시보드

호스팅된 API는 드롭인 REST와 동일하며, 응답 형태와 라우팅 로직이 같습니다. OSS MCP를 로컬에서 실행하고 호스팅된 API를 병렬로 실행하거나 언제든지 전환할 수 있습니다.

라이선스

MIT — LICENSE를 참조하세요.

이 저장소의 MCP 서버는 오픈 소스입니다. 호스팅 제품, 결제 및 운영 인프라는 별도의 (비공개) 저장소에 있습니다.

기여

PR을 환영합니다. 새로운 페처(예: Bright Data, ScrapingBee 등)를 추가하는 경우 agentfetch/core/fetchers/__init__.pyFetchResult 인터페이스를 준수하고 라우팅 로직에 비용을 추가해 주세요.

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Fast, token-efficient web content extraction tool that converts websites to clean Markdown for AI agents, featuring smart caching, content extraction with Mozilla Readability, and polite crawling capabilities.
    1
    1,299
    158
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables LLMs to retrieve and process web content by fetching URLs and converting HTML to markdown format. Supports chunked reading of large pages and can access both public websites and local networks.
    1
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables LLMs to retrieve and process web content by fetching URLs and converting HTML to markdown, with support for chunked reading and customizable user-agents.
    1
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables AI agents to fetch and render web pages (including JavaScript-heavy SPAs) with headless Chromium, extract readable content with Mozilla Readability, capture navigation links, download images, and return a clean markdown file path.
    12
    ISC

View all related MCP servers

Related MCP Connectors

  • Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.

  • Fetch any URL and get clean Markdown. Web scraping for AI agents.

  • Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.

View all MCP Connectors

Latest Blog Posts

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/bch1212/agentfetch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server