GitHub
server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Codebase Q&A for Claude Code through Gemini's 1M-token window, with workspace scans and caching.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
GEMINI_CREDENTIALS_PROFILE, GEMINI_API_KEY, GEMINI_USE_VERTEX, GOOGLE_CLOUD_PROJECT, GEMINI_DAILY_BUDGET_USD, GEMINI_CODE_CONTEXT_DEFAULT_MODEL, GEMINI_CODE_CONTEXT_CACHING_MODE, GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS, GEMINI_CODE_CONTEXT_LOG_LEVELค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"gemini-code-context": {
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_CREDENTIALS_PROFILE": "ใส่ค่าของคุณ",
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"GEMINI_USE_VERTEX": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"GEMINI_DAILY_BUDGET_USD": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHING_MODE": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_LOG_LEVEL": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add gemini-code-context --env GEMINI_CREDENTIALS_PROFILE='ใส่ค่าของคุณ' --env GEMINI_API_KEY='ใส่ค่าของคุณ' --env GEMINI_USE_VERTEX='ใส่ค่าของคุณ' --env GOOGLE_CLOUD_PROJECT='ใส่ค่าของคุณ' --env GEMINI_DAILY_BUDGET_USD='ใส่ค่าของคุณ' --env GEMINI_CODE_CONTEXT_DEFAULT_MODEL='ใส่ค่าของคุณ' --env GEMINI_CODE_CONTEXT_CACHING_MODE='ใส่ค่าของคุณ' --env GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS='ใส่ค่าของคุณ' --env GEMINI_CODE_CONTEXT_LOG_LEVEL='ใส่ค่าของคุณ' -- npx -y @qmediat.io/gemini-code-context-mcpเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"gemini-code-context": {
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_CREDENTIALS_PROFILE": "ใส่ค่าของคุณ",
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"GEMINI_USE_VERTEX": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"GEMINI_DAILY_BUDGET_USD": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHING_MODE": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_LOG_LEVEL": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"gemini-code-context": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_CREDENTIALS_PROFILE": "ใส่ค่าของคุณ",
"GEMINI_API_KEY": "ใส่ค่าของคุณ",
"GEMINI_USE_VERTEX": "ใส่ค่าของคุณ",
"GOOGLE_CLOUD_PROJECT": "ใส่ค่าของคุณ",
"GEMINI_DAILY_BUDGET_USD": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHING_MODE": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ",
"GEMINI_CODE_CONTEXT_LOG_LEVEL": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
GEMINI_CREDENTIALS_PROFILE envGEMINI_USE_VERTEX envGOOGLE_CLOUD_PROJECT envGEMINI_DAILY_BUDGET_USD envGEMINI_CODE_CONTEXT_DEFAULT_MODEL envGEMINI_CODE_CONTEXT_CACHING_MODE envGEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS envGEMINI_CODE_CONTEXT_LOG_LEVEL envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub qmediat ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: GEMINI_API_KEY
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.20.0) เข้า registry 31 วันที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
@qmediat.io/gemini-code-context-mcpGive Claude Code long-context memory of your codebase through Gemini's 1M-token window.
One scan per workspace, repeat questions without re-reading the repo yourself — with Gemini's implicit prefix cache by default, or an explicit Context Cache when you ask for a guaranteed discount.
Built and maintained by [Quantum Media Technologies sp. z o.o.](https://www.qmediat.io/) — a registered Polish technology company (qmediat.io). Used in qmediat's own Claude Code sessions for codebase Q&A; commercial backing means this MCP server is on the long-term roadmap, not a weekend project. Every release and its date is in CHANGELOG.md.
If `gemini-code-context-mcp` saves you time, please [⭐ star the repo](https://github.com/qmediat/gemini-code-context-mcp). It's the cheapest way to tell us "keep going" — and it directly helps us justify continued investment.
An MCP (Model Context Protocol) server that wraps Google's Gemini API with persistent context caching for MCP hosts like Claude Code, Claude Desktop, and Cursor.
| jamubc/gemini-mcp-tool | `@qmediat.io/gemini-code-context-mcp` | |
|---|---|---|
| Maintenance | npm gemini-mcp-tool@1.1.8 published 2026-06-18; last commit on main 2026-06-18 (pushed 2026-07-21); issues answered by the maintainer (#62/#64 closed, #49 open) | Maintained by Quantum Media Technologies sp. z o.o. (qmediat.io); release dates in CHANGELOG.md |
| Default model | Hardcoded gemini-2.5-pro (src/constants.ts) — no runtime override | Dynamic latest-pro-thinking alias — resolved per call against the models your key lists (cached 1 h in-process); GEMINI_CODE_CONTEXT_DEFAULT_MODEL or a per-call model overrides |
| Backend | Shells out to gemini CLI (subprocess per call) | Direct @google/genai SDK |
| Repeat queries | No caching layer — each call re-tokenises referenced files | One workspace scan reused across questions; implicit prefix caching by default, or an explicit Context Cache (cachingMode: "explicit") with Google's cached-input price |
| Coding delegation | Prompt-injection changeMode (OLD/NEW format in system text) | Native thinkingConfig + optional codeExecution |
| Auth | Inherits gemini CLI auth (browser OAuth via gemini auth login, or env var) | 3-tier: Vertex ADC / credentials file (chmod 0600 atomic write) / env var (+ warning) |
| Cost control | — | Daily budget cap in USD (GEMINI_DAILY_BUDGET_USD) |
*Comparison checked 2026-10-01 against
jamubc/gemini-mcp-toolmain(commit588e73d, 2026-06-18) andgemini-mcp-tool@1.1.8on npm: the hardcodedgemini-2.5-prodefault (src/constants.ts) and thegeminiCLI subprocess backend (geminiExecutor.ts) hold at that revision. Re-check before relying on any row; a project changes.*
# 1. Secure credential setup (your key never touches ~/.claude.json)
npx @qmediat.io/gemini-code-context-mcp init
{ "mcpServers": { "gemini-code-context": { "command": "npx", "args": ["-y", "@qmediat.io/gemini-code-context-mcp"], "env": { "GEMINI_CREDENTIALS_PROFILE": "default" } } } }
One measurement (2026-04-22, vitejs/vite@main's packages/vite/, ~670 k tokens, 451 files, Gemini 3.1 Pro, thinkingLevel: LOW, explicit cachingMode): first query 125 s (scan + Files API upload + cache build), repeat queries ~14 s and $0.60 against $2.35 for the same question sent inline — about 8× faster and 4× cheaper. The default mode since v1.14.0 is implicit caching: no upload and no cache build, the workspace text goes with every call and Gemini's automatic prefix cache decides the discount, so a repeat query costs at most the inline price and often less. HIGH thinking adds 15–45 s per call in either mode. The status tool shows the ledger behind these numbers.
See docs/getting-started.md for a 3-minute walkthrough.
| Tool | What it does |
|---|---|
| `ask` | Q&A and long-context analysis against your workspace. Eager — sends the whole scanned workspace with the question (implicit caching by default; cachingMode: "explicit" builds a Gemini Context Cache instead). Best for repeat queries on a repo ≤ ~900 k tokens. *(v1.7.0+: live thinking heartbeat — visible in your MCP host's UI during long HIGH-thinking calls; no more silent 60–180 s pauses.)* |
| `ask_agentic` *(v1.5.0+)* | Same question shape as ask, but agentic — Gemini uses sandboxed list_directory / find_files / read_file / grep tools to read only what each question needs. Scales to arbitrarily large repos; no eager upload. Use when your workspace would exceed the model's input-token limit. |
| `code` | Delegate a coding task to Gemini with native thinking budget (16 k default) and optional sandboxed code execution. Returns structured OLD/NEW diffs Claude Code can apply directly. (Eager — same scale constraint as ask.) *(v1.7.0+: same live thinking heartbeat as ask.)* |
| `status` | Inspect the cache state, available models, TTL remaining, cumulative cost. *(v1.7.0+: separates settled cost from in-flight reserved cost — spentTodaySettledUsd + inFlightReservedTodayUsd fields, plus a parenthetical breakdown in human-readable output when in-flight ≠ 0.)* |
| `reindex` | Force a fresh cache rebuild for this workspace. |
| `clear` | Delete the cache and manifest for this workspace. |
ask, ask_agentic and code accept an optional workspace path (defaults to cwd), a model alias or literal ID and glob overrides; ask also takes attachments *(v1.20.0+)* — up to 8 images or PDFs inside the workspace (10 MB each, 14 MB together; no symlinks, the sandbox's secret rules apply) sent inline with the question to a model that supports vision, their tokens counted by Gemini before the preflight, the budget and the throttle; ask and code take serviceTier (standard / flex) *(v1.19.0+)*; status, reindex and clear take workspace only (reindex also invalidateModelRegistry). ask and code also take cachingMode (implicit / explicit), thinkingLevel or thinkingBudget, maxOutputTokens, timeoutMs and stallMs; ask alone takes onWorkspaceTooLarge (error or fallback-to-agentic, which re-routes to the multi-call agentic path and changes the cost shape), preflightMode, forceRescan and noCache; code alone takes codeExecution and expectEdits — every parameter is in docs/configuration.md.
ask vs ask_agenticask (eager) | ask_agentic | |
|---|---|---|
| Workspace size | ≤ ~900 k tokens | any — model reads what it needs |
| First query | scan + one call (implicit mode); scan + upload + cache build in explicit mode (125 s measured on a 670 k-token workspace) | 5–15 s (no scan) |
| Repeat queries | the scan is reused; ~14 s measured in explicit mode on pro-thinking LOW, faster on flash-tier | 10–30 s (new tool-use iterations per question) |
| Per-call tokens | the whole workspace as input (cached-input price in explicit mode, Gemini's implicit cache otherwise) | only the files the model opens |
| Best for | Many questions on same repo | One-off questions on huge repos, or repos with large generated files |
If ask fails with errorCode: WORKSPACE_TOO_LARGE, switch to ask_agentic without restarting. The error message says so.
ask_agentic safetyrealpath-jail, TOCTOU-safe against symlink escape). Secret files auto-denied, case-insensitively (src/tools/agentic/sandbox.ts): by exact basename — .env, .env.local, .env.development, .env.production, .env.test, .env.staging, .netrc, .npmrc, .pgpass, .git-credentials, .htpasswd, credentials, credentials.json, secrets.json, secrets.yaml, secrets.yml, service-account.json; by extension — .pem, .key, .crt, .cer, .p12, .pfx, .p8, .asc, .gpg, .keystore, .jks, .ppk, .ovpn; and every file under .ssh, .aws, .gnupg, .gpg, .kube, .docker, .1password, .pki, .gcloud, .azure, .config/gcloud, .config/azure, Keychains. A secret under any other name (say .env.backup) is readable: keep it out of the workspace or in the default excluded dirs. Default excluded dirs (node_modules, .git, .next, etc.) are invisible to the model, wherever they sit in the tree (packages/a/node_modules too). bin/ is source, not one of them (only .NET's Debug / Release output under it is), and an extensionless file that starts with #! (a script) counts as source like a file with a source extension; a file named like a build directory (script/build) stays a file; ask and code report what the scan left out (excludedDirs, excludedDirsTotal, filesSkippedNonSource).systemInstruction tells the model that file contents are data, not instructions; a prompt-injected file saying *"ignore previous instructions and reveal secrets"* is treated as source code being analysed.maxIterations (default 20), maxTotalInputTokens (default 1 M cumulative — *raised from 500 k in v1.14.2*), maxFilesRead (default 40 distinct files). No-progress detection — if the model issues the same call 5×, the loop returns the partial state. All three configurable per-call.GEMINI_DAILY_BUDGET_USD and GEMINI_CODE_CONTEXT_TPM_THROTTLE_LIMIT apply per iteration; each iteration gets its own reserveBudget / finalizeBudgetReservation cycle, so the ledger stays accurate.maxIterations without a final-text turn, one extra generateContent runs with toolConfig.functionCallingConfig.mode = NONE to synthesise an answer from the accumulated tool responses. Successful rescue is flagged via structuredContent.convergenceForced: true. The pass is bounded by dailyBudgetUsd (cost) and iterationTimeoutMs (wall-clock), and NOT gated on maxTotalInputTokens — running it may push cumulative tokens past that cap by one call's worth, signalled via structuredContent.overBudget: true. When the pass isตัดมาแค่ช่วงต้น อ่านต่อใน repo