Skip to content

Commit 5e7587d

Browse files
committed
Merge remote-tracking branch 'upstream/vibe' into vibe
2 parents cd66777 + 6d6fda4 commit 5e7587d

File tree

9 files changed

+377
-338
lines changed

9 files changed

+377
-338
lines changed

packages/mcp/descriptions/githru-dev-description.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Deployed as a **remote MCP server** via Smithery, allowing direct connection and
1010
```
1111
githru-vscode-ext/
1212
└─ packages/
13-
└─ githru-mcp/
14-
├─ src/
15-
│ └─ index.ts
16-
├─ smithery.yml
17-
├─ package.json
18-
├─ tsconfig.json
19-
└─ .gitignore
13+
└─ mcp/
14+
├─ src/
15+
│ └─ index.ts
16+
├─ smithery.yml
17+
├─ package.json
18+
├─ tsconfig.json
19+
└─ .gitignore
2020
```
2121

2222
---
@@ -25,18 +25,7 @@ githru-vscode-ext/
2525

2626
Since githru-mcp is deployed on Smithery, you can use the remote MCP server directly without any build or local execution.
2727

28-
1. Access the remote server page
29-
👉 [https://server.smithery.ai/@Kyoungwoong/githru-vscode-ext/mcp](https://server.smithery.ai/@Kyoungwoong/githru-vscode-ext/mcp)
30-
31-
2. Click the **"Add to Claude"** button
32-
- Automatically registers to Claude Desktop.
33-
- If failed, you can manually add it in Claude Desktop settings.
34-
35-
3. Use MCP tools after restarting Claude Desktop
36-
- Available tool examples:
37-
- `ping` → Server health check (returns "pong")
38-
- `echo` → Returns input text as-is
39-
- `bmi_calculator` → Input height/weight → Returns BMI calculation result
28+
[Abount Details](./smithery-description.md)
4029

4130
---
4231

packages/mcp/descriptions/smithery-description.md

Lines changed: 63 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,87 @@
44
<strong>A powerful Model Context Protocol (MCP) server that provides advanced Git repository analysis and visualization tools designed to enhance team collaboration.</strong>
55
</p>
66

7-
## 🎯 Core Features
7+
---
88

9-
### 📊 Feature Impact Analyzer
9+
## 🚀 Overview
1010

11-
Analyzes GitHub Pull Requests to compute comprehensive impact metrics such as **scale, dispersion, chaos, isolation, lag, and coupling**.
12-
It features **long-tail–based analysis** to identify outlier file paths and generates detailed reports that help assess the impact of code changes.
11+
The **Githru MCP Server** extends Claude’s capabilities through the **Model Context Protocol (MCP)** — enabling real-time access to Git analytics, PR insights, and repository visualization.
1312

14-
#### Key Metrics:
13+
This MCP server is deployed on **[smithery.ai](https://smithery.ai)** and can be used directly from Claude’s MCP integration feature.
1514

16-
- **Scale** – Total lines of code changed
17-
- **Dispersion** – Number and diversity of affected files
18-
- **Chaos** – Temporal instability in code changes
19-
- **Isolation** – Degree of dependency separation
20-
- **Lag** – Time delay between code changes
21-
- **Coupling** – Inter-module dependency level
22-
- **Long-tail Analysis** – Detects and highlights unusual file path patterns
15+
---
2316

24-
### 🏆 Contributor Recommender
17+
## 🧩 Prerequisites
2518

26-
Intelligently recommends the most relevant contributors for a given file, branch, or Pull Request area by analyzing recent contribution history and activity patterns.
19+
Before you begin, make sure you have:
2720

28-
#### Recommendation Modes:
21+
- **Claude Desktop App** (with MCP support)
22+
👉 [Download here](https://claude.ai/download)
23+
- Access to the deployed **Githru MCP Server** on `smithery.ai`
2924

30-
- PR-based recommendations
31-
- File/Directory path–based (supports glob patterns)
32-
- Branch-based analysis
33-
- Custom time range analysis
25+
---
3426

35-
### 🧩 Author Work Pattern Analyzer
27+
## ⚙️ Setup in Claude
3628

37-
Analyzes a specific author’s development activity over a given time range to quantify their workload and commit behavior patterns.
29+
1. **Find the JSON configuration**
30+
- When you visit the [Githru MCP Server page on Smithery.ai](https://smithery.ai/server/@githru/githru-mcp-v1),
31+
click **“Connect → JSON”** to view the configuration details for our MCP server.
3832

39-
It computes metrics such as commits, insertions, deletions, and churn, and classifies commits into types like feat, fix, or refactor to reveal the author’s primary focus areas.
40-
Optionally, it generates a visual HTML report with charts for intuitive insight into the author’s contribution trends.
33+
2. **Insert the Githru MCP configuration**
34+
- Claude Desktop reads MCP server settings from the `claude_desktop_config.json` file.
35+
You need to modify the `args` path inside your local configuration file.
4136

42-
#### Key Metrics:
37+
**File locations:**
38+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
39+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
4340

44-
- **Commits** – Total number of commits made by the author
45-
- **Insertions / Deletions** – Lines of code added and removed
46-
- **Churn (±)** – Overall code change volume (insertions + deletions)
47-
- **Commit Type Mix** – Distribution of commit purposes (e.g. feat, fix, refactor, docs, etc.)
48-
- **Branch & Period Context** – Analyzes activity within a specific branch and time range
41+
```json
42+
{
43+
"mcpServers": {
44+
"githru-mcp-v1": {
45+
"command": "npx",
46+
"args": [
47+
"-y",
48+
"@smithery/cli@latest",
49+
"run",
50+
"@githru/githru-mcp-v1",
51+
"--key",
52+
"YOUR_API_KEY",
53+
"--profile",
54+
"PROFILE"
55+
],
56+
"env": {
57+
"GITHUB_TOKEN": "YOUR_GITHUB_TOKEN"
58+
}
59+
}
60+
}
61+
}
62+
```
63+
> 🧠 Tip: Replace the URL above with your actual Smithery MCP endpoint if it differs.
4964
50-
## 🌐 Multilingual Support
65+
3. Save and reconnecting
66+
- After saving, Claude will automatically connect to your Githru MCP instance.
67+
- so reconnect Claude
5168

52-
All tools support both **English** and **Korean** via the `locale` parameter (`en` or `ko`).
69+
---
5370

54-
## 📈 Visualization Options
71+
## 🧠 About Model Context Protocol (MCP)
5572

56-
- **Chart Mode**: Interactive HTML visualizations powered by **Chart.js**
73+
MCP is an open standard that lets Claude connect to external data and services safely and dynamically.
74+
Your Githru MCP Server acts as a “bridge” — providing contextual Git insights directly within the Claude chat interface.
5775

58-
## 🚀 Use Cases
76+
For more on MCP:
77+
👉 (https://modelcontextprotocol.io)[https://modelcontextprotocol.io]
5978

60-
- **Code Review Automation**: Analyze PR impact before merging
61-
- **Team Collaboration**: Identify the most relevant experts for code areas
62-
- **Development Insights**: Understand change patterns and dependency structures
79+
---
6380

64-
## 📦 Integration
81+
## 📄 License
6582

66-
Deploy remotely as an MCP server via **Smithery**, and connect directly with **Claude Desktop** for seamless integration with AI assistants.
83+
This project is licensed under the MIT License.
84+
85+
---
86+
87+
## 🤝 Contributing
88+
89+
We welcome contributions!
90+
If you’d like to improve the Githru MCP Server, please open a PR or file an issue on [GitHub](https://github.com/githru/githru-vscode-ext).

packages/mcp/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@types/react-dom": "^18.2.0",
4141
"copyfiles": "^2.4.1",
4242
"rimraf": "^6.0.1",
43-
"tsx": "^4.19.4"
43+
"tsx": "^4.19.4",
44+
"reflect-metadata": "^0.1.13"
4445
}
4546
}

packages/mcp/src/common/i18n.ts

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
import * as fs from 'fs';
2-
import * as path from 'path';
3-
import { fileURLToPath } from 'url';
1+
import * as fs from "fs";
2+
import * as path from "path";
3+
import { getDirname } from "./utils.js";
44

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = path.dirname(__filename);
5+
const __dirname = getDirname();
6+
7+
function findLocalesDir(): string {
8+
const cands = [
9+
path.resolve(__dirname, "../resources/locales"),
10+
path.resolve(__dirname, "../../resources/locales"),
11+
path.resolve(process.cwd(), "src/resources/locales"),
12+
path.resolve(process.cwd(), "resources/locales"),
13+
];
14+
for (const p of cands) {
15+
if (fs.existsSync(path.join(p, "en.json"))) return p;
16+
}
17+
throw new Error("Cannot locate locales directory. Tried:\n" + cands.map((p) => " - " + p).join("\n"));
18+
}
19+
20+
const LOCALES_DIR = findLocalesDir();
721

822
class I18nManager {
9-
private currentLocale = 'en';
23+
private currentLocale = "en";
1024
private translations: Record<string, any> = {};
1125
private fallbackTranslations: Record<string, any> = {};
1226

@@ -16,28 +30,28 @@ class I18nManager {
1630

1731
private loadFallback() {
1832
try {
19-
const fallbackPath = path.join(__dirname, '../resources/locales/en.json');
20-
const fallbackData = fs.readFileSync(fallbackPath, 'utf-8');
33+
const fallbackPath = path.join(LOCALES_DIR, "en.json");
34+
const fallbackData = fs.readFileSync(fallbackPath, "utf-8");
2135
this.fallbackTranslations = JSON.parse(fallbackData);
2236
this.translations = this.fallbackTranslations;
2337
} catch (error) {
24-
console.error('Failed to load fallback translations:', error);
38+
console.error("Failed to load fallback translations:", error);
2539
this.fallbackTranslations = {};
2640
this.translations = {};
2741
}
2842
}
2943

3044
setLocale(locale: string) {
3145
this.currentLocale = locale;
32-
33-
if (locale === 'en') {
46+
47+
if (locale === "en") {
3448
this.translations = this.fallbackTranslations;
3549
return;
3650
}
3751

3852
try {
39-
const localePath = path.join(__dirname, `../resources/locales/${locale}.json`);
40-
const localeData = fs.readFileSync(localePath, 'utf-8');
53+
const localePath = path.join(LOCALES_DIR, `${locale}.json`);
54+
const localeData = fs.readFileSync(localePath, "utf-8");
4155
this.translations = JSON.parse(localeData);
4256
} catch (error) {
4357
console.error(`Locale '${locale}' not found, using English fallback`);
@@ -46,32 +60,30 @@ class I18nManager {
4660
}
4761

4862
t(key: string, params?: Record<string, any>): string {
49-
const keys = key.split('.');
63+
const keys = key.split(".");
5064
let value: any = this.translations;
51-
65+
5266
for (const k of keys) {
5367
value = value?.[k];
5468
}
55-
56-
if (!value && this.currentLocale !== 'en') {
69+
70+
if (!value && this.currentLocale !== "en") {
5771
value = this.fallbackTranslations;
5872
for (const k of keys) {
5973
value = value?.[k];
6074
}
6175
}
62-
63-
if (!value || typeof value !== 'string') {
76+
77+
if (!value || typeof value !== "string") {
6478
return key;
6579
}
66-
80+
6781
const stringValue = value as string;
68-
82+
6983
if (params) {
70-
return stringValue.replace(/\{(\w+)\}/g, (match: string, param: string) =>
71-
params[param]?.toString() ?? match
72-
);
84+
return stringValue.replace(/\{(\w+)\}/g, (match: string, param: string) => params[param]?.toString() ?? match);
7385
}
74-
86+
7587
return stringValue;
7688
}
7789

0 commit comments

Comments
 (0)