Logo GPT Repo MCP

GPT Repo MCP

Cộng đồng
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.

Nhà phát hànhCAHN91
Kho mãgpt-repo-mcp
Ngôn ngữTypeScript
Bản fork
23
Sao
99
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    GPT Repo MCP cung cấp các chức năng MCP cho các ứng dụng khách AI và tác nhân AI tương thích.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Mẫu cấu hình có thể sao chép ngay

    Dùng các đoạn cấu hình mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Mức độ quan tâm của cộng đồng đến kho mã

    99 sao và 23 bản fork từ kho mã được liên kết.

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.

Cài đặt

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

Dùng MCP GPT Repo MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối GPT Repo MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Thiết lập trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Thiết lập trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh thiết lập trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Để tiến trình tiếp tục chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Để tiến trình tiếp tục chạy trong cửa sổ Terminal khi bạn dùng các công cụ MCP.
3

Thêm GPT Repo MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của GPT Repo MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "gpt-repo-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gpt-repo-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của GPT Repo MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của GPT Repo MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng GPT Repo MCP giúp tôi làm việc này không?
GPT Repo MCP
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng GPT Repo MCP.

Câu hỏi thường gặp

Máy chủ MCP GPT Repo MCP dùng để làm gì?

GPT Repo MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP GPT Repo MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng GPT Repo MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP GPT Repo MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối GPT Repo MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP GPT Repo MCP với TypingMind?

GPT Repo MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP GPT Repo MCP cung cấp những công cụ nào trong TypingMind?

GPT Repo MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP GPT Repo MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu GPT Repo MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇