다양한 RSS 피드에서 콘텐츠를 검색, 가져오고 요약할 수 있는 FastMCP 기반 RSS 뉴스 수집 및 처리 에이전트입니다.
특징
- 모든 웹사이트의 RSS 피드를 찾아보세요
- RSS 피드에서 항목 가져오기
- 피드 항목에서 콘텐츠 추출 및 형식 지정
- 모든 URL에서 웹 콘텐츠 추출 및 처리
- 키워드로 뉴스 기사 검색
- 뉴스 기사에 대한 요약 생성
- 카테고리 및 국가별 최신 뉴스를 받아보세요
설치
- 저장소를 복제합니다
- 필요한 종속성을 설치하세요:
지엑스피1
- 환경 변수가 필요한 경우
.env
파일을 만듭니다(선택 사항)
용법
MCP 서버 시작
이렇게 하면 다양한 RSS 관련 도구를 제공하는 MCP 서버가 시작됩니다.
사용 가능한 도구
- get_rss_feed_entries : RSS 피드 URL에서 항목을 가져옵니다.
- discover_rss_feeds : 웹사이트에서 사용 가능한 RSS 피드를 찾습니다.
- download_feed_content : 피드 항목의 콘텐츠를 다운로드하고 처리합니다.
- fetch_webpage : 고급 기술을 사용하여 모든 웹 페이지 URL에서 주요 콘텐츠를 추출합니다(신규)
- search_news_by_keyword : 키워드를 사용하여 여러 피드에서 뉴스 기사를 검색합니다.
- create_news_summary : 뉴스 기사에 대한 요약을 생성합니다.
- get_top_news_from_category : 특정 카테고리 및 국가의 주요 뉴스를 가져옵니다.
예시
response = mcp.invoke("discover_rss_feeds", {"website_url": "https://www.theguardian.com"})
print(f"Found {response['feeds_count']} feeds")
for feed in response['feeds']:
print(f"- {feed['title']}: {feed['url']}")
키워드로 뉴스 기사 받기
response = mcp.invoke("search_news_by_keyword", {
"keyword": "climate change",
"max_results": 5
})
for article in response['results']:
print(f"- {article['title']} ({article['source']})")
print(f" Link: {article['link']}")
print()
모든 웹 페이지에서 콘텐츠 추출
response = mcp.invoke("fetch_webpage", {
"url": "https://example.com/article",
"output_format": "markdown",
"include_images": True
})
print(f"Title: {response['title']}")
print(f"Extraction method: {response['extracted_by']}")
print(f"Content preview: {response['content'][:200]}...")
카테고리별 최신 뉴스 받기
response = mcp.invoke("get_top_news_from_category", {
"category": "technology",
"country": "us",
"max_results": 3
})
for article in response['results']:
print(f"- {article['title']} ({article['source']})")
클라이언트 예
이 프로젝트에는 모든 MCP 서버 도구에 쉽게 액세스할 수 있는 명령줄 클라이언트( client_example.py
)가 포함되어 있습니다.
# Get feed entries
python client_example.py feed https://www.theguardian.com/international/rss
# Search news by keyword
python client_example.py search "artificial intelligence"
# Extract content from a webpage with advanced extraction
python client_example.py webpage https://example.com/article --format markdown --images --save
# Get news by category
python client_example.py category technology --country us
기여하다
기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.