Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Stateless MCP server that proxies research queries to Gemini CLI, reducing agent context/model usage
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
GEMINI_API_KEY, PROJECT_ROOT, RESPONSE_CHUNK_SIZE_KB, CACHE_TTL_MS, DEBUG, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_CLOUD_PROJECT, VERTEX_AI_PROJECTค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"gemini-researcher": {
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"RESPONSE_CHUNK_SIZE_KB": "ใส่ค่าของคุณ",
"CACHE_TTL_MS": "ใส่ค่าของคุณ",
"DEBUG": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"VERTEX_AI_PROJECT": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add gemini-researcher --env GEMINI_API_KEY='ใส่ค่าของคุณ' --env PROJECT_ROOT='ใส่ค่าของคุณ' --env RESPONSE_CHUNK_SIZE_KB='ใส่ค่าของคุณ' --env CACHE_TTL_MS='ใส่ค่าของคุณ' --env DEBUG='ใส่ค่าของคุณ' --env GOOGLE_APPLICATION_CREDENTIALS='ใส่ค่าของคุณ' --env GOOGLE_CLOUD_PROJECT='ใส่ค่าของคุณ' --env VERTEX_AI_PROJECT='ใส่ค่าของคุณ' -- npx -y gemini-researcherเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"gemini-researcher": {
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"RESPONSE_CHUNK_SIZE_KB": "ใส่ค่าของคุณ",
"CACHE_TTL_MS": "ใส่ค่าของคุณ",
"DEBUG": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"VERTEX_AI_PROJECT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"gemini-researcher": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"gemini-researcher"
],
"env": {
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"RESPONSE_CHUNK_SIZE_KB": "ใส่ค่าของคุณ",
"CACHE_TTL_MS": "ใส่ค่าของคุณ",
"DEBUG": "ใส่ค่าของคุณ",
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"VERTEX_AI_PROJECT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
PROJECT_ROOT envRESPONSE_CHUNK_SIZE_KB envCACHE_TTL_MS envDEBUG envGOOGLE_APPLICATION_CREDENTIALS envGOOGLE_CLOUD_PROJECT envVERTEX_AI_PROJECT envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub capyBearista ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: GEMINI_API_KEY
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.0.2) เข้า registry 10 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
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:
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 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.
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:
--approval-mode default (not yolo mode) for controlled executionwrite_file, replace, run_shell_commandGEMINI_RESEARCHER_ENFORCE_ADMIN_POLICY=0 (not recommended)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 disablednpm install -g @google/gemini-cligemini → Login with Google) or set GEMINI_API_KEYQuick checks:
node --version
gemini --version
Run the setup wizard to verify Gemini CLI is installed and authenticated:
npx gemini-researcher init
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
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
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" } } } }
Ask your agent: "Use gemini-researcher to analyze the project."
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 -> autoWhen using API-key auth, fallback also handles model-unavailable/unsupported errors (not only quota/capacity errors).
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 }
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
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)
docs/platforms/windows.md| 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ตัดมาแค่ช่วงต้น อ่านต่อใน repo