repo-bridge-mcp

v1.0.1
repo-bridge-mcp Checked 11 hours ago Published 3 months ago

MCP 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.

ParameterTypeDescription
path *stringAlias (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").

ParameterTypeDescription
workspacestringWorkspace 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.

ParameterTypeDescription
repository *stringgithub:owner/repo, gitlab:group/repo, https://host/owner/repo.git, or git@host:owner/repo.git
branchstringBranch to check out. Default: the repository default branch.
depthnumberShallow clone depth. Omit for a full clone (needed for diffs against the base branch).
taskstringShort 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.

ParameterTypeDescription
workspace *stringWorkspace alias.
delete_filesbooleanManaged 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.

ParameterTypeDescription
depthnumberLevels to descend, 1-6. Default 1.
include_hiddenbooleanInclude dot-files. Default false.
limitnumberMax entries. Default 500.
pathstringDirectory relative to the workspace root. Default: "."
workspacestringWorkspace 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.

ParameterTypeDescription
path *stringFile path relative to the workspace root.
end_linenumber1-based last line to return.
line_numbersbooleanPrefix each line with its number. Navigation aid only — do NOT copy numbered text into edit_file. Default false.
start_linenumber1-based first line to return.
workspacestringWorkspace 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.

ParameterTypeDescription
pattern *stringText to find, or a regular expression when regex=true.
case_sensitivebooleanDefault false.
context_linesnumberLines of context around each match, 0-10. Default 0.
excludearraySkip files matching these globs.
includearrayOnly search files matching these globs, e.g. ["**/*.java", "src/**/*.ts"].
max_resultsnumberDefault 100, max 1000.
pathstringRestrict the search to this subdirectory.
regexbooleanTreat pattern as a regular expression. Default false (literal).
workspacestringWorkspace 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.

ParameterTypeDescription
patterns *arrayGlob patterns. A pattern without "/" also matches file names anywhere in the tree.
max_resultsnumberDefault 200.
pathstringRestrict to this subdirectory.
workspacestringWorkspace 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.

ParameterTypeDescription
content *stringFull file content (or the text to append).
path *stringFile path relative to the workspace root. Parent directories are created.
modestringcreate (default, fails if the file exists), overwrite, or append.
workspacestringWorkspace 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.

ParameterTypeDescription
edits *arrayEdits applied in order.
path *stringFile to edit, relative to the workspace root.
workspacestringWorkspace alias. Defaults to the active workspace.

move_path

Move or rename a file or directory inside the workspace.

ParameterTypeDescription
from *stringExisting path.
to *stringDestination path.
overwritebooleanReplace the destination if it exists. Default false.
workspacestringWorkspace 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.

ParameterTypeDescription
path *stringPath to delete.
recursivebooleanRequired to delete a directory. Default false.
workspacestringWorkspace 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.

ParameterTypeDescription
path *stringDirectory to create.
workspacestringWorkspace alias. Defaults to the active workspace.

file_info

Check whether a path exists and get its size and modification time, without reading it.

ParameterTypeDescription
path *stringPath to inspect.
workspacestringWorkspace 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.

ParameterTypeDescription
command *stringCommand line, e.g. "npm ci" or "mvn -B -Dtest=FooTest test".
confirmbooleanRequired for commands the bridge classifies as destructive (force push, reset --hard, recursive delete, publish, prune).
pathstringWorking directory relative to the workspace root. Default: the root.
timeout_secondsnumberTimeout for this command.
workspacestringWorkspace 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.

ParameterTypeDescription
commandstringOverride the detected build command.
pathstringSubdirectory (module) to run in. Defaults to the detected location.
targetstringOptional extra arguments appended to the command.
timeout_secondsnumberPer-run timeout. Defaults to the bridge configuration.
workspacestringWorkspace 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.

ParameterTypeDescription
commandstringOverride the detected test command.
pathstringSubdirectory (module) to run in. Defaults to the detected location.
targetstringOptional test selector appended to the command (e.g. "-Dtest=PortfolioRiskServiceTest", "src/foo.test.ts").
timeout_secondsnumberPer-run timeout. Defaults to the bridge configuration.
workspacestringWorkspace 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…).

ParameterTypeDescription
commandstringOverride the detected lint command.
pathstringSubdirectory (module) to run in. Defaults to the detected location.
targetstringOptional extra arguments appended to the command.
timeout_secondsnumberPer-run timeout. Defaults to the bridge configuration.
workspacestringWorkspace 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.

ParameterTypeDescription
workspacestringWorkspace 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.

ParameterTypeDescription
againststring"worktree" | "staged" | "head" | branch or commit ref. Default "head".
context_linesnumberContext lines around each hunk. Default 3.
pathsarrayLimit the diff to these paths.
stat_onlybooleanOnly per-file change counts. Default false.
workspacestringWorkspace alias. Defaults to the active workspace.

git_log

Recent commits, newest first. Useful for matching the project's commit-message conventions before committing.

ParameterTypeDescription
limitnumberNumber of commits. Default 15.
rangestringOptional ref or range, e.g. "develop..HEAD".
workspacestringWorkspace 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.

ParameterTypeDescription
createbooleanCreate the branch. Default false (switch to an existing one).
fromstringBase ref for a new branch. Default: the current HEAD.
namestringBranch to create or switch to. Omit to list branches.
workspacestringWorkspace 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).

ParameterTypeDescription
message *stringCommit message. First line is the subject; add a body after a blank line.
pathsarrayOnly stage and commit these paths. Default: all changes.
workspacestringWorkspace 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.

ParameterTypeDescription
confirm *booleanMust be true — this discards uncommitted work.
paths *arrayFiles to restore. Required.
stagedbooleanUnstage instead of discarding worktree changes. Default false.
workspacestringWorkspace 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.

ParameterTypeDescription
againststringCompare against this ref for the file summary (e.g. "develop"). Default: HEAD (uncommitted changes only).
workspacestringWorkspace alias. Defaults to the active workspace.