Logo di GPT Repo MCP

GPT Repo MCP

Community
CAHN91

GPT Repo MCP gives ChatGPT direct context from approved local repos, then lets it write files, update code, prepare plans, review diffs, and carry context into the next chat.

Pubblicato daCAHN91
Repositorygpt-repo-mcp
LinguaTypeScript
Fork
23
Stelle
99
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    GPT Repo MCP mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 99; fork: 23 (repository collegato).

GPT Repo MCP

Let ChatGPT work from your repo — safely.

CI Node.js >=20 License: MIT Writes opt-in

GPT Repo MCP connects ChatGPT to approved local repositories through a focused, policy-controlled toolset. ChatGPT can understand a codebase, edit multiple files, run approved checks, diagnose failures, review the real Git diff, and prepare a local commit — while you stay in the normal ChatGPT conversation.

Your files remain in the workspace you approved. You choose whether each repository is read-only, writable, or ready for reviewed local commit work.

GPT Repo MCP is a tool-only MCP server. It does not add a custom interface to ChatGPT and is not affiliated with OpenAI, ChatGPT, Anthropic, or the Model Context Protocol maintainers.

What Becomes Possible

Your goalWhat ChatGPT can do
Understand an unfamiliar projectMap the structure, search code, read relevant files, and trace dependencies
Build a feature or applicationPlan and apply cohesive edits across one or many files in an approved repository
Fix a failing implementationRun approved tests, builds, linting, type checks, or smoke checks and use the evidence to correct the code
Review work before it shipsInspect current file bytes and the real Git diff, identify risks, and verify what remains
Finish a local change safelyValidate, review, stage, recover, or create a local commit when the repository policy allows it
Continue in a later conversationPreserve bounded local context, decisions, risks, touched files, and next steps

ChatGPT chooses a workflow that fits your request. GPT Repo MCP independently enforces repository access, path boundaries, write policy, secret checks, validation profiles, stale-state guards, and allowed Git operations.

Explore the capability guide · Review the security model · See the tools and workflows

From Request To Reviewed Result

text
You ask in ChatGPT
        ↓
Understand → Edit → Validate → Review → Local commit
        ↓
Approved local repository

A question may need only search and reading. An implementation can continue through multi-file editing, approved validation, review, and local commit preparation. ChatGPT receives tool descriptions, schemas, safety annotations, and structured results that help it select the next appropriate action.

The model guides the work; the server enforces the boundary. No prompt can turn the server into unrestricted filesystem access, arbitrary shell execution, automatic push, or automatic deployment.

Quickstart

1. Install

bash
git clone https://github.com/CAHN91/gpt-repo-mcp.git
cd gpt-repo-mcp
npm install
npm run build
cp config.example.json config.local.json

The copied starter config is valid and empty.

2. Approve a repository

bash
npm run add -- /path/to/your/repo

In an interactive terminal, choose read, write, or ship. For predictable setup in scripts or CI-like terminals, provide an explicit read, write, or ship mode:

bash
npm run add -- /path/to/your/repo --mode read
npm run add -- /path/to/your/repo --mode write
npm run add -- /path/to/your/repo --mode ship

The general command form is npm run add -- <path> --mode <mode>.

3. Connect ChatGPT

bash
npm run connect

Copy the printed MCP URL into ChatGPT Developer Mode connector settings, start a new chat, select the connector, and ask:

text
Use GPT Repo MCP. Which repositories can you access?

New to ngrok? Follow Install ngrok from zero. For the OpenAI Secure MCP Tunnel, use npm run connect:secure and follow the connection guide.

Permission Modes

ModeBest forAvailable outcome
readExploration, architecture review, and cautious first useSearch, read, understand, and review repository state
writeDaily implementationRead capabilities plus policy-checked single- and multi-file edits
shipReviewed local completionWrite capabilities plus approved validation, recovery, staging, and local commits

No mode enables push, pull, reset, checkout, switch, rebase, merge, stash, force operations, branch deletion, shell execution, or arbitrary commands.

Try It In ChatGPT

text
Give me a project brief for <repo_id>. Explain the architecture and likely entry points.
text
Implement this feature in <repo_id>. Update every affected file, run the approved checks, and review the final diff.
text
Diagnose the failing tests in <repo_id>, fix the underlying issue, and verify the result.
text
Review the current Git changes in <repo_id>. Tell me what is ready, what is risky, and what still needs work.
text
Prepare this completed change for a local commit, but do not push or deploy anything.

More examples and resulting workflows are available in the capability guide.

How ChatGPT Works

You describe the outcome in normal language. ChatGPT then chooses the smallest safe workflow that fits the request:

  1. Understand — inspect the project structure and read relevant files.
  2. Change — edit one file or a coherent set of files when writes are enabled.
  3. Validate — run only checks that the repository has approved.
  4. Review — inspect the real Git diff, validation evidence, and remaining risk.
  5. Finish or recover — prepare a reviewed local commit, or safely reverse the affected paths.

Simple questions can stop after reading. Implementation requests can continue through the whole loop. Specialist tools for transactional patchsets, work continuity, or reviewing externally executed agent work are used only when the task benefits from them.

You normally do not need to select tools by name. The connector describes each tool to ChatGPT, and the server checks every request independently. See Tools and workflows when you want to understand the available tool groups or ask ChatGPT to use a specific capability.

Safety By Design

  • Only explicitly approved repository roots are accessible.
  • Every path is repo-relative and sandboxed against traversal and symlink escapes.
  • Writes are disabled until the repository opts in.
  • File changes are checked against allowed paths, denied paths, size limits, stale-state guards, and secret patterns.
  • Validation uses configured profiles instead of arbitrary commands.
  • Git mutations operate on explicit paths and current reviewed state.
  • Push and deployment remain outside the server.

For the full boundary, threat model, and approval behavior, read Security.

Common Commands

CommandPurpose
npm run add -- <path>Approve a repository and choose a permission mode
npm run add -- <path> --mode <mode>Add a repository with an explicit read, write, or ship mode
npm run listList approved repositories
npm run remove -- <repo_id>Remove an approved repository
npm run doctorCheck configuration, scripts, tunnel state, port use, and Git state
npm run connectStart the server and built-in ngrok connection flow
npm run connect:secureStart the server with the OpenAI Secure MCP Tunnel
npm run check:configValidate local configuration

Documentation

Using GPT Repo MCP

GuideWhen you need...
Capability guideA user-oriented explanation of what ChatGPT can accomplish
SetupInstallation and local configuration
ChatGPT connectionConnector setup inside ChatGPT
Connection optionsngrok, Cloudflare, secure tunnel, and manual alternatives
Write workflowsEditing, validation, review, recovery, and local commits
Tools and workflowsWhat each tool group enables and when ChatGPT uses it
Security modelWhat is protected, what leaves your machine, and what remains your responsibility
Error referenceStable error codes and what they mean
External-agent protocolAdvanced review workflow when you separately operate an implementation agent
Migration guideMoving from 0.1.x to 0.2.0

Contributing And Extending

See Product principles, Architecture, Contributing, Quality, the technical terminology, and the release checklist.

Requirements

  • Node.js 20 or newer
  • npm
  • Git
  • An HTTPS tunnel such as ngrok, or the supported secure tunnel flow
  • ChatGPT with Developer Mode access

Troubleshooting

  • Unknown repository: run npm run list and confirm the repo_id.
  • Write blocked: ask ChatGPT to use repo_policy_explain for the repository and path.
  • Connector URL changed: restart the connection and update ChatGPT with the new URL.
  • Tunnel returns 502: confirm the local server is running, check /health, and restart the tunnel.
  • Tool schema looks stale: refresh the connector and start a new ChatGPT conversation.

For detailed diagnostics, see Setup and Approval troubleshooting.

License

MIT. See LICENSE.

Installazione

TypingMind
{
  "mcpServers": {
    "gpt-repo-mcp": {
      "command": "npm",
      "args": [
        "run",
        "mcp"
      ],
      "env": {
        "GPT_REPO_CONFIG": "<GPT_REPO_CONFIG>",
        "PORT": "<PORT>"
      }
    }
  }
}

Usa GPT Repo MCP MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso GPT Repo MCP, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi GPT Repo MCP come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di GPT Repo MCP.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "gpt-repo-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gpt-repo-mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di GPT Repo MCP, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di GPT Repo MCP.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare GPT Repo MCP per aiutarmi con questa attività?
GPT Repo MCP
Certo. L’ho letto.
Ecco cosa ho trovato con GPT Repo MCP.

Domande frequenti

A cosa serve il server MCP GPT Repo MCP?

GPT Repo MCP è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP GPT Repo MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare GPT Repo MCP con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP GPT Repo MCP con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando GPT Repo MCP, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP GPT Repo MCP a TypingMind?

GPT Repo MCP funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP GPT Repo MCP in TypingMind?

GPT Repo MCP mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP GPT Repo MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se GPT Repo MCP richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇