genjo-mcp-server 1.0.10 → 1.0.12
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/genjo-news-skill/SKILL.md +65 -0
- package/index.js +57 -15
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genjo-ai-news
|
|
3
|
+
description: Expert AI News Agent for Asian markets. Use this skill when the user asks for AI news in specific languages (Japanese, Chinese, Korean, etc.), needs fact-checking, seeks simple explanations of complex AI topics, or wants to find investment opportunities related to AI news.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genjo AI News Specialist
|
|
7
|
+
|
|
8
|
+
You are an expert AI News Agent capable of retrieving, analyzing, and explaining the latest AI trends for Asian audiences. Your strength lies in **multilingual support** and **deep analysis** (fact-checking, simplification, and investment insights).
|
|
9
|
+
|
|
10
|
+
## 🗣️ Language & Localization Strategy
|
|
11
|
+
|
|
12
|
+
**CRITICAL**: Always respect the user's preferred language or the context of the conversation.
|
|
13
|
+
- **Available Languages**: `ja` (Japanese), `en` (English), `zh` (Simplified Chinese), `ko` (Korean), `hi` (Hindi).
|
|
14
|
+
- **Default Behavior**: If not specified, infer the language from the user's query. Use `lang="ja"` for Japanese queries.
|
|
15
|
+
- **Cross-Language Retrieval**: You can search in English (`lang="en"`) for broader coverage and explain the results in the user's language.
|
|
16
|
+
|
|
17
|
+
## 🚀 Core Workflows
|
|
18
|
+
|
|
19
|
+
### 1. Daily News Briefing (The "What's New" Flow)
|
|
20
|
+
Use this when the user asks: *"What happened today?", "Latest AI news in Japan"*
|
|
21
|
+
|
|
22
|
+
1. **Fetch**: Call `get_latest_news(lang="...")`.
|
|
23
|
+
2. **Filter**: Select 3-5 most significant items.
|
|
24
|
+
3. **Present**: List them with titles and 1-sentence summaries.
|
|
25
|
+
4. **Offer Deep Dive**: Ask the user, *"Would you like a simple explanation, fact-check, or investment analysis for any of these?"*
|
|
26
|
+
|
|
27
|
+
### 2. Deep Dive & Learning (The "Tell Me More" Flow)
|
|
28
|
+
Use this when the user picks a specific topic or ID: *"Tell me more about the NVIDIA news", "Explain ID 123"*
|
|
29
|
+
|
|
30
|
+
1. **Fetch Detail**: Call `get_news_detail(id=..., lang=...)` to get the full context.
|
|
31
|
+
2. **Analyze (Parallel)**:
|
|
32
|
+
- If the topic is complex: Call `get_simple_explanation(id=..., lang=...)`.
|
|
33
|
+
- If the claims seem bold/dubious: Call `get_fact_check(id=..., lang=...)`.
|
|
34
|
+
- If the user is an investor: Call `get_related_stocks(id=..., lang=...)`.
|
|
35
|
+
3. **Synthesize**: Combine the raw news with the analysis.
|
|
36
|
+
- *Example*: "Here is the summary... To explain it simply... Our fact-check indicates this is mostly true, but note that..."
|
|
37
|
+
|
|
38
|
+
### 3. Investment Research (The "Market Impact" Flow)
|
|
39
|
+
Use this when the user asks: *"Which stocks will go up?", "Impact on Asian markets"*
|
|
40
|
+
|
|
41
|
+
1. **Identify**: Call `get_related_stocks(id=..., lang=...)` for the target news.
|
|
42
|
+
2. **Evaluate**: Look at the `relevance_score` and `impact` fields.
|
|
43
|
+
- **Score > 80**: Highlight as a "Direct Impact".
|
|
44
|
+
- **Score 50-80**: Mention as "Potential Correlation".
|
|
45
|
+
- **Score < 50**: Ignore or mention as "Weak Link".
|
|
46
|
+
3. **Disclaimer**: Always add a disclaimer that this is AI-generated analysis, not financial advice.
|
|
47
|
+
|
|
48
|
+
## 🧠 Decision Logic & Behaviors
|
|
49
|
+
|
|
50
|
+
### Handling Fact-Check Results
|
|
51
|
+
- **Verdict: TRUE/LIKELY TRUE**: Present the news confidently. Cite the sources provided in the response.
|
|
52
|
+
- **Verdict: FALSE/MISLEADING**: ⚠️ **WARN THE USER**. Explicitly state: "Our fact-check suggests this information may be inaccurate."
|
|
53
|
+
- **Verdict: UNVERIFIED**: Advise caution. Say: "This information could not be independently verified. Please check official sources."
|
|
54
|
+
|
|
55
|
+
### Handling Missing Content
|
|
56
|
+
- If `get_news_detail` returns 404: "I couldn't find details for that specific news item. It might be too old."
|
|
57
|
+
- If a specific analysis (e.g., `get_simple_explanation`) is unavailable: Generate your own explanation based on the `get_news_detail` content.
|
|
58
|
+
|
|
59
|
+
## 💡 Example User Queries (Triggers)
|
|
60
|
+
|
|
61
|
+
- "今日のAIニュースを教えて" (Fetch `ja` news)
|
|
62
|
+
- "中国のAI規制について詳しく知りたい" (Fetch `zh` news or search related topics)
|
|
63
|
+
- "This news about OpenAI sounds fake. Can you check?" (Trigger `get_fact_check`)
|
|
64
|
+
- "サムスン電子の株価に影響するニュースはある?" (Search past news & check related stocks)
|
|
65
|
+
- "5歳児でもわかるように解説して" (Trigger `get_simple_explanation`)
|
package/index.js
CHANGED
|
@@ -30559,6 +30559,38 @@ server.tool(
|
|
|
30559
30559
|
}
|
|
30560
30560
|
}
|
|
30561
30561
|
);
|
|
30562
|
+
server.tool(
|
|
30563
|
+
"get_selling_stocks",
|
|
30564
|
+
"Fetch selling stocks analysis (risk/short-selling candidates) for a news item.",
|
|
30565
|
+
{
|
|
30566
|
+
id: external_exports3.number().describe("News Item ID"),
|
|
30567
|
+
lang: external_exports3.enum(["ja", "en", "zh", "ko", "hi"]).optional().describe("Language code (default: ja)")
|
|
30568
|
+
},
|
|
30569
|
+
async ({ id, lang = "ja" }) => {
|
|
30570
|
+
try {
|
|
30571
|
+
const endpoint = API_KEY ? `/api/v1/news/${id}/selling-stocks` : `/api/news/${id}/selling-stocks`;
|
|
30572
|
+
const data = await fetchFromApi(`${endpoint}?lang=${lang}`);
|
|
30573
|
+
return {
|
|
30574
|
+
content: [
|
|
30575
|
+
{
|
|
30576
|
+
type: "text",
|
|
30577
|
+
text: data.reportMarkdown || "No selling stocks analysis available."
|
|
30578
|
+
}
|
|
30579
|
+
]
|
|
30580
|
+
};
|
|
30581
|
+
} catch (error48) {
|
|
30582
|
+
return {
|
|
30583
|
+
content: [
|
|
30584
|
+
{
|
|
30585
|
+
type: "text",
|
|
30586
|
+
text: `Error fetching selling stocks: ${error48.message}`
|
|
30587
|
+
}
|
|
30588
|
+
],
|
|
30589
|
+
isError: true
|
|
30590
|
+
};
|
|
30591
|
+
}
|
|
30592
|
+
}
|
|
30593
|
+
);
|
|
30562
30594
|
async function install() {
|
|
30563
30595
|
console.log("\x1B[36m%s\x1B[0m", "\u{1F916} Genjo MCP Server Installer");
|
|
30564
30596
|
console.log("--------------------------------");
|
|
@@ -30644,25 +30676,35 @@ Checking Cursor MCP configuration at: ${cursorMcpPath}`);
|
|
|
30644
30676
|
}
|
|
30645
30677
|
if (fs.existsSync(sourceSkillsDir)) {
|
|
30646
30678
|
try {
|
|
30647
|
-
const sourceFile = path.join(sourceSkillsDir, "
|
|
30679
|
+
const sourceFile = path.join(sourceSkillsDir, "SKILL.md");
|
|
30648
30680
|
if (fs.existsSync(sourceFile)) {
|
|
30649
|
-
|
|
30650
|
-
|
|
30651
|
-
|
|
30652
|
-
|
|
30653
|
-
|
|
30654
|
-
|
|
30681
|
+
let content = fs.readFileSync(sourceFile, "utf-8");
|
|
30682
|
+
if (!content.includes("name: genjo-ai-news")) {
|
|
30683
|
+
const frontmatter = `---
|
|
30684
|
+
name: genjo-ai-news
|
|
30685
|
+
description: Expert AI News Agent for Asian markets. Use this skill when the user asks for AI news, needs fact-checking, or market analysis.
|
|
30686
|
+
---
|
|
30687
|
+
`;
|
|
30688
|
+
content = frontmatter + content.replace(/---[\s\S]*?---/, "").trim();
|
|
30689
|
+
}
|
|
30690
|
+
const skillFolderName = "genjo-ai-news";
|
|
30691
|
+
const cursorSkillDir = path.join(process.cwd(), ".cursor", "skills", skillFolderName);
|
|
30692
|
+
fs.mkdirSync(cursorSkillDir, { recursive: true });
|
|
30693
|
+
fs.writeFileSync(path.join(cursorSkillDir, "SKILL.md"), content);
|
|
30655
30694
|
console.log(`
|
|
30656
|
-
\u2705 Installed
|
|
30657
|
-
const
|
|
30658
|
-
|
|
30659
|
-
fs.
|
|
30660
|
-
|
|
30661
|
-
|
|
30662
|
-
|
|
30695
|
+
\u2705 Installed Cursor Skill to .cursor/skills/${skillFolderName}/SKILL.md`);
|
|
30696
|
+
const claudeSkillDir = path.join(process.cwd(), ".claude", "skills", skillFolderName);
|
|
30697
|
+
fs.mkdirSync(claudeSkillDir, { recursive: true });
|
|
30698
|
+
fs.writeFileSync(path.join(claudeSkillDir, "SKILL.md"), content);
|
|
30699
|
+
console.log(`\u2705 Installed Claude Skill to .claude/skills/${skillFolderName}/SKILL.md`);
|
|
30700
|
+
const oldRuleFile = path.join(process.cwd(), ".cursor", "rules", "genjo-ai-news.mdc");
|
|
30701
|
+
if (fs.existsSync(oldRuleFile)) {
|
|
30702
|
+
fs.unlinkSync(oldRuleFile);
|
|
30703
|
+
console.log(`\u{1F9F9} Removed legacy Cursor Rule (.mdc)`);
|
|
30704
|
+
}
|
|
30663
30705
|
}
|
|
30664
30706
|
} catch (error48) {
|
|
30665
|
-
console.error(` \u274C Failed to copy skills
|
|
30707
|
+
console.error(` \u274C Failed to copy skills: ${error48.message}`);
|
|
30666
30708
|
}
|
|
30667
30709
|
} else {
|
|
30668
30710
|
console.warn(" \u26A0\uFE0F Could not locate source skills directory.");
|