Integrates with Codecov for test coverage reporting and tracking, as shown by the project badge in the README
Supports containerized deployment with Docker, including built-in Docker Compose configuration for orchestrating the server and its dependencies
Uses .ENV files for configuration management, allowing customization of database connections and API settings
Integrates with Git for version control and development workflows including feature branching
Leverages GitHub for CI/CD pipelines, issue tracking, wiki documentation, and community discussions
Uses Make for development automation including testing, formatting, and deployment commands
Integrates with pre-commit for automated quality checks before code submission
Exposes Prometheus metrics via a /metrics endpoint for monitoring server performance
Built on Python 3.11+, leveraging its ecosystem for data analysis and market statistics processing
Uses Redis for caching and performance optimization of market data retrieval
Incorporates Shields.io badges for displaying project status information
Stores time-series market data in TimescaleDB for efficient querying and analysis of historical market statistics
📊 MCP Market Statistics Server
한국 주식시장의 종합적인 통계 데이터와 시장 분석 정보를 제공하는 MCP(Model Context Protocol) 서버입니다.
✨ 주요 기능
🏢 시장 데이터
- 실시간 지수 현황: KOSPI, KOSDAQ, KOSPI200 등
- 시장 전체 통계: 시가총액, 거래대금, 상승/하락 종목 수
- 52주 신고가/신저가 통계 및 분석
📈 섹터별 분석
- 업종 로테이션 분석 및 추적
- 섹터별 밸류에이션 비교
- 리더/래거드 종목 식별
💰 투자자 동향
- 개인/기관/외국인 매매 동향
- 프로그램 매매 현황 분석
- 스마트머니 추종 지표
🌊 시장 심리 지표
- Fear & Greed Index (한국판)
- Put/Call Ratio 분석
- 변동성 지수 (VKOSPI)
- 뉴스 감성 분석
🔍 고급 분석
- 시장 이상 징후 탐지 - AI 기반 이상 패턴 감지
- 시장 국면 판단 - 불장/곰장/횡보장 구분
- 유동성 분석 - 시장 깊이 및 유동성 측정
- 상관관계 매트릭스 - 자산 간 상관관계 분석
- 패턴 인식 - 차트 패턴 및 기술적 지표 분석
- 다중 시간대 분석 - 여러 타임프레임 통합 분석
- 감정 분석 - 뉴스 및 소셜미디어 감정 분석
- 가격 예측 - 머신러닝 기반 가격 예측
- 리스크 평가 - 포트폴리오 리스크 분석
🚀 빠른 시작
사전 요구사항
- Python 3.11 이상
- TimescaleDB
- Redis
- Docker (선택사항)
설치
- 저장소 클론
- 가상환경 생성 및 활성화
- 의존성 설치
- 환경 변수 설정
Docker를 이용한 실행
개발 모드 실행
🛠️ 개발 가이드
프로젝트 구조
테스트 작성
이 프로젝트는 TDD(Test-Driven Development) 방법론을 따릅니다.
코드 품질
🔧 설정
환경 변수
변수명 | 설명 | 기본값 |
---|---|---|
TIMESCALE_DB_HOST | TimescaleDB 호스트 | localhost |
TIMESCALE_DB_PORT | TimescaleDB 포트 | 5432 |
TIMESCALE_DB_NAME | 데이터베이스 이름 | market_stats |
REDIS_HOST | Redis 호스트 | localhost |
REDIS_PORT | Redis 포트 | 6379 |
LOG_LEVEL | 로그 레벨 | INFO |
KRX_API_KEY | KRX API 키 | - |
데이터베이스 스키���
데이터베이스 스키마를 초기화하려면:
📡 API 사용법
MCP 도구 목록
기본 시장 데이터
get_market_overview
- 시장 전체 현황get_sector_statistics
- 섹터별 통계get_investor_flows
- 투자자별 매매 동향get_market_breadth
- 시장 폭 지표
고급 분석 도구
analyze_advanced_patterns
- 고급 패턴 인식 및 분석analyze_multi_timeframe
- 다중 시간대 분석analyze_correlations
- 상관관계 엔진predict_prices
- AI 기반 가격 예측analyze_sentiment
- 감정 분석detect_anomalies
- 시장 이상 징후 탐지assess_risks
- 리스크 평가get_market_sentiment
- 시장 심리 지표get_market_regime
- 시장 국면 판단
사용 예시
🔍 모니터링
헬스체크
메트릭
서버는 Prometheus 메트릭을 /metrics
엔드포인트에서 제공합니다.
로그
구조화된 JSON 로그를 사용하여 ELK 스택과 호환됩니다.
🤝 기여하기
- 이슈를 생성하여 기능 요청이나 버그를 리포트해주세요
- 포크하여 새로운 브랜치를 생성해주세요
- 변경사항을 커밋해주세요
- 테스트를 실행하고 통과하는지 확인해주세요
- 풀 리퀘스트를 생성해주세요
개발 워크플로우
📄 라이선스
이 프로젝트는 MIT 라이선스 하에 배포됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.
🙋♂️ 지원
- 문서: 프로젝트 위키
- 이슈: GitHub Issues
- 토론: GitHub Discussions
🏗️ 개발 현황
Phase 1-4: 기본 인프라 및 데이터 수집 (완료 ✅)
- MCP 서버 아키텍처
- 데이터 수집 파이프라인
- 기본 분석 도구
- 데이터베이스 및 캐싱
Phase 5: 고급 분석 시스템 (완료 ✅)
- AdvancedPatternRecognition: 차트 패턴, 캔들스틱, 하모닉 패턴 인식
- MultiTimeframeAnalyzer: 다중 시간대 통합 분석
- CorrelationEngine: 고급 상관관계 분석 (18개 분석 방법)
- PricePredictor: 머신러닝 기반 가격 예측
- SentimentAnalyzer: 뉴스 및 소셜미디어 감정 분석
- MarketAnomalyDetector: AI 기반 이상 패턴 탐지
- RiskAssessmentEngine: 포트폴리오 리스크 분석
Phase 6-10: 계산 모듈 및 최적화 (진행 예정)
- Calculator 모듈 구현
- Analyzer 모듈 구현
- Model 모듈 구현
- 성능 최적화
- 배포 및 운영
📊 프로젝트 통계
- 총 코드 라인: 15,000+ 라인
- 테스트 커버리지: 95%+
- 구현된 분석 방법: 100+ 개
- 지원 패턴: 50+ 종류
- TDD 방법론 적용으로 높은 코드 품질 보장
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides comprehensive statistics and advanced analysis tools for the Korean stock market, offering real-time index data, sector analysis, investor trend tracking, and AI-based market pattern recognition.
Related MCP Servers
- AsecurityAlicenseAqualityDeliver real-time investment research with extensive private and public market data.Last updated -1184755JavaScriptMIT License
- -securityFlicense-qualityA FastMCP-based service that provides stock data including historical prices, fundamental information, and financial news.Last updated -6Python
- -securityFlicense-qualityProvides 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
- -securityFlicense-qualityA FastMCP-based server that provides tools for analyzing stock market data, including concept sector strength, financial indicators, F10 information, market emotion indicators, and tracking limit-up stocks.Last updated -7Python