GPT Repo MCP logo

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.

PublisherCAHN91
Repositorygpt-repo-mcp
LanguageTypeScript
Forks
23
Stars
99
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    GPT Repo MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    99 stars and 23 forks from the linked repository.

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.

Installation

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

Use GPT Repo MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once GPT Repo MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add GPT Repo MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the GPT Repo MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "gpt-repo-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gpt-repo-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the GPT Repo MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the GPT Repo MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use GPT Repo MCP to help me with this task?
GPT Repo MCP
Sure. I read it.
Here is what I found using GPT Repo MCP.

Frequently asked questions

What is the GPT Repo MCP MCP server used for?

GPT Repo MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use GPT Repo MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use GPT Repo MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use GPT Repo MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With GPT Repo MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect GPT Repo MCP MCP to TypingMind?

GPT Repo MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does GPT Repo MCP MCP provide in TypingMind?

GPT Repo MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use GPT Repo MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If GPT Repo MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇