Files
auto-stock/mcp-server/.env.example

76 lines
2.6 KiB
Plaintext

# MCP Server Configuration
MCP_SERVER_HOST=0.0.0.0
MCP_SERVER_PORT=8001
DEBUG=false
# Claude AI Configuration
ANTHROPIC_API_KEY=your_anthropic_api_key_here
CLAUDE_MODEL=claude-3-5-sonnet-20241022
CLAUDE_MAX_TOKENS=4096
CLAUDE_TEMPERATURE=0.7
# Gemini AI Configuration (AI_PROVIDER=gemini 시 사용)
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.0-flash
GEMINI_MAX_TOKENS=1024
GEMINI_TEMPERATURE=0.3
# AI Provider (claude 또는 gemini)
AI_PROVIDER=gemini
# Backend API Configuration
BACKEND_API_URL=http://localhost:8000
BACKEND_API_TIMEOUT=30
# Korea Investment Securities API - Mode Selection
KIS_MODE=virtual # virtual (모의투자) 또는 real (실전투자)
# 모의투자 (Virtual Trading)
KIS_VIRTUAL_APP_KEY=your_virtual_app_key_here
KIS_VIRTUAL_APP_SECRET=your_virtual_app_secret_here
KIS_VIRTUAL_ACCOUNT_NO=your_virtual_account_number_here
KIS_VIRTUAL_URL=https://openapivts.koreainvestment.com:29443
# 실전투자 (Real Trading)
KIS_REAL_APP_KEY=your_real_app_key_here
KIS_REAL_APP_SECRET=your_real_app_secret_here
KIS_REAL_ACCOUNT_NO=your_real_account_number_here
KIS_REAL_URL=https://openapi.koreainvestment.com:9443
# 현재 활성 설정 (KIS_MODE에 따라 자동 선택됨)
KIS_APP_KEY=your_virtual_app_key_here
KIS_APP_SECRET=your_virtual_app_secret_here
KIS_ACCOUNT_NO=your_virtual_account_number_here
KIS_BASE_URL=https://openapivts.koreainvestment.com:29443
# ────────────────────────────────────────────────────────────────────
# CORS 설정 (이슈 5)
# MCP 서버는 서버-서버 통신 전용 → allow_credentials=False 고정
# 아래 환경변수로 허용 Origin을 명시적으로 제한한다.
#
# Docker Compose (backend 컨테이너에서 호출):
# MCP_CORS_ORIGINS=http://backend:8000
#
# 로컬 개발 (localhost에서 호출):
# MCP_CORS_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
#
# 기본값 (미설정 시): http://localhost:8000,http://127.0.0.1:8000,http://backend:8000
# ────────────────────────────────────────────────────────────────────
MCP_CORS_ORIGINS=http://localhost:8000,http://127.0.0.1:8000,http://backend:8000
# Tool Configuration
ENABLE_MARKET_DATA_TOOL=true
ENABLE_INDICATOR_TOOL=true
ENABLE_PORTFOLIO_TOOL=true
ENABLE_RULE_VALIDATION_TOOL=true
ENABLE_ORDER_EXECUTION_TOOL=true
ENABLE_NEWS_TOOL=true
# Rate Limiting
RATE_LIMIT_PER_MINUTE=60
RATE_LIMIT_PER_HOUR=1000
# Logging
LOG_LEVEL=info
LOG_FORMAT=json