Gemini Researcher
概览
作者提供的说明(英文原文)
Stateless MCP server that proxies research queries to Gemini CLI, reducing agent context/model usage
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 搜索与 AI 记忆
- 你需要填写:GEMINI_API_KEY
安装
选择你使用的 AI 应用,然后复制设置。
通过 1/2 项检查 · 在你的电脑上运行
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
打开电脑版 Claude 应用的设置文件
SettingsDeveloperEdit Config
粘贴这些设置并保存文件
{ "mcpServers": { "gemini-researcher": { "command": "npx", "args": [ "-y", "gemini-researcher" ], "env": { "GEMINI_API_KEY": "your-value", "PROJECT_ROOT": "your-value", "RESPONSE_CHUNK_SIZE_KB": "your-value", "CACHE_TTL_MS": "your-value", "DEBUG": "your-value", "GOOGLE_APPLICATION_CREDENTIALS": "your-value", "GOOGLE_CLOUD_PROJECT": "your-value", "VERTEX_AI_PROJECT": "your-value" } } } }只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
退出 Claude 再重新打开
试一试
用 Gemini Researcher 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Gemini Researcher,或回答中出现 Gemini Researcher 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 Gemini Researcher
Gemini Researcher 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
你可以改用这些方式
A · 使用能连接 Gemini Researcher 的应用
- 需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
- 需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
- 需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
- 需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
B · 搜索与 AI 记忆 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
- AIHOT✓ ChatGPT
- Sui Knowledge Base (kapa.ai)✓ ChatGPT
- Exa✓ ChatGPT
可连接 Claude Code,但需要先准备
需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
注册并创建 Gemini Researcher 的密钥
打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。
获取密钥的方法见下方开发者的 README
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add gemini-researcher --env GEMINI_API_KEY=your-value --env PROJECT_ROOT=your-value --env RESPONSE_CHUNK_SIZE_KB=your-value --env CACHE_TTL_MS=your-value --env DEBUG=your-value --env GOOGLE_APPLICATION_CREDENTIALS=your-value --env GOOGLE_CLOUD_PROJECT=your-value --env VERTEX_AI_PROJECT=your-value -- npx -y gemini-researcher按 Enter 前,把“your-value”改成你的密钥
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Claude Code 中输入 /mcp
应能看到 Gemini Researcher 在列表中并显示已连接
试一试
用 Gemini Researcher 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Gemini Researcher,或回答中出现 Gemini Researcher 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
注册并创建 Gemini Researcher 的密钥
打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。
获取密钥的方法见下方开发者的 README
填写你的密钥
在 Gemini Researcher 的设置中,GEMINI_API_KEY, PROJECT_ROOT, RESPONSE_CHUNK_SIZE_KB, CACHE_TTL_MS, DEBUG, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_CLOUD_PROJECT, VERTEX_AI_PROJECT 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 Gemini Researcher 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Gemini Researcher,或回答中出现 Gemini Researcher 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要 Gemini Researcher 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
注册并创建 Gemini Researcher 的密钥
打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。
获取密钥的方法见下方开发者的 README
填写你的密钥
在 Gemini Researcher 的设置中,GEMINI_API_KEY, PROJECT_ROOT, RESPONSE_CHUNK_SIZE_KB, CACHE_TTL_MS, DEBUG, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_CLOUD_PROJECT, VERTEX_AI_PROJECT 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 Gemini Researcher 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Gemini Researcher,或回答中出现 Gemini Researcher 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
开发者专用:终端命令和 JSON 设置
安装在电脑上
Claude Code
claude mcp add gemini-researcher --env GEMINI_API_KEY=your-value --env PROJECT_ROOT=your-value --env RESPONSE_CHUNK_SIZE_KB=your-value --env CACHE_TTL_MS=your-value --env DEBUG=your-value --env GOOGLE_APPLICATION_CREDENTIALS=your-value --env GOOGLE_CLOUD_PROJECT=your-value --env VERTEX_AI_PROJECT=your-value -- npx -y gemini-researcherClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"gemini-researcher": {
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "your-value",
"PROJECT_ROOT": "your-value",
"RESPONSE_CHUNK_SIZE_KB": "your-value",
"CACHE_TTL_MS": "your-value",
"DEBUG": "your-value",
"GOOGLE_APPLICATION_CREDENTIALS": "your-value",
"GOOGLE_CLOUD_PROJECT": "your-value",
"VERTEX_AI_PROJECT": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"gemini-researcher": {
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "your-value",
"PROJECT_ROOT": "your-value",
"RESPONSE_CHUNK_SIZE_KB": "your-value",
"CACHE_TTL_MS": "your-value",
"DEBUG": "your-value",
"GOOGLE_APPLICATION_CREDENTIALS": "your-value",
"GOOGLE_CLOUD_PROJECT": "your-value",
"VERTEX_AI_PROJECT": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"gemini-researcher": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "your-value",
"PROJECT_ROOT": "your-value",
"RESPONSE_CHUNK_SIZE_KB": "your-value",
"CACHE_TTL_MS": "your-value",
"DEBUG": "your-value",
"GOOGLE_APPLICATION_CREDENTIALS": "your-value",
"GOOGLE_CLOUD_PROJECT": "your-value",
"VERTEX_AI_PROJECT": "your-value"
}
}
}
}需要你填写的值
GEMINI_API_KEY机密 envGemini API key (optional if you already authenticated Gemini CLI via "gemini" login)PROJECT_ROOTenvOverride the project root directory used for path validation (defaults to current working directory)RESPONSE_CHUNK_SIZE_KBenvChunk size threshold (KB) for large responses (default: 10)CACHE_TTL_MSenvChunk cache TTL in milliseconds (default: 3600000 / 1 hour)DEBUGenvEnable debug logging (set to "true" or "1")GOOGLE_APPLICATION_CREDENTIALSenvVertex AI / Google auth: path to a service account JSON credentials fileGOOGLE_CLOUD_PROJECTenvVertex AI / Google auth: GCP project ID (used by some auth configurations)VERTEX_AI_PROJECTenvVertex AI / Google auth: Vertex AI project identifier (used by some auth configurations)
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月12日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 capyBearista 验证,该账户拥有此仓库
- ✕ 未通过
仍在维护
超过一年没有代码更新,或仓库已归档
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“搜索与 AI 记忆”中的其他服务器比较i
- 星标数多于此分类中其他 5956 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5956 个服务器的 2% 更新
- 基础检查结果等于或优于此分类中其他 5956 个服务器的 12%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Gemini Researcher 安全吗?
它在 2 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:GEMINI_API_KEY
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于5个月前,最新版本(1.0.2)于10个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:Ruflo, Context7, Metabase
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Gemini Researcher
A lightweight, stateless MCP (Model Context Protocol) server that lets developer agents (Claude Code, GitHub Copilot) hand off deep repository analysis to the Gemini CLI. The server is read-only, returns structured JSON (as text content), and is designed to reduce the calling agent's context and model usage.
Status: v1 complete. Core features are stable, but still early days. Feedback welcome!
If this saved you tokens, ⭐ please consider giving it a star! :)
The primary goals:
- Reduce agent context usage by letting Gemini CLI read large codebases locally and do its own research
- Reduce calling-agent model usage by offloading heavy analysis to Gemini
- Keep the server stateless and read-only for safety
Why use this?
Instead of copying entire files into your agent's context (burning tokens and cluttering the conversation), this server lets Gemini CLI read files directly from your project. Your agent sends a research query, Gemini reads and synthesizes using its large context window, and returns structured results. You save tokens, your agent stays focused, and complex codebase analysis becomes practical.
Verified clients: Claude Code, Cursor, VS Code (GitHub Copilot)
[!NOTE]
It definitely works with other clients, but I haven't personally tested them yet. Please open an issue if you try it elsewhere!
Table of contents
- Gemini Researcher
- Overview
- Prerequisites
- Quickstart
- Step 1: Validate environment
- Step 2: Configure your MCP client
- Step 3: Restart your MCP client
- Step 4: Test it
- Tools
- Example workflows
- Docker
- Platform guides
- Troubleshooting (common issues)
- Contributing
- License
Overview
Gemini Researcher accepts queries from your AI agent and uses Gemini CLI to analyze your local code files. Results are returned as formatted JSON for your agent to use.
Runtime safety
The server runs Gemini CLI with safety restrictions enabled. See docs/runtime-contract.md for full technical details.
Default invocation pattern:
gemini [ -m <model> ] --output-format json --approval-mode default [--admin-policy <path>] -p "<prompt>"
Key safety points:
- Uses
--approval-mode default(not yolo mode) for controlled execution - Enforces read-only policy by default to prevent file changes
- Policy blocks mutating tools like
write_file,replace,run_shell_command - Strict enforcement can be disabled with
GEMINI_RESEARCHER_ENFORCE_ADMIN_POLICY=0(not recommended)
Auth and health check
Run health_check with includeDiagnostics: true to see auth status and server health.
| authStatus | What it means | Impact |
|---|---|---|
configured | Gemini CLI is authenticated | Server ready to use |
unauthenticated | No valid authentication found | Server marked as degraded |
unknown | Could not verify auth status | Server marked as degraded |
health_check.status values:
ok: Gemini CLI is available, auth is working, and safety policy is enforceddegraded: Setup incomplete, auth unclear, or safety policy disabled
Prerequisites
- Node.js 18+ installed
- Gemini CLI installed:
npm install -g @google/gemini-cli - Gemini CLI authenticated (recommended:
gemini→ Login with Google) or setGEMINI_API_KEY
Quick checks:
node --version
gemini --version
Quickstart
Step 1: Validate environment
Run the setup wizard to verify Gemini CLI is installed and authenticated:
npx gemini-researcher init
Step 2: Configure your MCP client
Standard config works in most of the tools:
{
"mcpServers": { "gemini-researcher": { "command": "npx", "args": [ "gemini-researcher" ] } } }
[!NOTE]
On native Windows, some MCP hosts use shell-less process spawning and may not resolve npm command shims reliably (
npx,gemini).
If startup fails with launch errors (
spawn ... ENOENT/GEMINI_CLI_LAUNCH_FAILEDdespite working in PowerShell), prefer Docker or WSL for immediate reliability.
See the full remediation tree in
docs/platforms/windows.md.
VS Code
Add to your VS Code MCP settings (create .vscode/mcp.json if needed):
{
"servers": { "gemini-researcher": { "command": "npx", "args": [ "gemini-researcher" ] } } }
Claude Code
Option 1: Command line (recommended)
Local (user-wide) scope
# Add the MCP server via CLI
claude mcp add --transport stdio gemini-researcher -- npx gemini-researcher
Verify it was added
claude mcp list
Project scope
Navigate to your project directory, then run:
# Add the MCP server via CLI
claude mcp add --scope project --transport stdio gemini-researcher -- npx gemini-researcher
Verify it was added
claude mcp list
Option 2: Manual configuration
Add to .mcp.json in your project root (project scope):
{
"mcpServers": { "gemini-researcher": { "command": "npx", "args": [ "gemini-researcher" ] } } }
Or add to ~/.claude/settings.json for local scope.
After adding the server, restart Claude Code and use /mcp to verify the connection.
Cursor
Go to Cursor Settings -> Tools & MCP -> Add a Custom MCP Server. Add the following configuration:
{
"mcpServers": { "gemini-researcher": { "type": "stdio", "command": "npx", "args": [ "gemini-researcher" ] } } }
[!NOTE]
The server automatically uses the directory where the IDE opened your workspace as the project root or where your terminal is. To analyze a different directory, optionally set
PROJECT_ROOT:
Example
{
"mcpServers": { "gemini-researcher": { "command": "npx", "args": [ "gemini-researcher" ], "env": { "PROJECT_ROOT": "/path/to/your/project" } } } }
Step 3: Restart your MCP client
Step 4: Test it
Ask your agent: "Use gemini-researcher to analyze the project."
Tools
All tools return structured JSON (as MCP text content). Large responses are chunked (~10KB per chunk) and cached for 1 hour.
| Tool | Purpose | When to use |
|---|---|---|
quick_query | Fast analysis with flash model | Quick questions about specific files or small code sections |
deep_research | In-depth analysis with pro model | Complex multi-file analysis, architecture reviews, security audits |
analyze_directory | Map directory structure | Understanding unfamiliar codebases, generating project overviews |
validate_paths | Pre-check file paths | Verify files exist before running expensive queries |
health_check | Diagnostics | Troubleshooting server/Gemini CLI issues |
fetch_chunk | Get chunked responses | Retrieve remaining parts of large responses |
Query tool fallback chains are family-aware:
quick_query:flash -> flash_lite -> autodeep_research:pro -> flash -> flash_lite -> autoanalyze_directory:flash -> flash_lite -> auto
When using API-key auth, fallback also handles model-unavailable/unsupported errors (not only quota/capacity errors).
Example workflows
Understanding a security vulnerability:
Agent: Use deep_research to analyze authentication flow across @src/auth and @src/middleware, focusing on security
Quick code explanation:
Agent: Use quick_query to explain the login flow in @src/auth.ts, be concise
Mapping an unfamiliar codebase:
Agent: Use analyze_directory on src/ with depth 3 to understand the project structure
Full tool schemas (for reference)
quick_query
{
"prompt": "Explain @src/auth.ts login flow", "focus": "security", "responseStyle": "concise" }
deep_research
{
"prompt": "Analyze authentication across @src/auth and @src/middleware", "focus": "architecture", "citationMode": "paths_only" }
analyze_directory
{
"path": "src", "depth": 3, "maxFiles": 200 }
validate_paths
{
"paths": ["src/auth.ts", "README.md"] }
health_check
{
"includeDiagnostics": true }
fetch_chunk
{
"cacheKey": "cache_abc123", "chunkIndex": 2 }
Docker
A pre-built multi-platform Docker image is available on Docker Hub:
# Pull the image (works on Intel/AMD and Apple Silicon)
docker pull capybearista/gemini-researcher:latest
Run the server (mount your project and provide API key)
docker run -i --rm \ -e GEMINI_API_KEY="your-api-key" \ -v /path/to/your/project:/workspace \ capybearista/gemini-researcher:latest
For MCP client configuration with Docker:
{
"mcpServers": { "gemini-researcher": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GEMINI_API_KEY", "-v", "/path/to/your/project:/workspace", "capybearista/gemini-researcher:latest" ], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }
[!NOTE]
- The
-iflag is required for stdio transport
- The container mounts your project to
/workspace(the project root)
- Replace
/path/to/your/projectwith your actual project path
- Replace
your-api-keywith your actual Gemini API key (this is required for Docker usage)
Platform guides
- Native Windows launch model and remediation:
docs/platforms/windows.md
Troubleshooting (common issues)
- Remediation decision tree:
| Error / signal | Run this check first | Change this configuration next |
|---|---|---|
GEMINI_CLI_LAUNCH_FAILED or spawn ... ENOENT | gemini --help and npx --version in the same terminal profile used by your MCP host | Prefer Docker or WSL config. If staying native, point host command to a stable shim/binary path and restart host. |
health_check warning: "resolves only through cmd /c fallback" | Run health_check with includeDiagnostics: true and inspect diagnostics.resolution | Update host config to launch the reported .cmd shim directly instead of relying on cmd /c fallback. |
MCP host cannot launch server via npx | npx --version | Change host server command from npx gemini-researcher to installed binary path (or Docker transport). |
ADMIN_POLICY_UNSUPPORTED / output format unsupported | gemini --help and confirm --admin-policy, json, stream-json | Upgrade Gemini CLI to v0.36.0+ |
AUTH_MISSING / AUTH_UNKNOWN | gemini interactive login and rerun health_check | Authenticate Gemini CLI or set GEMINI_API_KEY |
GEMINI_CLI_NOT_FOUND: Install Gemini CLI:npm install -g @google/gemini-cliGEMINI_CLI_LAUNCH_FAILED: This is a launch-path issue, not an auth/capability issue. On Windows, command shims can fail in shell-l