Skip to main content
Glama

MCP News Collector

by whdghk1907

📰 MCP News Collector

한국 주식시장 뉴스 실시간 수집 및 분석을 위한 MCP 서버

🎯 프로젝트 개요

MCP News Collector는 한국 주식시장 관련 뉴스를 실시간으로 수집, 분석하여 투자 인사이트를 제공하는 MCP(Model Context Protocol) 서버입니다.

✨ 주요 기능

  • 🔄 실시간 뉴스 수집: 네이버, 다음, RSS 피드 등 다양한 소스
  • 🧠 AI 기반 분석: 감정 분석, 시장 영향도 예측, 루머 탐지
  • 📊 실시간 모니터링: WebSocket 기반 실시간 데이터 스트리밍
  • 🌐 REST API: FastAPI 기반 RESTful 엔드포인트
  • 🔧 MCP 통합: Claude 등 AI 어시스턴트와 원활한 연동

🏗️ 아키텍처

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Data Sources │ │ MCP Server │ │ AI Assistant │ │ │ │ │ │ │ │ • 네이버 뉴스 │────▶│ • 수집 엔진 │◀───│ • Claude │ │ • 다음 뉴스 │ │ • 분석 엔진 │ │ • ChatGPT │ │ • RSS 피드 │ │ • REST API │ │ • 기타 │ │ • 빅카인즈 │ │ • WebSocket │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────┘

🚀 빠른 시작

사전 요구사항

  • Python 3.11+
  • PostgreSQL 13+
  • Redis 6+

설치

# 1. 저장소 클론 git clone https://github.com/YOUR_USERNAME/mcp-news-collector.git cd mcp-news-collector # 2. 가상환경 생성 및 활성화 python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # 3. 의존성 설치 pip install -e . # 4. 환경변수 설정 cp .env.example .env # .env 파일을 편집하여 데이터베이스 및 API 설정 # 5. 데이터베이스 마이그레이션 alembic upgrade head # 6. 서버 실행 python -m src.server.main

MCP 클라이언트 연결

from mcp import Client # MCP 서버 연결 client = Client("stdio", ["python", "-m", "src.server.main"]) # 뉴스 수집 result = await client.call_tool("get_recent_news", { "keyword": "삼성전자", "limit": 10 })

📖 API 문서

MCP Tools

Tool설명파라미터
get_recent_news최근 뉴스 조회keyword, source, limit, hours
analyze_news_sentiment뉴스 감정 분석news_id, text, detail_level
analyze_news_impact시장 영향도 분석news_id, company, timeframe
detect_market_rumors루머 탐지news_id, threshold
monitor_news_stream실시간 뉴스 모니터링topics, filters

REST API

API 문서는 서버 실행 후 다음 URL에서 확인할 수 있습니다:

  • Swagger UI: http://localhost:8000/api/docs
  • ReDoc: http://localhost:8000/api/redoc
주요 엔드포인트
# 뉴스 조회 GET /api/v1/news?query=삼성전자&limit=10 # 감정 분석 POST /api/v1/analysis/sentiment { "news_ids": ["news_1", "news_2"], "options": {"include_confidence": true} } # 실시간 모니터링 상태 GET /api/v1/monitoring/status

🧪 테스트

# 전체 테스트 실행 pytest # 특정 모듈 테스트 pytest tests/unit/test_sentiment_analyzer.py # 커버리지 확인 pytest --cov=src --cov-report=html

테스트 현황

  • 전체 테스트: 169개 통과
  • 커버리지:
    • 감정 분석기: 92%
    • 시장 영향 분석기: 85%
    • 실시간 모니터링: 76%
    • 루머 탐지: 89%
    • 뉴스 요약: 90%

📊 개발 현황

Phase 별 진행 상황

  • Phase 1: 기초 인프라 구축 (완료)
  • Phase 2: 핵심 수집 시스템 (완료)
  • Phase 3: 분석 엔진 구현 (완료)
  • 🔄 Phase 4: API 및 통합 시스템 (75% 완료)
  • Phase 5: 최적화 및 배포 (예정)

자세한 개발 계획은 detailed-development-plan.md를 참조하세요.

🏗️ 프로젝트 구조

mcp-news-collector/ ├── src/ # 메인 소스 코드 │ ├── analysis/ # 분석 엔진 (감정, 영향도, 루머 탐지 등) │ ├── collectors/ # 뉴스 수집기 (네이버, 다음, RSS) │ ├── monitoring/ # 실시간 모니터링 시스템 │ ├── server/ # MCP 서버 및 REST API │ └── utils/ # 공통 유틸리티 ├── tests/ # 테스트 코드 │ ├── unit/ # 단위 테스트 │ └── integration/ # 통합 테스트 ├── docs/ # 문서 ├── configs/ # 설정 파일 └── scripts/ # 유틸리티 스크립트

🔧 개발 도구

코드 품질

# 코드 포맷팅 black src/ tests/ # 타입 체킹 mypy src/ # 린팅 pylint src/ # 보안 스캔 bandit -r src/

TDD 개발 프로세스

이 프로젝트는 엄격한 TDD(Test-Driven Development) 방법론을 따릅니다:

  1. Red: 실패하는 테스트 작성
  2. Green: 테스트를 통과시키는 최소한의 코드 작성
  3. Refactor: 코드 개선 및 최적화

🤝 기여하기

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

개발 가이드라인

  • 모든 새로운 기능은 테스트와 함께 개발
  • 코드 커버리지 80% 이상 유지
  • 타입 힌트 사용 필수
  • 문서화 철저히

📄 라이선스

이 프로젝트는 MIT 라이선스 하에 배포됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.

📞 문의

🙏 감사의 말


��� 이 프로젝트가 도움이 되셨다면 Star를 눌러주세요!

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Model Context Protocol server that collects and analyzes Korean stock market news in real-time, providing investment insights through AI-based analysis of sentiment, market impact, and rumor detection.

  1. 🎯 프로젝트 개요
    1. ✨ 주요 기능
    2. 🏗️ 아키텍처
  2. 🚀 빠른 시작
    1. 사전 요구사항
    2. 설치
    3. MCP 클라이언트 연결
  3. 📖 API 문서
    1. MCP Tools
    2. REST API
  4. 🧪 테스트
    1. 테스트 현황
  5. 📊 개발 현황
    1. Phase 별 진행 상황
  6. 🏗️ 프로젝트 구조
    1. 🔧 개발 도구
      1. 코드 품질
      2. TDD 개발 프로세스
    2. 🤝 기여하기
      1. 개발 가이드라인
    3. 📄 라이선스
      1. 📞 문의
        1. 🙏 감사의 말

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            Provides real-time access to global stock market data including current prices, historical charts, and company financial information through a Model Context Protocol (MCP) server for AI assistants.
            Last updated -
            TypeScript
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server for interacting with Korea Investment & Securities (KIS) REST API, enabling domestic and foreign stock trading, price checks, and account management.
            Last updated -
            10
            3
            Python
            MIT License
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server providing tools for querying A-share stock market data, including historical prices, financial reports, market indices, and macroeconomic indicators.
            Last updated -
            28
            323
            Python
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server built with FastMCP that provides financial data tools for AI agents, enabling them to access and analyze stock market information from Yahoo Finance through natural language queries.
            Last updated -
            2
            Python

          View all related MCP servers

          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/whdghk1907/mcp-news-collector'

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