genjo-mcp-server 1.0.8 → 1.0.10
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/index.js +22 -15
- package/package.json +1 -1
- package/genjo-news-skill/SKILL.md +0 -70
package/index.js
CHANGED
|
@@ -30638,33 +30638,40 @@ Checking Cursor MCP configuration at: ${cursorMcpPath}`);
|
|
|
30638
30638
|
} catch (error48) {
|
|
30639
30639
|
console.error(` \u274C Failed to update Cursor config: ${error48.message}`);
|
|
30640
30640
|
}
|
|
30641
|
-
let sourceSkillsDir = path.join(__dirname, "
|
|
30641
|
+
let sourceSkillsDir = path.join(__dirname, "skills");
|
|
30642
30642
|
if (!fs.existsSync(sourceSkillsDir)) {
|
|
30643
|
-
sourceSkillsDir = path.join(process.cwd(), "src", "mcp", "
|
|
30643
|
+
sourceSkillsDir = path.join(process.cwd(), "src", "mcp", "skills");
|
|
30644
30644
|
}
|
|
30645
|
-
const targetSkillsDir = path.join(process.cwd(), ".claude", "skills", "genjo-news-skill");
|
|
30646
|
-
const targetRulesDir = path.join(process.cwd(), ".cursor", "rules");
|
|
30647
30645
|
if (fs.existsSync(sourceSkillsDir)) {
|
|
30648
30646
|
try {
|
|
30649
|
-
|
|
30650
|
-
fs.
|
|
30651
|
-
|
|
30652
|
-
|
|
30653
|
-
|
|
30654
|
-
|
|
30655
|
-
|
|
30656
|
-
path.join(
|
|
30657
|
-
|
|
30658
|
-
|
|
30647
|
+
const sourceFile = path.join(sourceSkillsDir, "genjo-ai-news.mdc");
|
|
30648
|
+
if (fs.existsSync(sourceFile)) {
|
|
30649
|
+
const mdcContent = fs.readFileSync(sourceFile, "utf-8");
|
|
30650
|
+
const targetClaudeSkillsDir = path.join(process.cwd(), ".claude", "skills", "genjo-news-skill");
|
|
30651
|
+
fs.mkdirSync(path.dirname(targetClaudeSkillsDir), { recursive: true });
|
|
30652
|
+
const skillMdContent = mdcContent.replace(/---[\s\S]*?---/, "").trim();
|
|
30653
|
+
fs.mkdirSync(targetClaudeSkillsDir, { recursive: true });
|
|
30654
|
+
fs.writeFileSync(path.join(targetClaudeSkillsDir, "SKILL.md"), skillMdContent);
|
|
30655
|
+
console.log(`
|
|
30656
|
+
\u2705 Installed Claude Agent Skill to .claude/skills/`);
|
|
30657
|
+
const targetCursorRulesDir = path.join(process.cwd(), ".cursor", "rules");
|
|
30658
|
+
const targetRuleFile = path.join(targetCursorRulesDir, "genjo-ai-news.mdc");
|
|
30659
|
+
fs.mkdirSync(targetCursorRulesDir, { recursive: true });
|
|
30660
|
+
fs.writeFileSync(targetRuleFile, mdcContent);
|
|
30661
|
+
console.log(`\u2705 Installed Cursor Rule (Skill) to .cursor/rules/genjo-ai-news.mdc`);
|
|
30662
|
+
console.log(" (Note: Set to 'alwaysApply: false' to avoid being intrusive)");
|
|
30663
|
+
}
|
|
30659
30664
|
} catch (error48) {
|
|
30660
30665
|
console.error(` \u274C Failed to copy skills/rules: ${error48.message}`);
|
|
30661
30666
|
}
|
|
30667
|
+
} else {
|
|
30668
|
+
console.warn(" \u26A0\uFE0F Could not locate source skills directory.");
|
|
30662
30669
|
}
|
|
30663
30670
|
console.log("\n--------------------------------");
|
|
30664
30671
|
console.log("\u{1F389} Setup complete!");
|
|
30665
30672
|
console.log("1. Restart Claude Desktop / Cursor to apply MCP settings.");
|
|
30666
30673
|
console.log("2. Use 'Genjo' tools in your chat!");
|
|
30667
|
-
console.log("3. Cursor
|
|
30674
|
+
console.log("3. Cursor Skill is now available in .cursor/rules/genjo-ai-news.mdc");
|
|
30668
30675
|
}
|
|
30669
30676
|
async function main() {
|
|
30670
30677
|
const args = process.argv.slice(2);
|
package/package.json
CHANGED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: genjo-ai-news
|
|
3
|
-
description: Expert AI News Agent. 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**: The `lang` parameter specifies the **display language** of the content, NOT the geographic region or market.
|
|
13
|
-
|
|
14
|
-
- **Available Languages**: `ja` (Japanese), `en` (English), `zh` (Simplified Chinese), `ko` (Korean), `hi` (Hindi).
|
|
15
|
-
- **Default Behavior**: If not specified, infer the language from the user's query. Use `lang="ja"` for Japanese queries.
|
|
16
|
-
- **Cross-Language Retrieval**: You can search in English (`lang="en"`) for broader coverage and explain the results in the user's language.
|
|
17
|
-
- **Important Distinction**:
|
|
18
|
-
- "News about China" = Geographic/market topic (use any language to read about it)
|
|
19
|
-
- "News in Chinese" = Language preference (use `lang="zh"` to read in Chinese)
|
|
20
|
-
|
|
21
|
-
## 🚀 Core Workflows
|
|
22
|
-
|
|
23
|
-
### 1. Daily News Briefing (The "What's New" Flow)
|
|
24
|
-
Use this when the user asks: *"What happened today?", "Latest AI news in Japan"*
|
|
25
|
-
|
|
26
|
-
1. **Fetch**: Call `get_latest_news(lang="...")`.
|
|
27
|
-
2. **Filter**: Select 3-5 most significant items.
|
|
28
|
-
3. **Present**: List them with titles and 1-sentence summaries.
|
|
29
|
-
4. **Offer Deep Dive**: Ask the user, *"Would you like a simple explanation, fact-check, or investment analysis for any of these?"*
|
|
30
|
-
|
|
31
|
-
### 2. Deep Dive & Learning (The "Tell Me More" Flow)
|
|
32
|
-
Use this when the user picks a specific topic or ID: *"Tell me more about the NVIDIA news", "Explain ID 123"*
|
|
33
|
-
|
|
34
|
-
1. **Fetch Detail**: Call `get_news_detail(id=..., lang=...)` to get the full context.
|
|
35
|
-
2. **Analyze (Parallel)**:
|
|
36
|
-
- If the topic is complex: Call `get_simple_explanation(id=..., lang=...)`.
|
|
37
|
-
- If the claims seem bold/dubious: Call `get_fact_check(id=..., lang=...)`.
|
|
38
|
-
- If the user is an investor: Call `get_related_stocks(id=..., lang=...)`.
|
|
39
|
-
3. **Synthesize**: Combine the raw news with the analysis.
|
|
40
|
-
- *Example*: "Here is the summary... To explain it simply... Our fact-check indicates this is mostly true, but note that..."
|
|
41
|
-
|
|
42
|
-
### 3. Investment Research (The "Market Impact" Flow)
|
|
43
|
-
Use this when the user asks: *"Which stocks will go up?", "Impact on Asian markets"*
|
|
44
|
-
|
|
45
|
-
1. **Identify**: Call `get_related_stocks(id=..., lang=...)` for the target news.
|
|
46
|
-
2. **Evaluate**: Look at the `relevance_score` and `impact` fields.
|
|
47
|
-
- **Score > 80**: Highlight as a "Direct Impact".
|
|
48
|
-
- **Score 50-80**: Mention as "Potential Correlation".
|
|
49
|
-
- **Score < 50**: Ignore or mention as "Weak Link".
|
|
50
|
-
3. **Disclaimer**: Always add a disclaimer that this is AI-generated analysis, not financial advice.
|
|
51
|
-
|
|
52
|
-
## 🧠 Decision Logic & Behaviors
|
|
53
|
-
|
|
54
|
-
### Handling Fact-Check Results
|
|
55
|
-
- **Verdict: TRUE/LIKELY TRUE**: Present the news confidently. Cite the sources provided in the response.
|
|
56
|
-
- **Verdict: FALSE/MISLEADING**: ⚠️ **WARN THE USER**. Explicitly state: "Our fact-check suggests this information may be inaccurate."
|
|
57
|
-
- **Verdict: UNVERIFIED**: Advise caution. Say: "This information could not be independently verified. Please check official sources."
|
|
58
|
-
|
|
59
|
-
### Handling Missing Content
|
|
60
|
-
- If `get_news_detail` returns 404: "I couldn't find details for that specific news item. It might be too old."
|
|
61
|
-
- If a specific analysis (e.g., `get_simple_explanation`) is unavailable: Generate your own explanation based on the `get_news_detail` content.
|
|
62
|
-
|
|
63
|
-
## 💡 Example User Queries (Triggers)
|
|
64
|
-
|
|
65
|
-
- "今日のAIニュースを教えて" (Fetch `ja` news - user wants Japanese content)
|
|
66
|
-
- "中国のAI規制について詳しく知りたい" (Search past news about China's AI regulations, use user's preferred language `lang="ja"` or `lang="en"`)
|
|
67
|
-
- "中国語でAIニュースを読みたい" (Fetch `zh` news - user explicitly wants Chinese language)
|
|
68
|
-
- "This news about OpenAI sounds fake. Can you check?" (Trigger `get_fact_check`)
|
|
69
|
-
- "サムスン電子の株価に影響するニュースはある?" (Search past news & check related stocks)
|
|
70
|
-
- "5歳児でもわかるように解説して" (Trigger `get_simple_explanation`)
|