ragalgo-mcp-server 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -73
- package/dist/index.js +22 -239
- package/dist/tools/chart.d.ts +20 -35
- package/dist/tools/financials.d.ts +5 -16
- package/dist/tools/news.d.ts +14 -44
- package/dist/tools/news.js +37 -5
- package/dist/tools/research.d.ts +1 -9
- package/dist/tools/snapshots.d.ts +1 -13
- package/dist/tools/snapshots.js +1 -10
- package/dist/tools/tags.d.ts +14 -20
- package/dist/tools/trends.d.ts +1 -8
- package/package.json +40 -38
- package/.dockerignore +0 -4
- package/.mcpregistry_github_token +0 -1
- package/.mcpregistry_registry_token +0 -1
- package/Dockerfile +0 -23
- package/android-chrome-192x192.png +0 -0
- package/mcp-publisher.exe +0 -0
- package/server.json +0 -35
- package/smithery.yaml +0 -7
- package/src/index.ts +0 -477
- package/src/tools/chart.ts +0 -90
- package/src/tools/financials.ts +0 -67
- package/src/tools/news.ts +0 -67
- package/src/tools/research.ts +0 -40
- package/src/tools/snapshots.ts +0 -55
- package/src/tools/tags.ts +0 -61
- package/src/tools/trends.ts +0 -35
- package/src/utils/api.ts +0 -76
- package/tsconfig.json +0 -21
package/README.md
CHANGED
|
@@ -1,73 +1,119 @@
|
|
|
1
|
-
# RagAlgo: Dynamic RAG Engine for AI Reliability
|
|
2
|
-
|
|
3
|
-
> **
|
|
4
|
-
|
|
5
|
-
RagAlgo
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
###
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
# RagAlgo: Dynamic RAG Engine for AI Reliability
|
|
2
|
+
|
|
3
|
+
> **Global Beta**: Currently specialized in **Korean Finance (Stocks & Crypto)**, but built on a universal "Tag & Score" protocol applicable to any domain.
|
|
4
|
+
|
|
5
|
+
RagAlgo is not just a data API. It is a **"State-of-Truth" Provider** designed to prevent LLM hallucinations when dealing with **complex static knowledge** and **highly volatile dynamic data**.
|
|
6
|
+
|
|
7
|
+
### Why RagAlgo?
|
|
8
|
+
Traditional RAG (SQL/Vector DB) often fails to capture the "current context" of fast-changing reality. RagAlgo solves this by converting data into **Mathematical Scores** and **Standardized Tags**.
|
|
9
|
+
|
|
10
|
+
### Core Philosophy
|
|
11
|
+
1. **Sanitized Data:** We filter out noise so AI only ingests high-quality signals.
|
|
12
|
+
2. **Mathematical Scoring:** We translate complex movements into simple scores (e.g., `Chart Score: 9.5`), giving AI a clear ground truth to reason upon.
|
|
13
|
+
3. **Universal Protocol:** Our "Tag & Score" architecture is designed to **systematize and standardize any data domain**—including Legal, Medical, and Tech—into a format that AI can flawlessly understand and judge.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Flexible Integration: Scored vs. Non-Scored
|
|
17
|
+
We respect your freedom to build. Choose the mode that fits your pipeline:
|
|
18
|
+
|
|
19
|
+
| Mode | Target User | Description |
|
|
20
|
+
|------|-------------|-------------|
|
|
21
|
+
| **Scored API** (AI-Ready) | Builders & Startups | RagAlgo's math engines sanitize and score everything. Zero hallucinations. |
|
|
22
|
+
| **Non-Scored API** (Raw Mode) | Data Scientists & Engineers | Pure, sanitized data feeds for your custom pipelines. Perfect for fine-tuning, **n8n** automation, **LangChain** agents, or **Flowise** workflows. |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# RagAlgo MCP Server (KOR)
|
|
27
|
+
|
|
28
|
+
금융 뉴스 및 데이터 API를 MCP(Model Context Protocol)로 제공하는 서버입니다.
|
|
29
|
+
|
|
30
|
+
## 설치
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd mcp-server
|
|
34
|
+
npm install
|
|
35
|
+
npm run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 환경변수 설정
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Windows (PowerShell)
|
|
42
|
+
$env:RAGALGO_API_KEY="ragalgo_scored_test_a3ed9bd570436d46"
|
|
43
|
+
|
|
44
|
+
# Windows (CMD)
|
|
45
|
+
set RAGALGO_API_KEY=ragalgo_scored_test_a3ed9bd570436d46
|
|
46
|
+
|
|
47
|
+
# Mac/Linux
|
|
48
|
+
export RAGALGO_API_KEY="ragalgo_scored_test_a3ed9bd570436d46"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Claude Desktop 설정
|
|
52
|
+
|
|
53
|
+
`%APPDATA%\Claude\claude_desktop_config.json` 파일에 추가:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"ragalgo": {
|
|
59
|
+
"command": "node",
|
|
60
|
+
"args": ["C:\\coding\\RagAlgo\\mcp-server\\dist\\index.js"],
|
|
61
|
+
"env": {
|
|
62
|
+
"RAGALGO_API_KEY": "ragalgo_scored_test_a3ed9bd570436d46"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 제공 도구 (9개)
|
|
70
|
+
|
|
71
|
+
| 도구 | 설명 |
|
|
72
|
+
|------|------|
|
|
73
|
+
| `get_news` | 금융 뉴스 조회 (점수 제외) |
|
|
74
|
+
| `get_news_scored` | 금융 뉴스 조회 (점수 포함) |
|
|
75
|
+
| `get_chart_stock` | 주식 차트 점수 조회 |
|
|
76
|
+
| `get_chart_coin` | 코인 차트 점수 조회 |
|
|
77
|
+
| `get_financials` | 재무제표 조회 |
|
|
78
|
+
| `get_snapshots` | 일별 스냅샷 조회 |
|
|
79
|
+
| `search_tags` | 태그 검색 |
|
|
80
|
+
| `match_tags` | 텍스트→태그 매칭 |
|
|
81
|
+
| `get_trends` | 태그별 트렌드 조회 |
|
|
82
|
+
|
|
83
|
+
## 사용 예시
|
|
84
|
+
|
|
85
|
+
### Claude Desktop에서
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
"삼성전자 최근 뉴스 5개 보여줘"
|
|
89
|
+
→ get_news_scored(tag="삼성전자", limit=5)
|
|
90
|
+
|
|
91
|
+
"반도체 관련 호재 뉴스만 찾아줘"
|
|
92
|
+
→ get_news_scored(tag="반도체", verdict="bullish")
|
|
93
|
+
|
|
94
|
+
"005930 재무제표 보여줘"
|
|
95
|
+
→ get_financials(ticker="005930")
|
|
96
|
+
|
|
97
|
+
"비트코인 차트 분석"
|
|
98
|
+
→ get_chart_coin(ticker="KRW-BTC")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## API 키 종류
|
|
102
|
+
|
|
103
|
+
| Tier | API Key | 접근 가능 도구 |
|
|
104
|
+
|------|---------|---------------|
|
|
105
|
+
| nonscored | `ragalgo_nonscored_test_...` | get_news, get_financials, get_chart_*, search_tags, match_tags, get_trends |
|
|
106
|
+
| scored | `ragalgo_scored_test_...` | 위 전부 + get_news_scored, get_snapshots |
|
|
107
|
+
|
|
108
|
+
## 개발
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# 개발 모드 실행
|
|
112
|
+
npm run dev
|
|
113
|
+
|
|
114
|
+
# 빌드
|
|
115
|
+
npm run build
|
|
116
|
+
|
|
117
|
+
# 프로덕션 실행
|
|
118
|
+
npm start
|
|
119
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
11
11
|
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
|
|
12
12
|
import express from 'express';
|
|
13
13
|
import cors from 'cors';
|
|
14
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
14
15
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
15
16
|
// Tools
|
|
16
17
|
import { getNews, getNewsScored, NewsParamsSchema, NewsScoredParamsSchema } from './tools/news.js';
|
|
@@ -40,25 +41,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
40
41
|
name: 'search_tags',
|
|
41
42
|
description: `🔍 [TAG LOOKUP - USE FIRST] ALWAYS use this BEFORE other RagAlgo tools when user mentions any Korean stock, coin, or theme by NAME.
|
|
42
43
|
|
|
43
|
-
PRIMARY TOOL for converting names to tag_codes. Without correct tag_code, other tools will return inaccurate or empty results
|
|
44
|
-
|
|
45
|
-
ALWAYS use when you see:
|
|
46
|
-
- Korean stock names: 삼성전자, SK하이닉스, 네이버, 카카오, LG에너지솔루션
|
|
47
|
-
- Crypto names: 비트코인, 이더리움, 리플, 솔라나
|
|
48
|
-
- Theme/sector names: 반도체, AI, 2차전지, 바이오
|
|
49
|
-
|
|
50
|
-
Examples: "삼성전자" → STK005930, "비트코인" → CRY_BTC, "반도체" → THM_반도체
|
|
51
|
-
|
|
52
|
-
CRITICAL: Call this first, then use the returned tag_code in other tools.`,
|
|
53
|
-
inputSchema: {
|
|
54
|
-
type: 'object',
|
|
55
|
-
properties: {
|
|
56
|
-
q: { type: 'string', description: 'Search query (e.g., 삼성, Samsung, 반도체, AI, Bitcoin)' },
|
|
57
|
-
type: { type: 'string', enum: ['STOCK', 'SECTOR', 'THEME', 'CRYPTO'], description: 'Tag type filter (optional)' },
|
|
58
|
-
limit: { type: 'number', description: 'Result count (default: 20)' },
|
|
59
|
-
},
|
|
60
|
-
required: ['q'],
|
|
61
|
-
},
|
|
44
|
+
PRIMARY TOOL for converting names to tag_codes. Without correct tag_code, other tools will return inaccurate or empty results.`,
|
|
45
|
+
inputSchema: zodToJsonSchema(TagsSearchParamsSchema),
|
|
62
46
|
},
|
|
63
47
|
// ============================================================
|
|
64
48
|
// 📊 SUMMARY TOOL - MOST EFFICIENT!
|
|
@@ -68,268 +52,66 @@ CRITICAL: Call this first, then use the returned tag_code in other tools.`,
|
|
|
68
52
|
description: `📊 [DAILY SUMMARY - MOST EFFICIENT] PRIMARY TOOL for Korean market overview. ALWAYS use this FIRST for general market questions.
|
|
69
53
|
|
|
70
54
|
This is the ONLY tool that returns news + chart + sentiment COMBINED in one call.
|
|
71
|
-
Prefer this over calling get_news + get_chart separately - much more efficient
|
|
72
|
-
|
|
73
|
-
ALWAYS use when user asks:
|
|
74
|
-
- "오늘 시장 어때?" / "how's the market today?"
|
|
75
|
-
- "시장 요약해줘" / "market summary"
|
|
76
|
-
- "오늘 뉴스 좋은 거 뭐 있어?" / "what's hot today?"
|
|
77
|
-
- "전체적인 분위기 어때?" / "market sentiment"
|
|
78
|
-
|
|
79
|
-
[IMPORTANT] Snapshots are generated daily at 17:00 KST (market close).
|
|
80
|
-
If you request 'today' and get no results (because it's morning in KST), you MUST:
|
|
81
|
-
1. Fetch 'yesterday's snapshot for context.
|
|
82
|
-
2. Call 'get_news_scored' to get REAL-TIME news for the current day.
|
|
83
|
-
|
|
84
|
-
Returns per asset: news_count, avg_sentiment, bullish/bearish counts, chart_score, zone, price.
|
|
85
|
-
|
|
86
|
-
🔗 BEST PRACTICE - Combine with web_search:
|
|
87
|
-
1. Use get_snapshots FIRST for Korean market sentiment & chart data
|
|
88
|
-
2. Then use web_search for latest breaking news or global context
|
|
89
|
-
Example: get_snapshots → "시장 하락세" → web_search "한국 증시 하락 원인" → 종합 분석`,
|
|
90
|
-
inputSchema: {
|
|
91
|
-
type: 'object',
|
|
92
|
-
properties: {
|
|
93
|
-
tag_code: { type: 'string', description: 'Tag code for specific asset (e.g., STK005930, CRY_BTC). Leave empty for market-wide overview.' },
|
|
94
|
-
date: { type: 'string', description: 'Date (YYYY-MM-DD). Default: today' },
|
|
95
|
-
days: { type: 'number', description: 'Recent N days for time-series (default: 7)' },
|
|
96
|
-
limit: { type: 'number', description: 'Result count' },
|
|
97
|
-
},
|
|
98
|
-
},
|
|
55
|
+
Prefer this over calling get_news + get_chart separately - much more efficient!`,
|
|
56
|
+
inputSchema: zodToJsonSchema(SnapshotsParamsSchema),
|
|
99
57
|
},
|
|
100
58
|
// ============================================================
|
|
101
59
|
// 📰 NEWS TOOLS
|
|
102
60
|
// ============================================================
|
|
103
61
|
{
|
|
104
62
|
name: 'get_news_scored',
|
|
105
|
-
description: `📰 [KOREAN NEWS WITH SENTIMENT] PRIMARY news tool for Korean market. Returns news WITH AI sentiment scores (-10 to +10)
|
|
106
|
-
|
|
107
|
-
Use for Korean stock/crypto news with sentiment analysis.
|
|
108
|
-
|
|
109
|
-
[NOTE] This tool AUTOMATICALLY filters out 0-score (Neutral/Noise) news to provide clear signals.
|
|
110
|
-
If you need raw/neutral news, use 'get_news' instead.
|
|
111
|
-
|
|
112
|
-
Use when user asks:
|
|
113
|
-
- "삼성전자 뉴스" / "Samsung news"
|
|
114
|
-
- "호재 뉴스 보여줘" / "show me bullish news"
|
|
115
|
-
- "비트코인 악재 있어?" / "any bearish news on Bitcoin?"
|
|
116
|
-
- "오늘 좋은 뉴스" / "today's positive news"
|
|
117
|
-
|
|
118
|
-
Filter by: tag, verdict (bullish/bearish/neutral), score range
|
|
119
|
-
Returns: title, summary, sentiment_score, verdict, tags
|
|
120
|
-
|
|
121
|
-
🔗 BEST PRACTICE - Combine with web_search:
|
|
122
|
-
- RagAlgo: Sentiment-analyzed Korean market news (structured data)
|
|
123
|
-
- web_search: Real-time breaking news, global context, additional sources
|
|
124
|
-
Example workflow:
|
|
125
|
-
1. get_news_scored(tag="삼성전자") → 감정 분석된 뉴스 목록
|
|
126
|
-
2. web_search("삼성전자 최신 뉴스") → 실시간 속보
|
|
127
|
-
3. Combine both for comprehensive analysis!
|
|
128
|
-
|
|
129
|
-
TIP: For market overview, use get_snapshots instead (more efficient).
|
|
130
|
-
TIP: Use search_tags first to get exact tag name.`,
|
|
131
|
-
inputSchema: {
|
|
132
|
-
type: 'object',
|
|
133
|
-
properties: {
|
|
134
|
-
tag: { type: 'string', description: 'Tag CODE (e.g., STK005930). Use search_tags first to get this code!' },
|
|
135
|
-
source: { type: 'string', description: 'Source filter' },
|
|
136
|
-
search: { type: 'string', description: 'Title search keyword' },
|
|
137
|
-
min_score: { type: 'number', description: 'Min sentiment score (-10 to 10)' },
|
|
138
|
-
max_score: { type: 'number', description: 'Max sentiment score (-10 to 10)' },
|
|
139
|
-
verdict: { type: 'string', enum: ['bullish', 'bearish', 'neutral'], description: 'Sentiment verdict filter' },
|
|
140
|
-
limit: { type: 'number', description: 'Result count (default: 20)' },
|
|
141
|
-
},
|
|
142
|
-
},
|
|
63
|
+
description: `📰 [KOREAN NEWS WITH SENTIMENT] PRIMARY news tool for Korean market. Returns news WITH AI sentiment scores (-10 to +10).`,
|
|
64
|
+
inputSchema: zodToJsonSchema(NewsScoredParamsSchema),
|
|
143
65
|
},
|
|
144
66
|
{
|
|
145
67
|
name: 'get_news',
|
|
146
|
-
description: `📰 [KOREAN NEWS - NO SCORES] Basic news without sentiment analysis
|
|
147
|
-
|
|
148
|
-
Prefer get_news_scored over this for most use cases unless you want raw data including 0-score items.
|
|
149
|
-
|
|
150
|
-
Filter by: tag, source, date range
|
|
151
|
-
Returns: title, summary, url, tags, source`,
|
|
152
|
-
inputSchema: {
|
|
153
|
-
type: 'object',
|
|
154
|
-
properties: {
|
|
155
|
-
tag: { type: 'string', description: 'Tag filter (e.g., 삼성전자, 비트코인, 반도체)' },
|
|
156
|
-
source: { type: 'string', description: 'Source filter (e.g., 한경, 매경)' },
|
|
157
|
-
search: { type: 'string', description: 'Title search keyword' },
|
|
158
|
-
from_date: { type: 'string', description: 'Start date (YYYY-MM-DD)' },
|
|
159
|
-
to_date: { type: 'string', description: 'End date (YYYY-MM-DD)' },
|
|
160
|
-
limit: { type: 'number', description: 'Result count (default: 20, max: 100)' },
|
|
161
|
-
},
|
|
162
|
-
},
|
|
68
|
+
description: `📰 [KOREAN NEWS - NO SCORES] Basic news without sentiment analysis.`,
|
|
69
|
+
inputSchema: zodToJsonSchema(NewsParamsSchema),
|
|
163
70
|
},
|
|
164
71
|
// ============================================================
|
|
165
72
|
// 📈 CHART/TECHNICAL ANALYSIS TOOLS
|
|
166
73
|
// ============================================================
|
|
167
74
|
{
|
|
168
75
|
name: 'get_chart_stock',
|
|
169
|
-
description: `📈 [KOREAN STOCK CHARTS] PRIMARY tool for Korean stock technical analysis. Returns momentum scores and trend zones
|
|
170
|
-
|
|
171
|
-
ALWAYS use for Korean stock chart/technical questions.
|
|
172
|
-
|
|
173
|
-
[IMPORTANT] You MUST use 'search_tags' first to get the correct ticker (e.g., STK005930).
|
|
174
|
-
|
|
175
|
-
Use when user asks:
|
|
176
|
-
- "차트 강한 종목" / "stocks with strong momentum"
|
|
177
|
-
- "상승 추세 종목" / "uptrending stocks"
|
|
178
|
-
- "삼성전자 차트 어때?" / "how's Samsung's chart?"
|
|
179
|
-
- "기술적 분석" / "technical analysis"
|
|
180
|
-
|
|
181
|
-
Filter by: zone (STRONG_UP/UP_ZONE/NEUTRAL/DOWN_ZONE/STRONG_DOWN), market (KOSPI/KOSDAQ)
|
|
182
|
-
Returns: ticker, name, zone, oscillator_state, 5-day scores (d0-d4), last_price
|
|
183
|
-
|
|
184
|
-
🔗 COMBINE with web_search for deeper analysis:
|
|
185
|
-
1. get_chart_stock → "삼성전자 DOWN_ZONE"
|
|
186
|
-
2. web_search "삼성전자 주가 하락 이유" → 하락 원인 파악
|
|
187
|
-
3. Provide comprehensive technical + fundamental analysis!
|
|
188
|
-
|
|
189
|
-
TIP: Use search_tags first to get ticker from stock name.`,
|
|
190
|
-
inputSchema: {
|
|
191
|
-
type: 'object',
|
|
192
|
-
properties: {
|
|
193
|
-
ticker: { type: 'string', description: 'Stock ticker (e.g., 005930 for Samsung)' },
|
|
194
|
-
market: { type: 'string', enum: ['KOSPI', 'KOSDAQ'], description: 'Market type' },
|
|
195
|
-
zone: { type: 'string', enum: ['STRONG_UP', 'UP_ZONE', 'NEUTRAL', 'DOWN_ZONE', 'STRONG_DOWN'], description: 'Chart zone filter - use this to find strong/weak stocks' },
|
|
196
|
-
limit: { type: 'number', description: 'Result count' },
|
|
197
|
-
},
|
|
198
|
-
},
|
|
76
|
+
description: `📈 [KOREAN STOCK CHARTS] PRIMARY tool for Korean stock technical analysis. Returns momentum scores and trend zones.`,
|
|
77
|
+
inputSchema: zodToJsonSchema(ChartStockParamsSchema),
|
|
199
78
|
},
|
|
200
79
|
{
|
|
201
80
|
name: 'get_chart_coin',
|
|
202
|
-
description: `🪙 [CRYPTO CHARTS] PRIMARY tool for Korean crypto (Upbit) technical analysis
|
|
203
|
-
|
|
204
|
-
ALWAYS use for Korean crypto chart questions.
|
|
205
|
-
|
|
206
|
-
[IMPORTANT] You MUST use 'search_tags' first to get the correct ticker (e.g., CRY_BTC).
|
|
207
|
-
|
|
208
|
-
Use when user asks:
|
|
209
|
-
- "비트코인 차트" / "Bitcoin chart"
|
|
210
|
-
- "상승 중인 코인" / "pumping coins"
|
|
211
|
-
- "코인 기술적 분석" / "crypto technical analysis"
|
|
212
|
-
|
|
213
|
-
Filter by: zone (STRONG_UP/UP_ZONE/NEUTRAL/DOWN_ZONE/STRONG_DOWN)
|
|
214
|
-
Returns: ticker, name, zone, oscillator_state, 10-candle scores (c0-c9, 12h intervals), last_price
|
|
215
|
-
|
|
216
|
-
🔗 COMBINE with web_search for context:
|
|
217
|
-
1. get_chart_coin → "비트코인 UP_ZONE"
|
|
218
|
-
2. web_search "비트코인 상승 이유" → 상승 배경 파악`,
|
|
219
|
-
inputSchema: {
|
|
220
|
-
type: 'object',
|
|
221
|
-
properties: {
|
|
222
|
-
ticker: { type: 'string', description: 'Coin ticker (e.g., KRW-BTC for Bitcoin)' },
|
|
223
|
-
zone: { type: 'string', enum: ['STRONG_UP', 'UP_ZONE', 'NEUTRAL', 'DOWN_ZONE', 'STRONG_DOWN'], description: 'Chart zone filter' },
|
|
224
|
-
limit: { type: 'number', description: 'Result count' },
|
|
225
|
-
},
|
|
226
|
-
},
|
|
81
|
+
description: `🪙 [CRYPTO CHARTS] PRIMARY tool for Korean crypto (Upbit) technical analysis.`,
|
|
82
|
+
inputSchema: zodToJsonSchema(ChartCoinParamsSchema),
|
|
227
83
|
},
|
|
228
84
|
// ============================================================
|
|
229
85
|
// 6. 컨설팅 보고서 (신규!)
|
|
230
86
|
// ============================================================
|
|
231
87
|
{
|
|
232
88
|
name: 'get_research',
|
|
233
|
-
description: `📑 [RESEARCH] Get consulting firm reports (McKinsey, BCG, etc.)
|
|
234
|
-
|
|
235
|
-
Use for: "long-term trends", "sector outlook", "industry analysis"
|
|
236
|
-
Filter by: source, tag_code, market_outlook
|
|
237
|
-
|
|
238
|
-
Returns: AI summary in Korean, investment insights
|
|
239
|
-
Includes tag_codes for cross-referencing with news/charts.
|
|
240
|
-
|
|
241
|
-
⚠️ This tool returns FULL chunked text. Analyze it to answer user questions.`,
|
|
242
|
-
inputSchema: {
|
|
243
|
-
type: 'object',
|
|
244
|
-
properties: {
|
|
245
|
-
tag_code: { type: 'string', description: 'Tag code (required). Use search_tags first.' },
|
|
246
|
-
limit: { type: 'number', description: 'Result count (default: 5)' },
|
|
247
|
-
source: { type: 'string', description: 'Source filter (mckinsey, goldman, etc.)' },
|
|
248
|
-
},
|
|
249
|
-
required: ['tag_code'],
|
|
250
|
-
},
|
|
89
|
+
description: `📑 [RESEARCH] Get consulting firm reports (McKinsey, BCG, etc.)`,
|
|
90
|
+
inputSchema: zodToJsonSchema(ResearchParamsSchema),
|
|
251
91
|
},
|
|
252
92
|
// ============================================================
|
|
253
93
|
// 💰 FINANCIAL DATA TOOLS
|
|
254
94
|
// ============================================================
|
|
255
95
|
{
|
|
256
96
|
name: 'get_financials',
|
|
257
|
-
description: `💰 [KOREAN STOCK FUNDAMENTALS] PRIMARY tool for Korean stock financial data
|
|
258
|
-
|
|
259
|
-
ALWAYS use for Korean stock fundamental analysis.
|
|
260
|
-
|
|
261
|
-
Use when user asks:
|
|
262
|
-
- "삼성전자 재무제표" / "Samsung financials"
|
|
263
|
-
- "PER 낮은 종목" / "low PER stocks"
|
|
264
|
-
- "ROE 높은 기업" / "high ROE companies"
|
|
265
|
-
- "저평가 종목" / "undervalued stocks"
|
|
266
|
-
|
|
267
|
-
Returns: PER, PBR, ROE, ROA, revenue, operating_income, net_income, debt_ratio, dividend_yield
|
|
268
|
-
|
|
269
|
-
🔗 COMBINE with web_search:
|
|
270
|
-
1. get_financials → "PER 5.2, ROE 15%"
|
|
271
|
-
2. web_search "삼성전자 실적 전망" → 미래 실적 예측`,
|
|
272
|
-
inputSchema: {
|
|
273
|
-
type: 'object',
|
|
274
|
-
properties: {
|
|
275
|
-
ticker: { type: 'string', description: 'Stock ticker (e.g., 005930)' },
|
|
276
|
-
period: { type: 'string', description: 'Quarter (e.g., 2024Q3)' },
|
|
277
|
-
market: { type: 'string', enum: ['KOSPI', 'KOSDAQ'], description: 'Market type' },
|
|
278
|
-
periods: { type: 'number', description: 'Recent N quarters (default: 4)' },
|
|
279
|
-
limit: { type: 'number', description: 'Result count' },
|
|
280
|
-
},
|
|
281
|
-
},
|
|
97
|
+
description: `💰 [KOREAN STOCK FUNDAMENTALS] PRIMARY tool for Korean stock financial data.`,
|
|
98
|
+
inputSchema: zodToJsonSchema(FinancialsParamsSchema),
|
|
282
99
|
},
|
|
283
100
|
// ============================================================
|
|
284
101
|
// 📉 TREND TOOLS
|
|
285
102
|
// ============================================================
|
|
286
103
|
{
|
|
287
104
|
name: 'get_trends',
|
|
288
|
-
description: `📉 [SENTIMENT TRENDS] Get historical sentiment trend for a specific asset over time
|
|
289
|
-
|
|
290
|
-
Use when user asks:
|
|
291
|
-
- "삼성전자 지난주 분위기" / "Samsung sentiment last week"
|
|
292
|
-
- "비트코인 추세" / "Bitcoin trend"
|
|
293
|
-
- "최근 7일간 뉴스 동향" / "news trend over 7 days"
|
|
294
|
-
|
|
295
|
-
REQUIRES tag_code - use search_tags first!
|
|
296
|
-
Returns: daily news_count and avg_sentiment_score over N days
|
|
297
|
-
|
|
298
|
-
🔗 COMBINE with web_search:
|
|
299
|
-
1. get_trends → "지난주 감정 -2.5로 하락"
|
|
300
|
-
2. web_search "삼성전자 지난주 이슈" → 하락 원인 파악`,
|
|
301
|
-
inputSchema: {
|
|
302
|
-
type: 'object',
|
|
303
|
-
properties: {
|
|
304
|
-
tag_code: { type: 'string', description: 'Tag code (e.g., STK005930, CRY_BTC) - REQUIRED. Use search_tags to find this first!' },
|
|
305
|
-
days: { type: 'number', description: 'Recent N days (default: 7, max: 30)' },
|
|
306
|
-
},
|
|
307
|
-
required: ['tag_code'],
|
|
308
|
-
},
|
|
105
|
+
description: `📉 [SENTIMENT TRENDS] Get historical sentiment trend for a specific asset over time.`,
|
|
106
|
+
inputSchema: zodToJsonSchema(TrendsParamsSchema),
|
|
309
107
|
},
|
|
310
108
|
// ============================================================
|
|
311
109
|
// 🏷️ AUTO-TAGGING TOOL
|
|
312
110
|
// ============================================================
|
|
313
111
|
{
|
|
314
112
|
name: 'match_tags',
|
|
315
|
-
description: `🏷️ [AUTO-TAG EXTRACTION] Extract stock/crypto/theme tags from any text
|
|
316
|
-
|
|
317
|
-
Use when:
|
|
318
|
-
- Analyzing what stocks/themes a news title mentions
|
|
319
|
-
- Auto-categorizing text content
|
|
320
|
-
- Finding related tags from a sentence
|
|
321
|
-
|
|
322
|
-
Input: any text (e.g., "삼성전자 HBM 대박 소식")
|
|
323
|
-
Returns: matched tags with confidence scores`,
|
|
324
|
-
inputSchema: {
|
|
325
|
-
type: 'object',
|
|
326
|
-
properties: {
|
|
327
|
-
text: { type: 'string', description: 'Text to analyze (e.g., "삼성전자 HBM 대박 소식")' },
|
|
328
|
-
types: { type: 'array', items: { type: 'string' }, description: 'Tag type filter (optional)' },
|
|
329
|
-
limit: { type: 'number', description: 'Result count (default: 10)' },
|
|
330
|
-
},
|
|
331
|
-
required: ['text'],
|
|
332
|
-
},
|
|
113
|
+
description: `🏷️ [AUTO-TAG EXTRACTION] Extract stock/crypto/theme tags from any text.`,
|
|
114
|
+
inputSchema: zodToJsonSchema(TagsMatchParamsSchema),
|
|
333
115
|
},
|
|
334
116
|
],
|
|
335
117
|
};
|
|
@@ -396,6 +178,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
396
178
|
}
|
|
397
179
|
});
|
|
398
180
|
// Start server
|
|
181
|
+
// Start server
|
|
399
182
|
async function main() {
|
|
400
183
|
// Check if running in stdio mode (command line argument or specific env var)
|
|
401
184
|
const isStdio = process.argv.includes('--stdio');
|
package/dist/tools/chart.d.ts
CHANGED
|
@@ -4,33 +4,30 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
export declare const ChartStockParamsSchema: z.ZodObject<{
|
|
6
6
|
ticker: z.ZodOptional<z.ZodString>;
|
|
7
|
-
market: z.ZodOptional<z.ZodEnum<
|
|
8
|
-
|
|
7
|
+
market: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
KOSPI: "KOSPI";
|
|
9
|
+
KOSDAQ: "KOSDAQ";
|
|
10
|
+
}>>;
|
|
11
|
+
zone: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
STRONG_UP: "STRONG_UP";
|
|
13
|
+
UP_ZONE: "UP_ZONE";
|
|
14
|
+
NEUTRAL: "NEUTRAL";
|
|
15
|
+
DOWN_ZONE: "DOWN_ZONE";
|
|
16
|
+
STRONG_DOWN: "STRONG_DOWN";
|
|
17
|
+
}>>;
|
|
9
18
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
10
|
-
},
|
|
11
|
-
limit: number;
|
|
12
|
-
ticker?: string | undefined;
|
|
13
|
-
market?: "KOSPI" | "KOSDAQ" | undefined;
|
|
14
|
-
zone?: "STRONG_UP" | "UP_ZONE" | "NEUTRAL" | "DOWN_ZONE" | "STRONG_DOWN" | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
limit?: number | undefined;
|
|
17
|
-
ticker?: string | undefined;
|
|
18
|
-
market?: "KOSPI" | "KOSDAQ" | undefined;
|
|
19
|
-
zone?: "STRONG_UP" | "UP_ZONE" | "NEUTRAL" | "DOWN_ZONE" | "STRONG_DOWN" | undefined;
|
|
20
|
-
}>;
|
|
19
|
+
}, z.core.$strip>;
|
|
21
20
|
export declare const ChartCoinParamsSchema: z.ZodObject<{
|
|
22
21
|
ticker: z.ZodOptional<z.ZodString>;
|
|
23
|
-
zone: z.ZodOptional<z.ZodEnum<
|
|
22
|
+
zone: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
STRONG_UP: "STRONG_UP";
|
|
24
|
+
UP_ZONE: "UP_ZONE";
|
|
25
|
+
NEUTRAL: "NEUTRAL";
|
|
26
|
+
DOWN_ZONE: "DOWN_ZONE";
|
|
27
|
+
STRONG_DOWN: "STRONG_DOWN";
|
|
28
|
+
}>>;
|
|
24
29
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
25
|
-
},
|
|
26
|
-
limit: number;
|
|
27
|
-
ticker?: string | undefined;
|
|
28
|
-
zone?: "STRONG_UP" | "UP_ZONE" | "NEUTRAL" | "DOWN_ZONE" | "STRONG_DOWN" | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
limit?: number | undefined;
|
|
31
|
-
ticker?: string | undefined;
|
|
32
|
-
zone?: "STRONG_UP" | "UP_ZONE" | "NEUTRAL" | "DOWN_ZONE" | "STRONG_DOWN" | undefined;
|
|
33
|
-
}>;
|
|
30
|
+
}, z.core.$strip>;
|
|
34
31
|
export type ChartStockParams = z.infer<typeof ChartStockParamsSchema>;
|
|
35
32
|
export type ChartCoinParams = z.infer<typeof ChartCoinParamsSchema>;
|
|
36
33
|
export declare function getChartStock(params: ChartStockParams): Promise<{
|
|
@@ -42,12 +39,6 @@ export declare function getChartStock(params: ChartStockParams): Promise<{
|
|
|
42
39
|
scores: number[];
|
|
43
40
|
zone: string;
|
|
44
41
|
oscillator_state: string;
|
|
45
|
-
analysis?: {
|
|
46
|
-
weekly_zone: string;
|
|
47
|
-
daily_momentum: string;
|
|
48
|
-
daily_signal: string;
|
|
49
|
-
};
|
|
50
|
-
outlook?: string;
|
|
51
42
|
last_price: number;
|
|
52
43
|
updated_at: string;
|
|
53
44
|
} | Array<{
|
|
@@ -66,12 +57,6 @@ export declare function getChartCoin(params: ChartCoinParams): Promise<{
|
|
|
66
57
|
scores: number[];
|
|
67
58
|
zone: string;
|
|
68
59
|
oscillator_state: string;
|
|
69
|
-
analysis?: {
|
|
70
|
-
weekly_zone: string;
|
|
71
|
-
daily_momentum: string;
|
|
72
|
-
daily_signal: string;
|
|
73
|
-
};
|
|
74
|
-
outlook?: string;
|
|
75
60
|
last_price: number;
|
|
76
61
|
updated_at: string;
|
|
77
62
|
} | Array<{
|
|
@@ -5,25 +5,14 @@ import { z } from 'zod';
|
|
|
5
5
|
export declare const FinancialsParamsSchema: z.ZodObject<{
|
|
6
6
|
ticker: z.ZodOptional<z.ZodString>;
|
|
7
7
|
period: z.ZodOptional<z.ZodString>;
|
|
8
|
-
market: z.ZodOptional<z.ZodEnum<
|
|
8
|
+
market: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
KOSPI: "KOSPI";
|
|
10
|
+
KOSDAQ: "KOSDAQ";
|
|
11
|
+
}>>;
|
|
9
12
|
periods: z.ZodDefault<z.ZodNumber>;
|
|
10
13
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
11
14
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
12
|
-
},
|
|
13
|
-
limit: number;
|
|
14
|
-
offset: number;
|
|
15
|
-
periods: number;
|
|
16
|
-
ticker?: string | undefined;
|
|
17
|
-
market?: "KOSPI" | "KOSDAQ" | undefined;
|
|
18
|
-
period?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
limit?: number | undefined;
|
|
21
|
-
offset?: number | undefined;
|
|
22
|
-
ticker?: string | undefined;
|
|
23
|
-
market?: "KOSPI" | "KOSDAQ" | undefined;
|
|
24
|
-
period?: string | undefined;
|
|
25
|
-
periods?: number | undefined;
|
|
26
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
27
16
|
export type FinancialsParams = z.infer<typeof FinancialsParamsSchema>;
|
|
28
17
|
export declare function getFinancials(params: FinancialsParams): Promise<{
|
|
29
18
|
success: boolean;
|