Gemini Remote Agent MCP
Provides tools to inspect Git status and diffs and to restore workspace files from Git, with restore disabled by default and requiring explicit confirmation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gemini Remote Agent MCP search src/ for TODO comments and show me the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
English | 简体中文
Gemini Remote Agent MCP
A workspace-scoped remote development MCP server built for Gemini Custom Apps / MCP Connectors. It exposes 15 workspace tools (plus a dedicated /mcp/readonly endpoint) directly inside a target workspace over stateless Streamable HTTP, secured with OAuth 2.1 + PKCE, path sandboxing, secret redaction, and JSONL audit logging.
flowchart LR
G[Gemini Web Custom App] -->|HTTPS + Bearer JWT| T[Tailscale Funnel / Cloudflare Tunnel]
T -->|HTTP 127.0.0.1:8000| M[OAuthResourceMiddleware]
M -->|Scope + Size + Header Checks| F[FastMCP Streamable HTTP]
F -->|Read / Write / Git| W[Workspace Sandbox]
F -->|Exec / BG Jobs| S[Sanitized Env + bwrap]Features & Security Controls
Files:
list_directory,find_files,grep_search(ripgrep),read_file(line-numbered),edit_file(SHA-256 optimistic lock + unified diff),write_file(atomic write).Execution:
run_command,start_bg_job,poll_bg_job,kill_bg_jobwith process-tree termination and concurrency limits.Git:
git_status_diff,git_restore(disabled by default, requires explicit confirmation).Hardening:
Case-insensitive
denied_globs, symlink/junction traversal blocking, Windows reserved device name & ADS checks, and ripgrep glob-override protection.Child-process environment scrubbing (
MCP_*,AWS_*,GITHUB_TOKEN,*SECRET*,*TOKEN*, etc.), command policy checks, and optional command allowlist (MCP_ALLOWED_COMMANDS).OAuth 2.1 + PKCE (
S256) resource server & optional self-hosted single-user provider with rate limiting, CSP-hardened consent UI, security headers, streaming body size limit, and rotating JSONL audit logs.
Related MCP server: Spark Terminal MCP
Quick Start
Local Development
cp .env.example .env
# Set MCP_WORKSPACE_ROOT, and for local testing set MCP_AUTH_ENABLED=false, MCP_SANDBOX_MODE=none
uv sync
uv run remote-agent-mcp --check
uv run remote-agent-mcp # Streamable HTTP (Gemini Web / remote)
uv run remote-agent-mcp --transport stdio # Stdio (Gemini CLI / Claude Desktop / Cursor)
uv run remote-agent-mcp --print-client-config gemini-cliDocker (Isolated Non-Root Container)
docker build -t gemini-remote-agent-mcp .
docker run --rm -p 127.0.0.1:8000:8000 \
-v /path/to/project:/workspace \
-e MCP_AUTH_ENABLED=true \
-e MCP_OAUTH_ISSUER=https://YOUR_TENANT.us.auth0.com/ \
-e MCP_OAUTH_AUDIENCE=https://mcp.example.com/mcp \
-e MCP_ALLOWED_USER_SUBS=auth0|YOUR_SUBJECT \
gemini-remote-agent-mcpVerification
uv run ruff check .
uv run pytest
npx @modelcontextprotocol/inspectorDocumentation
docs/SECURITY.md— Production deployment checklist and incident response.docs/CLIENTS.md— Setup for Gemini Web (with KenEasy-Gemini-MCP-Auto-Helper + server circuit breaker), Gemini CLI, Claude Desktop, and Cursor.extension/README.md— Built-in Chrome/Edge MV3 auto-approval & keepalive companion extension (with bug-safe Allow Once first strategy and 6-layer circuit breaker).docs/PLAN.md— Architecture boundaries and acceptance criteria.
Available Tools
15 toolsedit_fileB
Replace exact text, optionally preview only. Existing files require expected_sha256.
Inputs: path (required), new_string (required), old_string (required), dry_run, +2 more. Returns: object
find_filesBRead-only
Find files using a relative glob such as '**/*.py'; results stay inside the workspace.
Inputs: pattern (required), path, max_results. Returns: object
git_restoreADestructiveIdempotent
Discard tracked edits only. Untracked files are preserved. Disabled by default.
Inputs: paths, source_ref, restore_all, confirm_destructive. Returns: object
git_status_diffBRead-only
Return branch/status and both diffs. Untracked files are listed, not dumped.
Inputs: include_diff, max_diff_chars. Returns: object
grep_searchBRead-only
Search with ripgrep. Matches include workspace-relative paths and line numbers.
Inputs: pattern (required), path, file_glob, max_matches. Returns: object
kill_bg_jobBDestructiveIdempotent
Terminate a background job and its child process tree.
Inputs: job_id (required), signal_name. Returns: object
list_bg_jobsARead-only
List active and recently exited background jobs with status and PID.
Inputs: no named parameters. Returns: object
list_directoryBRead-only
List directories recursively; omit ignored, sensitive, and symlinked entries.
Inputs: path, max_depth, max_entries. Returns: object
poll_bg_jobCRead-only
Poll job status and incremental output. Use next_offset for the next request.
Inputs: job_id (required), max_bytes, offset_bytes. Returns: object
read_fileBRead-only
Read UTF-8 lines (or tail_lines from EOF); pass returned sha256 to edit_file.
Inputs: path (required), end_line, start_line, tail_lines. Returns: object
read_multiple_filesBRead-only
Batch-read up to 10 workspace UTF-8 files in one call to save round-trips.
Inputs: paths (required), max_lines_per_file. Returns: object
run_commandBDestructive
Run a non-interactive shell command. OS isolation is required for untrusted callers.
Inputs: command (required), cwd, timeout_sec, max_output_chars. Returns: object
start_bg_jobBDestructive
Start a non-interactive long-running job; poll with the returned job_id.
Inputs: command (required), cwd. Returns: object
workspace_infoARead-only
Return workspace path, OS/shell environment, and active safety flags.
Inputs: no named parameters. Returns: object
write_fileBDestructiveIdempotent
Create a UTF-8 file or explicitly overwrite one with expected_sha256; returns a diff.
Inputs: path (required), content (required), dry_run, overwrite, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct action and resource: directory listing, glob-based file finding, content grep, single/batch reads, exact edits, overwrites, git status/diff, restore, shell execution, and background-job lifecycle. The read_file/read_multiple_files and edit_file/write_file pairs are clearly differentiated by batching and creation vs modification semantics.
All names use consistent snake_case and are mostly action-oriented resource names such as list_directory, read_file, run_command, and kill_bg_job. Minor deviations are workspace_info and git_status_diff, which are noun-first rather than verb-first.
With 15 tools, the server stays within a well-scoped range for a remote workspace agent. Each tool covers a necessary capability: filesystem reads/writes, search, git inspection/restore, command execution, and background-job management.
The surface covers core file operations, search, git status/diff/restore, shell commands, and background jobs. There are minor gaps such as no explicit delete/move/copy file tools and limited git operations, though run_command can work around many of these.
Maintenance
Related MCP Connectors
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
Streamable HTTP MCP gateway for NV oOS fleets — one API key, namespaced tools, quotas and policy.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceA local MCP server that enables Gemini Spark to safely access and work with files in a user-selected workspace via authenticated HTTPS tunnel, with sandboxing, policy enforcement, and audit logging.3-
- FlicenseNot gradedqualityBmaintenanceEnables Gemini Spark to securely connect via full OAuth 2.1 and use 30+ terminal, file, web, Git, and system management tools through MCP.-
- AlicenseNot gradedqualityBmaintenanceEnables Gemini Spark to securely read, edit, and search a selected local workspace, execute shell commands, and integrate development tools via MCP with user approval safeguards.1MIT
- AlicenseCqualityAmaintenanceProvides an MCP client with confined read/write access to one approved workspace, including file and directory CRUD, search, git, shell commands, Python tooling, data conversion, web fetch, HTTP testing, system diagnostics, and a todo list, under a security model with workspace confinement, secret redaction, audit logging, and optional read-only or command restrictions.68MIT