repo-bridge-mcp
v1.0.1MCP server that turns ChatGPT Web into a real coding agent on your own repositories: read, search, edit, build, test, git, pull requests.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
workspace_list
List repositories the bridge can open and which one is currently active. Call this first when you do not know what is available.
workspace_open
Open a local repository and return a full project brief: languages, build system, detected build/test/lint commands, module layout, git state, and the repo's AGENTS.md / CLAUDE.md instructions. Accepts an alias from workspace_list or an absolute path inside a configured root. Makes the workspace active for subsequent tool calls.
| Parameter | Type | Description |
|---|---|---|
path * | string | Alias (e.g. "quantix") or absolute path (e.g. "D:\projects\quantix"). |
workspace_info
Current state of a workspace without re-reading the repository: branch, working-tree changes, recent commits, detected commands, and everything this bridge session has already changed. Use this to resume work ("continue on quantix").
| Parameter | Type | Description |
|---|---|---|
workspace | string | Workspace alias. Defaults to the active workspace. |
repo_open_remote
Clone (or refresh) a remote Git repository into an isolated managed workspace and check out a branch. Use for work on a repository that is not already on this machine. Returns the same project brief as workspace_open. Each task gets its own workspace so parallel tasks cannot interfere.
| Parameter | Type | Description |
|---|---|---|
repository * | string | github:owner/repo, gitlab:group/repo, https://host/owner/repo.git, or git@host:owner/repo.git |
branch | string | Branch to check out. Default: the repository default branch. |
depth | number | Shallow clone depth. Omit for a full clone (needed for diffs against the base branch). |
task | string | Short task label (e.g. "drawdown-alerts"). Keeps concurrent tasks on the same repo isolated, and lets you reattach later. |
workspace_close
Stop tracking a workspace. For managed (cloned) workspaces you can also delete the directory to reclaim disk. Never deletes a local workspace's files.
| Parameter | Type | Description |
|---|---|---|
workspace * | string | Workspace alias. |
delete_files | boolean | Managed workspaces only: also remove the cloned directory. Default false. |
list_dir
List files and directories. Use for orientation in an unfamiliar area of the repo. Build outputs, node_modules and .git are skipped automatically. Prefer search_code when you are looking for something specific.
| Parameter | Type | Description |
|---|---|---|
depth | number | Levels to descend, 1-6. Default 1. |
include_hidden | boolean | Include dot-files. Default false. |
limit | number | Max entries. Default 500. |
path | string | Directory relative to the workspace root. Default: "." |
workspace | string | Workspace alias. Defaults to the active workspace. |
read_file
Read a file as text. Returns exact file content (no line numbers by default) so it can be copied verbatim into edit_file anchors. For large files pass start_line/end_line, or use search_code first to find the region worth reading. Credential files (.env, keys, cloud config) are never returned.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path relative to the workspace root. |
end_line | number | 1-based last line to return. |
line_numbers | boolean | Prefix each line with its number. Navigation aid only — do NOT copy numbered text into edit_file. Default false. |
start_line | number | 1-based first line to return. |
workspace | string | Workspace alias. Defaults to the active workspace. |
search_code
Search file contents across the repository and return matching lines with file:line locations. This is the primary way to find code — far cheaper than reading files. Supports literal or regex patterns, glob filters, and surrounding context lines. Respects .gitignore.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Text to find, or a regular expression when regex=true. |
case_sensitive | boolean | Default false. |
context_lines | number | Lines of context around each match, 0-10. Default 0. |
exclude | array | Skip files matching these globs. |
include | array | Only search files matching these globs, e.g. ["**/*.java", "src/**/*.ts"]. |
max_results | number | Default 100, max 1000. |
path | string | Restrict the search to this subdirectory. |
regex | boolean | Treat pattern as a regular expression. Default false (literal). |
workspace | string | Workspace alias. Defaults to the active workspace. |
find_files
Find files by name or glob pattern (e.g. "**/*Service.java", "**/test_*.py"). Use when you know roughly what a file is called but not where it lives.
| Parameter | Type | Description |
|---|---|---|
patterns * | array | Glob patterns. A pattern without "/" also matches file names anywhere in the tree. |
max_results | number | Default 200. |
path | string | Restrict to this subdirectory. |
workspace | string | Workspace alias. Defaults to the active workspace. |
write_file
Create a new file, or replace / append to an existing one. Use this for NEW files. To change part of an existing file use edit_file instead — it is safer and much cheaper than resending the whole file.
| Parameter | Type | Description |
|---|---|---|
content * | string | Full file content (or the text to append). |
path * | string | File path relative to the workspace root. Parent directories are created. |
mode | string | create (default, fails if the file exists), overwrite, or append. |
workspace | string | Workspace alias. Defaults to the active workspace. |
edit_file
Make targeted edits to an existing file by replacing exact text. Each edit's old_string must appear exactly once (include surrounding lines to disambiguate) unless replace_all is set. All edits are applied atomically — if any anchor fails to match, the file is left untouched and you are told why. This is the preferred way to modify code.
| Parameter | Type | Description |
|---|---|---|
edits * | array | Edits applied in order. |
path * | string | File to edit, relative to the workspace root. |
workspace | string | Workspace alias. Defaults to the active workspace. |
move_path
Move or rename a file or directory inside the workspace.
| Parameter | Type | Description |
|---|---|---|
from * | string | Existing path. |
to * | string | Destination path. |
overwrite | boolean | Replace the destination if it exists. Default false. |
workspace | string | Workspace alias. Defaults to the active workspace. |
delete_path
Delete a file, or a directory tree with recursive=true. Deleting the workspace root is refused. Prefer deleting specific files over directories.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to delete. |
recursive | boolean | Required to delete a directory. Default false. |
workspace | string | Workspace alias. Defaults to the active workspace. |
create_dir
Create a directory (including parents). write_file already creates parent directories, so this is only needed for empty directories.
| Parameter | Type | Description |
|---|---|---|
path * | string | Directory to create. |
workspace | string | Workspace alias. Defaults to the active workspace. |
file_info
Check whether a path exists and get its size and modification time, without reading it.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to inspect. |
workspace | string | Workspace alias. Defaults to the active workspace. |
run_command
Run a development command in the workspace (build tools, package managers, test runners, git, language toolchains). Commands run WITHOUT a shell: pipes, redirects, && and ; are rejected — issue separate calls instead. Only allowlisted executables are permitted; destructive commands require confirm=true. Prefer run_build / run_tests / run_lint, which pick the right command for this project automatically.
| Parameter | Type | Description |
|---|---|---|
command * | string | Command line, e.g. "npm ci" or "mvn -B -Dtest=FooTest test". |
confirm | boolean | Required for commands the bridge classifies as destructive (force push, reset --hard, recursive delete, publish, prune). |
path | string | Working directory relative to the workspace root. Default: the root. |
timeout_seconds | number | Timeout for this command. |
workspace | string | Workspace alias. Defaults to the active workspace. |
run_build
Build the project using the build command detected from the repository (Maven, Gradle, npm/pnpm/yarn script, cargo, go, dotnet, make…). Returns exit code and output with error lines preserved even when the log is long.
| Parameter | Type | Description |
|---|---|---|
command | string | Override the detected build command. |
path | string | Subdirectory (module) to run in. Defaults to the detected location. |
target | string | Optional extra arguments appended to the command. |
timeout_seconds | number | Per-run timeout. Defaults to the bridge configuration. |
workspace | string | Workspace alias. Defaults to the active workspace. |
run_tests
Run the project test suite using the command detected from the repository. Failing output is summarised with the failure lines pulled out, so you can go straight from "tests failed" to the responsible code. This is the tool to use in an implement → test → fix loop.
| Parameter | Type | Description |
|---|---|---|
command | string | Override the detected test command. |
path | string | Subdirectory (module) to run in. Defaults to the detected location. |
target | string | Optional test selector appended to the command (e.g. "-Dtest=PortfolioRiskServiceTest", "src/foo.test.ts"). |
timeout_seconds | number | Per-run timeout. Defaults to the bridge configuration. |
workspace | string | Workspace alias. Defaults to the active workspace. |
run_lint
Run the project linter / static checks using the command detected from the repository (eslint, ruff, clippy, go vet, spotless…).
| Parameter | Type | Description |
|---|---|---|
command | string | Override the detected lint command. |
path | string | Subdirectory (module) to run in. Defaults to the detected location. |
target | string | Optional extra arguments appended to the command. |
timeout_seconds | number | Per-run timeout. Defaults to the bridge configuration. |
workspace | string | Workspace alias. Defaults to the active workspace. |
git_status
Current branch, upstream tracking, ahead/behind counts, and every staged / unstaged / untracked file. Check this before committing, and to notice user changes you did not make.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Workspace alias. Defaults to the active workspace. |
git_diff
Show changes as a unified diff. against="worktree" (default, unstaged changes), "staged", "head" (staged + unstaged), or a branch/commit name to compare the current branch against it (uses the merge base). Use stat_only=true first on a large change to see which files moved before pulling in the full diff.
| Parameter | Type | Description |
|---|---|---|
against | string | "worktree" | "staged" | "head" | branch or commit ref. Default "head". |
context_lines | number | Context lines around each hunk. Default 3. |
paths | array | Limit the diff to these paths. |
stat_only | boolean | Only per-file change counts. Default false. |
workspace | string | Workspace alias. Defaults to the active workspace. |
git_log
Recent commits, newest first. Useful for matching the project's commit-message conventions before committing.
| Parameter | Type | Description |
|---|---|---|
limit | number | Number of commits. Default 15. |
range | string | Optional ref or range, e.g. "develop..HEAD". |
workspace | string | Workspace alias. Defaults to the active workspace. |
git_branch
List branches, or create / switch to one. Creating a feature branch is the normal first step before making changes, since commits to protected branches are refused.
| Parameter | Type | Description |
|---|---|---|
create | boolean | Create the branch. Default false (switch to an existing one). |
from | string | Base ref for a new branch. Default: the current HEAD. |
name | string | Branch to create or switch to. Omit to list branches. |
workspace | string | Workspace alias. Defaults to the active workspace. |
git_commit
Stage and commit changes. By default every modified and untracked file is staged; pass `paths` to commit a subset. Refuses to commit on a protected branch — create a feature branch first. Write the message in the style of the repository's recent commits (check git_log).
| Parameter | Type | Description |
|---|---|---|
message * | string | Commit message. First line is the subject; add a body after a blank line. |
paths | array | Only stage and commit these paths. Default: all changes. |
workspace | string | Workspace alias. Defaults to the active workspace. |
git_restore
Discard changes to specific files, or unstage them. This destroys uncommitted work, so it requires confirm=true and specific paths — it will never discard everything at once.
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | Must be true — this discards uncommitted work. |
paths * | array | Files to restore. Required. |
staged | boolean | Unstage instead of discarding worktree changes. Default false. |
workspace | string | Workspace alias. Defaults to the active workspace. |
bridge_status
What this bridge is allowed to do: permission level, which capabilities are enabled, which executables may run, timeouts and output limits, protected branches, and whether GitHub/GitLab tokens are configured. Check this when a tool is refused, or before planning work that needs to push.
report_changes
Summarise everything done in this workspace: files changed (with per-file line counts from git), commands run and whether they passed, git operations, current branch and commit state. Use this to write an accurate final report instead of relying on memory — and to see what is still uncommitted.
| Parameter | Type | Description |
|---|---|---|
against | string | Compare against this ref for the file summary (e.g. "develop"). Default: HEAD (uncommitted changes only). |
workspace | string | Workspace alias. Defaults to the active workspace. |