@andrebuzeli/git-mcp 8.0.0 → 8.0.2
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 +24 -5
- package/UNIVERSAL-IDE-SETUP.md +328 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# 🚀 Git MCP - 100% Native JavaScript Git Implementation
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@andrebuzeli/git-mcp)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
3
7
|
**Model Context Protocol (MCP) server for Git operations with ZERO dependencies on installed Git!**
|
|
4
8
|
|
|
9
|
+
🌍 **Universal IDE Support:** Claude Desktop • Cursor AI • VSCode • Windsurf • Trae AI • Kiro.dev • Any MCP-compatible IDE
|
|
10
|
+
|
|
11
|
+
📖 **[Complete Setup Guide for All IDEs →](./UNIVERSAL-IDE-SETUP.md)**
|
|
12
|
+
|
|
5
13
|
## ✨ Key Features
|
|
6
14
|
|
|
7
15
|
### 🎯 **100% Git Independent**
|
|
@@ -115,28 +123,39 @@ GITEA_USERNAME=your-username
|
|
|
115
123
|
GITEA_URL=https://gitea.example.com # or http://localhost:3000
|
|
116
124
|
```
|
|
117
125
|
|
|
118
|
-
###
|
|
126
|
+
### 🌍 Universal IDE Configuration
|
|
127
|
+
|
|
128
|
+
**Works in:** Claude Desktop, Cursor AI, VSCode, Windsurf, Trae AI, Kiro.dev, and any MCP-compatible IDE!
|
|
119
129
|
|
|
120
|
-
|
|
130
|
+
#### Quick Setup (Recommended)
|
|
121
131
|
|
|
122
132
|
```json
|
|
123
133
|
{
|
|
124
134
|
"mcpServers": {
|
|
125
135
|
"git-mcp": {
|
|
126
|
-
"command": "
|
|
127
|
-
"args": ["
|
|
136
|
+
"command": "npx",
|
|
137
|
+
"args": ["-y", "@andrebuzeli/git-mcp"],
|
|
128
138
|
"env": {
|
|
129
139
|
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxx",
|
|
130
140
|
"GITHUB_USERNAME": "your-username",
|
|
131
141
|
"GITEA_TOKEN": "xxxxxxxxxx",
|
|
132
142
|
"GITEA_USERNAME": "your-username",
|
|
133
|
-
"GITEA_URL": "
|
|
143
|
+
"GITEA_URL": "https://gitea.example.com"
|
|
134
144
|
}
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
}
|
|
138
148
|
```
|
|
139
149
|
|
|
150
|
+
#### Configuration Locations
|
|
151
|
+
|
|
152
|
+
- **Claude Desktop (Windows):** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
153
|
+
- **Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
154
|
+
- **Cursor AI:** `%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
|
|
155
|
+
- **VSCode:** Via MCP extension settings or `settings.json`
|
|
156
|
+
|
|
157
|
+
📖 **[Complete Universal Setup Guide](./UNIVERSAL-IDE-SETUP.md)** - Detailed instructions for all IDEs
|
|
158
|
+
|
|
140
159
|
## 🚀 Quick Start
|
|
141
160
|
|
|
142
161
|
### 1. Fix Existing Repository
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# 🌍 Guia de Configuração Universal - MCP Git
|
|
2
|
+
|
|
3
|
+
## ✅ Compatibilidade Confirmada
|
|
4
|
+
|
|
5
|
+
O `@andrebuzeli/git-mcp` está **100% pronto** para funcionar em todos os IDEs que suportam MCP:
|
|
6
|
+
|
|
7
|
+
- ✅ **Claude Desktop**
|
|
8
|
+
- ✅ **Cursor AI**
|
|
9
|
+
- ✅ **VSCode** (com extensão MCP)
|
|
10
|
+
- ✅ **Windsurf**
|
|
11
|
+
- ✅ **Trae AI**
|
|
12
|
+
- ✅ **Kiro.dev**
|
|
13
|
+
- ✅ **Qualquer IDE compatível com MCP**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📋 Configuração por IDE
|
|
18
|
+
|
|
19
|
+
### 1️⃣ Claude Desktop
|
|
20
|
+
|
|
21
|
+
**Arquivo de configuração:**
|
|
22
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
23
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
24
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
25
|
+
|
|
26
|
+
**Configuração:**
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"git-mcp": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": [
|
|
33
|
+
"-y",
|
|
34
|
+
"@andrebuzeli/git-mcp"
|
|
35
|
+
],
|
|
36
|
+
"env": {
|
|
37
|
+
"GITHUB_TOKEN": "ghp_seu_token_aqui",
|
|
38
|
+
"GITHUB_USERNAME": "seu-usuario-github",
|
|
39
|
+
"GITEA_TOKEN": "seu_token_gitea_aqui",
|
|
40
|
+
"GITEA_USERNAME": "seu-usuario-gitea",
|
|
41
|
+
"GITEA_URL": "https://git.seuservidor.com"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Opcional (instalação local):**
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"git-mcp": {
|
|
53
|
+
"command": "node",
|
|
54
|
+
"args": [
|
|
55
|
+
"/caminho/absoluto/node_modules/@andrebuzeli/git-mcp/dist/index.js"
|
|
56
|
+
],
|
|
57
|
+
"env": {
|
|
58
|
+
"GITHUB_TOKEN": "ghp_seu_token_aqui",
|
|
59
|
+
"GITHUB_USERNAME": "seu-usuario-github",
|
|
60
|
+
"GITEA_TOKEN": "seu_token_gitea_aqui",
|
|
61
|
+
"GITEA_USERNAME": "seu-usuario-gitea",
|
|
62
|
+
"GITEA_URL": "https://git.seuservidor.com"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### 2️⃣ Cursor AI
|
|
72
|
+
|
|
73
|
+
**Arquivo de configuração:**
|
|
74
|
+
- **Windows:** `%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
|
|
75
|
+
- **macOS:** `~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
|
76
|
+
- **Linux:** `~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
|
77
|
+
|
|
78
|
+
**Configuração (idêntica ao Claude Desktop):**
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"git-mcp": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": ["-y", "@andrebuzeli/git-mcp"],
|
|
85
|
+
"env": {
|
|
86
|
+
"GITHUB_TOKEN": "ghp_seu_token_aqui",
|
|
87
|
+
"GITHUB_USERNAME": "seu-usuario-github",
|
|
88
|
+
"GITEA_TOKEN": "seu_token_gitea_aqui",
|
|
89
|
+
"GITEA_USERNAME": "seu-usuario-gitea",
|
|
90
|
+
"GITEA_URL": "https://git.seuservidor.com"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Via Interface Gráfica:**
|
|
98
|
+
1. Abra Cursor
|
|
99
|
+
2. Vá em **Settings** → **MCP Servers**
|
|
100
|
+
3. Clique em **Add new global MCP server**
|
|
101
|
+
4. Cole a configuração acima
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### 3️⃣ VSCode
|
|
106
|
+
|
|
107
|
+
**Extensão necessária:**
|
|
108
|
+
- Instale a extensão **"Claude Dev"** ou **"MCP Client"**
|
|
109
|
+
|
|
110
|
+
**Arquivo de configuração:**
|
|
111
|
+
- Similar ao Cursor, dependendo da extensão instalada
|
|
112
|
+
|
|
113
|
+
**Método 1 - Via settings.json:**
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"mcp.servers": {
|
|
117
|
+
"git-mcp": {
|
|
118
|
+
"command": "npx",
|
|
119
|
+
"args": ["-y", "@andrebuzeli/git-mcp"],
|
|
120
|
+
"env": {
|
|
121
|
+
"GITHUB_TOKEN": "ghp_seu_token_aqui",
|
|
122
|
+
"GITHUB_USERNAME": "seu-usuario-github",
|
|
123
|
+
"GITEA_TOKEN": "seu_token_gitea_aqui",
|
|
124
|
+
"GITEA_USERNAME": "seu-usuario-gitea",
|
|
125
|
+
"GITEA_URL": "https://git.seuservidor.com"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Método 2 - Via Interface:**
|
|
133
|
+
1. Abra Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
|
|
134
|
+
2. Digite: `MCP: Add Server`
|
|
135
|
+
3. Configure usando a interface gráfica
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### 4️⃣ Windsurf
|
|
140
|
+
|
|
141
|
+
**Configuração:**
|
|
142
|
+
Similar ao VSCode/Cursor. O Windsurf usa a mesma estrutura de configuração MCP.
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"git-mcp": {
|
|
148
|
+
"command": "npx",
|
|
149
|
+
"args": ["-y", "@andrebuzeli/git-mcp"],
|
|
150
|
+
"env": {
|
|
151
|
+
"GITHUB_TOKEN": "ghp_seu_token_aqui",
|
|
152
|
+
"GITHUB_USERNAME": "seu-usuario-github"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 🔧 Configuração de Tokens
|
|
162
|
+
|
|
163
|
+
### GitHub Token
|
|
164
|
+
1. Acesse: https://github.com/settings/tokens
|
|
165
|
+
2. Clique em **Generate new token** → **Personal access token (classic)**
|
|
166
|
+
3. Selecione os seguintes escopos:
|
|
167
|
+
- ✅ `repo` (acesso completo a repositórios)
|
|
168
|
+
- ✅ `workflow` (se usar GitHub Actions)
|
|
169
|
+
- ✅ `write:packages` (se usar GitHub Packages)
|
|
170
|
+
- ✅ `delete_repo` (se quiser deletar repos via MCP)
|
|
171
|
+
|
|
172
|
+
### Gitea Token
|
|
173
|
+
1. Acesse: `https://seu-gitea.com/user/settings/applications`
|
|
174
|
+
2. Clique em **Generate New Token**
|
|
175
|
+
3. Selecione permissões:
|
|
176
|
+
- ✅ `repo` (acesso a repositórios)
|
|
177
|
+
- ✅ `issue` (gerenciar issues)
|
|
178
|
+
- ✅ `write:user` (informações do usuário)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 🚀 Verificação de Funcionamento
|
|
183
|
+
|
|
184
|
+
### Teste Rápido no Claude Desktop / Cursor
|
|
185
|
+
|
|
186
|
+
Após configurar, reinicie o IDE e pergunte:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
"Liste as ferramentas Git disponíveis"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Você deve ver 22 ferramentas:
|
|
193
|
+
- git-workflow
|
|
194
|
+
- git-files
|
|
195
|
+
- git-branches
|
|
196
|
+
- git-issues
|
|
197
|
+
- git-pulls
|
|
198
|
+
- git-tags
|
|
199
|
+
- git-release
|
|
200
|
+
- git-remote
|
|
201
|
+
- git-reset
|
|
202
|
+
- git-stash
|
|
203
|
+
- git-config
|
|
204
|
+
- git-monitor
|
|
205
|
+
- git-backup
|
|
206
|
+
- git-archive
|
|
207
|
+
- git-sync
|
|
208
|
+
- git-packages
|
|
209
|
+
- git-analytics
|
|
210
|
+
- git-upload
|
|
211
|
+
- git-update
|
|
212
|
+
- git-history
|
|
213
|
+
- git-fix
|
|
214
|
+
- git-ignore
|
|
215
|
+
|
|
216
|
+
### Teste de Operação
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
"Inicialize um novo repositório Git em /caminho/do/projeto"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
ou
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
"Mostre o status do repositório em /caminho/do/projeto"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 🌟 Recursos Especiais
|
|
231
|
+
|
|
232
|
+
### 1. Dual-Provider (GitHub + Gitea)
|
|
233
|
+
O MCP suporta push simultâneo para ambos providers. Basta configurar ambos tokens.
|
|
234
|
+
|
|
235
|
+
### 2. Sem Instalação de Git
|
|
236
|
+
100% JavaScript puro - não requer Git instalado no sistema.
|
|
237
|
+
|
|
238
|
+
### 3. Cross-Platform
|
|
239
|
+
Funciona identicamente em Windows, macOS e Linux.
|
|
240
|
+
|
|
241
|
+
### 4. Portable
|
|
242
|
+
Pode ser empacotado com aplicações Electron ou usados em ambientes CI/CD.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## ⚠️ Troubleshooting
|
|
247
|
+
|
|
248
|
+
### Problema: MCP não aparece na lista de servidores
|
|
249
|
+
|
|
250
|
+
**Solução:**
|
|
251
|
+
1. Verifique se o arquivo de configuração está no local correto
|
|
252
|
+
2. Reinicie completamente o IDE
|
|
253
|
+
3. Verifique os logs do MCP:
|
|
254
|
+
- Claude Desktop: `%APPDATA%\Claude\logs`
|
|
255
|
+
- Cursor: Verifique console do desenvolvedor
|
|
256
|
+
|
|
257
|
+
### Problema: Erro de autenticação
|
|
258
|
+
|
|
259
|
+
**Solução:**
|
|
260
|
+
1. Verifique se os tokens estão corretos
|
|
261
|
+
2. Verifique se os tokens têm as permissões necessárias
|
|
262
|
+
3. Certifique-se de que `GITHUB_USERNAME` e `GITEA_USERNAME` estão corretos
|
|
263
|
+
|
|
264
|
+
### Problema: npx não encontrado
|
|
265
|
+
|
|
266
|
+
**Solução:**
|
|
267
|
+
1. Instale Node.js (versão 18+): https://nodejs.org/
|
|
268
|
+
2. Reinicie o terminal/IDE após instalação
|
|
269
|
+
3. Alternativamente, instale globalmente:
|
|
270
|
+
```bash
|
|
271
|
+
npm install -g @andrebuzeli/git-mcp
|
|
272
|
+
```
|
|
273
|
+
E use:
|
|
274
|
+
```json
|
|
275
|
+
{
|
|
276
|
+
"command": "git-mcp",
|
|
277
|
+
"args": []
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 📚 Exemplos de Uso
|
|
284
|
+
|
|
285
|
+
### 1. Upload de Projeto Completo
|
|
286
|
+
```
|
|
287
|
+
"Faça upload do projeto em /caminho/projeto para GitHub e Gitea"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### 2. Criar Issue
|
|
291
|
+
```
|
|
292
|
+
"Crie uma issue no GitHub com título 'Bug no login' e corpo 'Erro ao autenticar usuário'"
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### 3. Listar Branches
|
|
296
|
+
```
|
|
297
|
+
"Liste todas as branches do repositório em /caminho/projeto"
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### 4. Criar Release
|
|
301
|
+
```
|
|
302
|
+
"Crie uma release v1.0.0 no GitHub com nome 'Primeira Versão Estável'"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 🔗 Links Úteis
|
|
308
|
+
|
|
309
|
+
- **Documentação completa:** https://github.com/andrebuzeli/git-mcp
|
|
310
|
+
- **NPM Package:** https://www.npmjs.com/package/@andrebuzeli/git-mcp
|
|
311
|
+
- **Issues/Suporte:** https://github.com/andrebuzeli/git-mcp/issues
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## ✅ Checklist de Configuração
|
|
316
|
+
|
|
317
|
+
- [ ] Node.js 18+ instalado
|
|
318
|
+
- [ ] Token GitHub criado
|
|
319
|
+
- [ ] Token Gitea criado (opcional)
|
|
320
|
+
- [ ] Arquivo de configuração criado no local correto
|
|
321
|
+
- [ ] Tokens adicionados ao arquivo de configuração
|
|
322
|
+
- [ ] IDE reiniciado
|
|
323
|
+
- [ ] Teste básico realizado (listar ferramentas)
|
|
324
|
+
- [ ] Teste de operação realizado (init/status)
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
**Pronto! Seu MCP Git agora funciona universalmente em qualquer IDE compatível com MCP! 🚀**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrebuzeli/git-mcp",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "🚀 100% Native JavaScript Git MCP Server - NO GIT INSTALLATION REQUIRED! Pure isomorphic-git implementation works in ANY IDE (Cursor, VSCode, Claude Desktop, Trae AI, Kiro.dev). DUAL execution (GitHub + Gitea) with smart HTTP token auth. Cross-platform, portable, secure. 22 comprehensive tools with full JSON Schema. Perfect for CI/CD, Docker, Electron, and web apps. Hybrid stash (refs/stash) and config (local+global) implementations.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"README.md",
|
|
14
14
|
"LICENSE",
|
|
15
15
|
"package.json",
|
|
16
|
-
"CLOUDFLARE-TUNNELS.md"
|
|
16
|
+
"CLOUDFLARE-TUNNELS.md",
|
|
17
|
+
"UNIVERSAL-IDE-SETUP.md"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc",
|