@andrebuzeli/git-mcp 7.2.1 → 7.2.3
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/dist/index.js
CHANGED
|
@@ -36,12 +36,8 @@ async function main() {
|
|
|
36
36
|
// Load optional mcp.json configuration (will populate process.env if values present)
|
|
37
37
|
(0, config_1.loadMCPConfig)();
|
|
38
38
|
const providerManager = new providerManager_1.ProviderManager();
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
// Only log validation in debug mode (prevents JSON parsing errors in MCP clients)
|
|
42
|
-
if (process.env.DEBUG) {
|
|
43
|
-
console.error('Provider validation:', JSON.stringify(validation, null, 2));
|
|
44
|
-
}
|
|
39
|
+
// Skip validation on startup to prevent hanging (validation happens on first use)
|
|
40
|
+
// Provider validation moved to lazy initialization
|
|
45
41
|
// Register all 22 Git tools
|
|
46
42
|
const tools = [
|
|
47
43
|
new gitWorkflow_1.GitWorkflowTool(),
|
|
@@ -79,7 +75,7 @@ async function main() {
|
|
|
79
75
|
// Create MCP Server with STDIO transport
|
|
80
76
|
const server = new index_1.Server({
|
|
81
77
|
name: '@andrebuzeli/git-mcp',
|
|
82
|
-
version: '7.2.
|
|
78
|
+
version: '7.2.3',
|
|
83
79
|
});
|
|
84
80
|
// Register tool list handler
|
|
85
81
|
server.setRequestHandler(types_1.ListToolsRequestSchema, async () => {
|
|
@@ -19,9 +19,16 @@ class ProviderManager {
|
|
|
19
19
|
}
|
|
20
20
|
async validateConfiguredProviders() {
|
|
21
21
|
const results = {};
|
|
22
|
+
const timeout = 5000; // 5 second timeout per provider
|
|
22
23
|
if (this.github) {
|
|
23
24
|
try {
|
|
24
|
-
|
|
25
|
+
const controller = new AbortController();
|
|
26
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
27
|
+
await Promise.race([
|
|
28
|
+
this.github.rest.users.getAuthenticated(),
|
|
29
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), timeout))
|
|
30
|
+
]);
|
|
31
|
+
clearTimeout(timeoutId);
|
|
25
32
|
results.github = { ok: true };
|
|
26
33
|
}
|
|
27
34
|
catch (err) {
|
|
@@ -32,6 +39,7 @@ class ProviderManager {
|
|
|
32
39
|
try {
|
|
33
40
|
const resp = await axios_1.default.get(`${this.giteaBaseUrl}/api/v1/user`, {
|
|
34
41
|
headers: { Authorization: `token ${this.giteaToken}` },
|
|
42
|
+
timeout: timeout,
|
|
35
43
|
});
|
|
36
44
|
if (resp.status === 200)
|
|
37
45
|
results.gitea = { ok: true };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrebuzeli/git-mcp",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "Professional MCP server for Git operations - STDIO UNIVERSAL: works in ANY IDE (Cursor, VSCode, Claude Desktop). Fully autonomous DUAL execution (GitHub + Gitea APIs) with automatic username detection. All tools execute on BOTH providers simultaneously. No manual parameters needed.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://github.com/andrebuzeli/git-mcp#readme",
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@modelcontextprotocol/sdk": "^0.4.0",
|
|
54
55
|
"@octokit/rest": "^20.0.0",
|
|
55
56
|
"ajv": "^8.12.0",
|
|
56
57
|
"axios": "^1.6.0",
|