[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-zilliztech--claude-context":3,"tool-zilliztech--claude-context":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":101,"forks":102,"last_commit_at":103,"license":104,"difficulty_score":32,"env_os":105,"env_gpu":106,"env_ram":106,"env_deps":107,"category_tags":114,"github_topics":115,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":135,"updated_at":136,"faqs":137,"releases":166},8672,"zilliztech\u002Fclaude-context","claude-context","Code search MCP for Claude Code. Make entire codebase the context for any coding agent.","claude-context 是一款专为 Claude Code 设计的开源插件，旨在通过语义代码搜索技术，将整个代码库转化为 AI 编程助手的深度上下文。它解决了传统方式中 AI 难以全面理解大型项目结构、需要多轮对话探索代码，以及直接加载全量文件导致成本高昂的痛点。\n\n对于开发者而言，尤其是维护复杂或大规模代码库的团队，claude-context 能显著提升编码效率。它无需人工逐层指引，即可让 AI 自动定位并理解数百万行代码中的关键逻辑，仿佛拥有了项目的“全局记忆”。其核心技术亮点在于引入了向量数据库（支持 Zilliz Cloud），将代码库高效存储为语义索引。当发起请求时，系统仅提取最相关的代码片段注入上下文，既保证了回答的精准度，又大幅降低了 Token 消耗和使用成本。\n\n该工具基于 Model Context Protocol (MCP) 构建，轻松集成至各类 AI 编程助手工作流中。只要具备 Node.js 环境并配置好相应的 API 密钥，开发者即可快速启用，让 AI 真正读懂你的整个项目，从而更智能地辅助代码编写、重构与调试任务。","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_55fa246fc08e.png)\n\n> 🆕 **Looking for persistent memory for Claude Code?** Check out [memsearch Claude Code plugin](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fmemsearch\u002Ftree\u002Fmain\u002Fplugins\u002Fclaude-code) — a markdown-first memory system that gives your AI agent long-term memory across sessions.\n\n### Your entire codebase as Claude's context\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-20%2B-green.svg)](https:\u002F\u002Fnodejs.org\u002F)\n[![Documentation](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocumentation-📚-orange.svg)](docs\u002F)\n[![VS Code Marketplace](https:\u002F\u002Fimg.shields.io\u002Fvisual-studio-marketplace\u002Fv\u002Fzilliz.semanticcodesearch?label=VS%20Code%20Extension&logo=visual-studio-code)](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n[![npm - core](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@zilliz\u002Fclaude-context-core?label=%40zilliz%2Fclaude-context-core&logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@zilliz\u002Fclaude-context-core)\n[![npm - mcp](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@zilliz\u002Fclaude-context-mcp?label=%40zilliz%2Fclaude-context-mcp&logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@zilliz\u002Fclaude-context-mcp)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fzilliz_universe.svg?style=social&label=Follow%20%40Zilliz)](https:\u002F\u002Ftwitter.com\u002Fzilliz_universe)\n[![DeepWiki](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDeepWiki-AI%20Docs-purple.svg?logo=gitbook&logoColor=white)](https:\u002F\u002Fdeepwiki.com\u002Fzilliztech\u002Fclaude-context)\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FmKc3R95yE5\">\u003Cimg height=\"20\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white\" alt=\"discord\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n**Claude Context** is an MCP plugin that adds semantic code search to Claude Code and other AI coding agents, giving them deep context from your entire codebase.\n\n🧠 **Your Entire Codebase as Context**: Claude Context uses semantic search to find all relevant code from millions of lines. No multi-round discovery needed. It brings results straight into the Claude's context.\n\n💰 **Cost-Effective for Large Codebases**: Instead of loading entire directories into Claude for every request, which can be very expensive, Claude Context efficiently stores your codebase in a vector database and only uses related code in context to keep your costs manageable.\n\n---\n\n## 🚀 Demo\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_896511f59e20.png)\n\nModel Context Protocol (MCP) allows you to integrate Claude Context with your favorite AI coding assistants, e.g. Claude Code.\n\n## Quick Start\n\n### Prerequisites\n\n\u003Cdetails>\n\u003Csummary>Get a free vector database on Zilliz Cloud 👈\u003C\u002Fsummary>\n\nClaude Context needs a vector database. You can [sign up](https:\u002F\u002Fcloud.zilliz.com\u002Fsignup?utm_source=github&utm_medium=referral&utm_campaign=2507-codecontext-readme) on Zilliz Cloud to get an API key.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_d66df5e37ce0.png)\n\nCopy your Personal Key to replace `your-zilliz-cloud-api-key` in the configuration examples.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Get OpenAI API Key for embedding model\u003C\u002Fsummary>\n\nYou need an OpenAI API key for the embedding model. You can get one by signing up at [OpenAI](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys).  \n\nYour API key will look like this: it always starts with `sk-`.  \nCopy your key and use it in the configuration examples below as `your-openai-api-key`.\n\n\u003C\u002Fdetails>\n\n### Configure MCP for Claude Code\n\n**System Requirements:**\n\n- Node.js >= 20.0.0 and \u003C 24.0.0\n\n> Claude Context is not compatible with Node.js 24.0.0, you need downgrade it first if your node version is greater or equal to 24.\n\n#### Configuration\n\nUse the command line interface to add the Claude Context MCP server:\n\n```bash\nclaude mcp add claude-context \\\n  -e OPENAI_API_KEY=sk-your-openai-api-key \\\n  -e MILVUS_TOKEN=your-zilliz-cloud-api-key \\\n  -- npx @zilliz\u002Fclaude-context-mcp@latest\n```\n\nSee the [Claude Code MCP documentation](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Fmcp) for more details about MCP server management.\n\n### Other MCP Client Configurations\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>OpenAI Codex CLI\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCodex CLI uses TOML configuration files:\n\n1. Create or edit the `~\u002F.codex\u002Fconfig.toml` file.\n\n2. Add the following configuration:\n\n```toml\n# IMPORTANT: the top-level key is `mcp_servers` rather than `mcpServers`.\n[mcp_servers.claude-context]\ncommand = \"npx\"\nargs = [\"@zilliz\u002Fclaude-context-mcp@latest\"]\nenv = { \"OPENAI_API_KEY\" = \"your-openai-api-key\", \"MILVUS_TOKEN\" = \"your-zilliz-cloud-api-key\" }\n# Optional: override the default 10s startup timeout\nstartup_timeout_ms = 20000\n```\n\n3. Save the file and restart Codex CLI to apply the changes.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Gemini CLI\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nGemini CLI requires manual configuration through a JSON file:\n\n1. Create or edit the `~\u002F.gemini\u002Fsettings.json` file.\n2. Add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n3. Save the file and restart Gemini CLI to apply the changes.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Qwen Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCreate or edit the `~\u002F.qwen\u002Fsettings.json` file and add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cursor\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nGo to: `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`\n\nPasting the following configuration into your Cursor `~\u002F.cursor\u002Fmcp.json` file is the recommended approach. You may also install in a specific project by creating `.cursor\u002Fmcp.json` in your project folder. See [Cursor MCP docs](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcontext\u002Fmcp) for more info.\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Void\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nGo to: `Settings` -> `MCP` -> `Add MCP Server`\n\nAdd the following configuration to your Void MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"code-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Claude Desktop\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nAdd to your Claude Desktop configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Windsurf\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nWindsurf supports MCP configuration through a JSON file. Add the following configuration to your Windsurf MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>VS Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe Claude Context MCP server can be used with VS Code through MCP-compatible extensions. Add the following configuration to your VS Code MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cherry Studio\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCherry Studio allows for visual MCP server configuration through its settings interface. While it doesn't directly support manual JSON configuration, you can add a new server via the GUI:\n\n1. Navigate to **Settings → MCP Servers → Add Server**.\n2. Fill in the server details:\n   - **Name**: `claude-context`\n   - **Type**: `STDIO`\n   - **Command**: `npx`\n   - **Arguments**: `[\"@zilliz\u002Fclaude-context-mcp@latest\"]`\n   - **Environment Variables**:\n     - `OPENAI_API_KEY`: `your-openai-api-key`\n     - `MILVUS_ADDRESS`: `your-zilliz-cloud-public-endpoint`\n     - `MILVUS_TOKEN`: `your-zilliz-cloud-api-key`\n3. Save the configuration to activate the server.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cline\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCline uses a JSON configuration file to manage MCP servers. To integrate the provided MCP server configuration:\n\n1. Open Cline and click on the **MCP Servers** icon in the top navigation bar.\n\n2. Select the **Installed** tab, then click **Advanced MCP Settings**.\n\n3. In the `cline_mcp_settings.json` file, add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n4. Save the file.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Augment\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nTo configure Claude Context MCP in Augment Code, you can use either the graphical interface or manual configuration.\n\n#### **A. Using the Augment Code UI**\n\n1. Click the hamburger menu.\n\n2. Select **Settings**.\n\n3. Navigate to the **Tools** section.\n\n4. Click the **+ Add MCP** button.\n\n5. Enter the following command:\n\n   ```\n   npx @zilliz\u002Fclaude-context-mcp@latest\n   ```\n\n6. Name the MCP: **Claude Context**.\n\n7. Click the **Add** button.\n\n------\n\n#### **B. Manual Configuration**\n\n1. Press Cmd\u002FCtrl Shift P or go to the hamburger menu in the Augment panel\n2. Select Edit Settings\n3. Under Advanced, click Edit in settings.json\n4. Add the server configuration to the `mcpServers` array in the `augment.advanced` object\n\n```json\n\"augment.advanced\": { \n  \"mcpServers\": [ \n    { \n      \"name\": \"claude-context\", \n      \"command\": \"npx\", \n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  ]\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Roo Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nRoo Code utilizes a JSON configuration file for MCP servers:\n\n1. Open Roo Code and navigate to **Settings → MCP Servers → Edit Global Config**.\n\n2. In the `mcp_settings.json` file, add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n3. Save the file to activate the server.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Zencoder\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nZencoder offers support for MCP tools and servers in both its JetBrains and VS Code plugin versions.\n\n1. Go to the Zencoder menu (...)\n2. From the dropdown menu, select `Tools`\n3. Click on the `Add Custom MCP`\n4. Add the name (i.e. `Claude Context` and server configuration from below, and make sure to hit the `Install` button\n\n```json\n{\n    \"command\": \"npx\",\n    \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n    \"env\": {\n      \"OPENAI_API_KEY\": \"your-openai-api-key\",\n      \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n      \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n    }\n}\n\n```\n\n5. Save the server by hitting the `Install` button.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>LangChain\u002FLangGraph\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nFor LangChain\u002FLangGraph integration examples, see [this example](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fblob\u002F643796a0d30e706a2a0dff3d55621c9b5d831807\u002Fevaluation\u002Fretrieval\u002Fcustom.py#L88).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Other MCP Clients\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client by running:\n\n```bash\nnpx @zilliz\u002Fclaude-context-mcp@latest\n```\n\n\u003C\u002Fdetails>\n\n---\n\n### Usage in Your Codebase\n\n1. **Open Claude Code**\n\n   ```\n   cd your-project-directory\n   claude\n   ```\n\n2. **Index your codebase**:\n\n   ```\n   Index this codebase\n   ```\n\n3. **Check indexing status**:\n\n   ```\n   Check the indexing status\n   ```\n\n4. **Start searching**:\n\n   ```\n   Find functions that handle user authentication\n   ```\n\n🎉 **That's it!** You now have semantic code search in Claude Code.\n\n---\n\n### Environment Variables Configuration\n\nFor more detailed MCP environment variable configuration, see our [Environment Variables Guide](docs\u002Fgetting-started\u002Fenvironment-variables.md).\n\n### Using Different Embedding Models\n\nTo configure custom embedding models (e.g., `text-embedding-3-large` for OpenAI, `voyage-code-3` for VoyageAI), see the [MCP Configuration Examples](packages\u002Fmcp\u002FREADME.md#embedding-provider-configuration) for detailed setup instructions for each provider.\n\n### File Inclusion & Exclusion Rules\n\nFor detailed explanation of file inclusion and exclusion rules, and how to customize them, see our [File Inclusion & Exclusion Rules](docs\u002Fdive-deep\u002Ffile-inclusion-rules.md).\n\n### Available Tools\n\n#### 1. `index_codebase`\n\nIndex a codebase directory for hybrid search (BM25 + dense vector).\n\n#### 2. `search_code`\n\nSearch the indexed codebase using natural language queries with hybrid search (BM25 + dense vector).\n\n#### 3. `clear_index`\n\nClear the search index for a specific codebase.\n\n#### 4. `get_indexing_status`\n\nGet the current indexing status of a codebase. Shows progress percentage for actively indexing codebases and completion status for indexed codebases.\n\n---\n\n## 📊 Evaluation\n\nOur controlled evaluation demonstrates that Claude Context MCP achieves ~40% token reduction under the condition of equivalent retrieval quality. This translates to significant cost and time savings in production environments. This also means that, under the constraint of limited token context length, using Claude Context yields better retrieval and answer results.\n\n![MCP Efficiency Analysis](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_0541e1c6ea99.png)\n\nFor detailed evaluation methodology and results, see the [evaluation directory](evaluation\u002F).\n\n---\n\n## 🏗️ Architecture\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_1a0efb1ada1c.png)\n\n### 🔧 Implementation Details\n\n- 🔍 **Hybrid Code Search**: Ask questions like *\"find functions that handle user authentication\"* and get relevant, context-rich code instantly using advanced hybrid search (BM25 + dense vector).\n- 🧠 **Context-Aware**: Discover large codebase, understand how different parts of your codebase relate, even across millions of lines of code.\n- ⚡ **Incremental Indexing**: Efficiently re-index only changed files using Merkle trees.\n- 🧩 **Intelligent Code Chunking**: Analyze code in Abstract Syntax Trees (AST) for chunking.\n- 🗄️ **Scalable**: Integrates with Zilliz Cloud for scalable vector search, no matter how large your codebase is.\n- 🛠️ **Customizable**: Configure file extensions, ignore patterns, and embedding models.\n\n### Core Components\n\nClaude Context is a monorepo containing three main packages:\n\n- **`@zilliz\u002Fclaude-context-core`**: Core indexing engine with embedding and vector database integration\n- **VSCode Extension**: Semantic Code Search extension for Visual Studio Code\n- **`@zilliz\u002Fclaude-context-mcp`**: Model Context Protocol server for AI agent integration\n\n### Supported Technologies\n\n- **Embedding Providers**: [OpenAI](https:\u002F\u002Fopenai.com), [VoyageAI](https:\u002F\u002Fvoyageai.com), [Ollama](https:\u002F\u002Follama.com), [Gemini](https:\u002F\u002Fgemini.google.com)\n- **Vector Databases**: [Milvus](https:\u002F\u002Fmilvus.io) or [Zilliz Cloud](https:\u002F\u002Fzilliz.com\u002Fcloud)(fully managed vector database as a service)\n- **Code Splitters**: AST-based splitter (with automatic fallback), LangChain character-based splitter\n- **Languages**: TypeScript, JavaScript, Python, Java, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, Markdown\n- **Development Tools**: VSCode, Model Context Protocol\n\n---\n\n## 📦 Other Ways to Use Claude Context\n\nWhile MCP is the recommended way to use Claude Context with AI assistants, you can also use it directly or through the VSCode extension.\n\n### Build Applications with Core Package\n\nThe `@zilliz\u002Fclaude-context-core` package provides the fundamental functionality for code indexing and semantic search.\n\n```typescript\nimport { Context, MilvusVectorDatabase, OpenAIEmbedding } from '@zilliz\u002Fclaude-context-core';\n\n\u002F\u002F Initialize embedding provider\nconst embedding = new OpenAIEmbedding({\n    apiKey: process.env.OPENAI_API_KEY || 'your-openai-api-key',\n    model: 'text-embedding-3-small'\n});\n\n\u002F\u002F Initialize vector database\nconst vectorDatabase = new MilvusVectorDatabase({\n    address: process.env.MILVUS_ADDRESS || 'your-zilliz-cloud-public-endpoint',\n    token: process.env.MILVUS_TOKEN || 'your-zilliz-cloud-api-key'\n});\n\n\u002F\u002F Create context instance\nconst context = new Context({\n    embedding,\n    vectorDatabase\n});\n\n\u002F\u002F Index your codebase with progress tracking\nconst stats = await context.indexCodebase('.\u002Fyour-project', (progress) => {\n    console.log(`${progress.phase} - ${progress.percentage}%`);\n});\nconsole.log(`Indexed ${stats.indexedFiles} files, ${stats.totalChunks} chunks`);\n\n\u002F\u002F Perform semantic search\nconst results = await context.semanticSearch('.\u002Fyour-project', 'vector database operations', 5);\nresults.forEach(result => {\n    console.log(`File: ${result.relativePath}:${result.startLine}-${result.endLine}`);\n    console.log(`Score: ${(result.score * 100).toFixed(2)}%`);\n    console.log(`Content: ${result.content.substring(0, 100)}...`);\n});\n```\n\n### VSCode Extension\n\nIntegrates Claude Context directly into your IDE. Provides an intuitive interface for semantic code search and navigation.\n\n1. **Direct Link**: [Install from VS Code Marketplace](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n2. **Manual Search**:\n    - Open Extensions view in VSCode (Ctrl+Shift+X or Cmd+Shift+X on Mac)\n    - Search for \"Semantic Code Search\"\n    - Click Install\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_f16571b16532.png)\n---\n\n## 🛠️ Development\n\n### Setup Development Environment\n\n#### Prerequisites\n\n- Node.js 20.x or 22.x\n- pnpm (recommended package manager)\n\n#### Cross-Platform Setup\n\n```bash\n# Clone repository\ngit clone https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context.git\ncd claude-context\n\n# Install dependencies\npnpm install\n\n# Build all packages\npnpm build\n\n# Start development mode\npnpm dev\n```\n\n#### Windows-Specific Setup\n\nOn Windows, ensure you have:\n\n- **Git for Windows** with proper line ending configuration\n- **Node.js** installed via the official installer or package manager\n- **pnpm** installed globally: `npm install -g pnpm`\n\n```powershell\n# Windows PowerShell\u002FCommand Prompt\ngit clone https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context.git\ncd claude-context\n\n# Configure git line endings (recommended)\ngit config core.autocrlf false\n\n# Install dependencies\npnpm install\n\n# Build all packages (uses cross-platform scripts)\npnpm build\n\n# Start development mode\npnpm dev\n```\n\n### Building\n\n```bash\n# Build all packages (cross-platform)\npnpm build\n\n# Build specific package\npnpm build:core\npnpm build:vscode\npnpm build:mcp\n\n# Performance benchmarking\npnpm benchmark\n```\n\n#### Windows Build Notes\n\n- All build scripts are cross-platform compatible using rimraf\n- Build caching is enabled for faster subsequent builds\n- Use PowerShell or Command Prompt - both work equally well\n\n### Running Examples\n\n```bash\n# Development with file watching\ncd examples\u002Fbasic-usage\npnpm dev\n```\n\n---\n\n## 📖 Examples\n\nCheck the `\u002Fexamples` directory for complete usage examples:\n\n- **Basic Usage**: Simple indexing and search example\n\n---\n\n## ❓ FAQ\n\n**Common Questions:**\n\n- **[What files does Claude Context decide to embed?](docs\u002Ftroubleshooting\u002Ffaq.md#q-what-files-does-claude-context-decide-to-embed)**\n- **[Can I use a fully local deployment setup?](docs\u002Ftroubleshooting\u002Ffaq.md#q-can-i-use-a-fully-local-deployment-setup)**\n- **[Does it support multiple projects \u002F codebases?](docs\u002Ftroubleshooting\u002Ffaq.md#q-does-it-support-multiple-projects--codebases)**\n- **[How does Claude Context compare to other coding tools?](docs\u002Ftroubleshooting\u002Ffaq.md#q-how-does-claude-context-compare-to-other-coding-tools-like-serena-context7-or-deepwiki)**\n\n❓ For detailed answers and more troubleshooting tips, see our [FAQ Guide](docs\u002Ftroubleshooting\u002Ffaq.md).\n\n🔧 **Encountering issues?** Visit our [Troubleshooting Guide](docs\u002Ftroubleshooting\u002Ftroubleshooting-guide.md) for step-by-step solutions.\n\n📚 **Need more help?** Check out our [complete documentation](docs\u002F) for detailed guides and troubleshooting tips.\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.\n\n**Package-specific contributing guides:**\n\n- [Core Package Contributing](packages\u002Fcore\u002FCONTRIBUTING.md)\n- [MCP Server Contributing](packages\u002Fmcp\u002FCONTRIBUTING.md)  \n- [VSCode Extension Contributing](packages\u002Fvscode-extension\u002FCONTRIBUTING.md)\n\n---\n\n## 🗺️ Roadmap\n\n- [x] AST-based code analysis for improved understanding\n- [x] Support for additional embedding providers\n- [ ] Agent-based interactive search mode\n- [x] Enhanced code chunking strategies\n- [ ] Search result ranking optimization\n- [ ] Robust Chrome Extension\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🔗 Links\n\n- [GitHub Repository](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context)\n- [VSCode Marketplace](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n- [Milvus Documentation](https:\u002F\u002Fmilvus.io\u002Fdocs)\n- [Zilliz Cloud](https:\u002F\u002Fzilliz.com\u002Fcloud)\n","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_55fa246fc08e.png)\n\n> 🆕 **正在寻找 Claude Code 的持久化记忆功能吗？** 请查看 [memsearch Claude Code 插件](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fmemsearch\u002Ftree\u002Fmain\u002Fplugins\u002Fclaude-code) — 一个以 Markdown 优先的记忆系统，可为您的 AI 助手提供跨会话的长期记忆。\n\n### 将您的整个代码库作为 Claude 的上下文\n\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-20%2B-green.svg)](https:\u002F\u002Fnodejs.org\u002F)\n[![文档](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocumentation-📚-orange.svg)](docs\u002F)\n[![VS Code 市场](https:\u002F\u002Fimg.shields.io\u002Fvisual-studio-marketplace\u002Fv\u002Fzilliz.semanticcodesearch?label=VS%20Code%20Extension&logo=visual-studio-code)](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n[![npm - core](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@zilliz\u002Fclaude-context-core?label=%40zilliz%2Fclaude-context-core&logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@zilliz\u002Fclaude-context-core)\n[![npm - mcp](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@zilliz\u002Fclaude-context-mcp?label=%40zilliz%2Fclaude-context-mcp&logo=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@zilliz\u002Fclaude-context-mcp)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fzilliz_universe.svg?style=social&label=Follow%20%40Zilliz)](https:\u002F\u002Ftwitter.com\u002Fzilliz_universe)\n[![DeepWiki](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDeepWiki-AI%20Docs-purple.svg?logo=gitbook&logoColor=white)](https:\u002F\u002Fdeepwiki.com\u002Fzilliztech\u002Fclaude-context)\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FmKc3R95yE5\">\u003Cimg height=\"20\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white\" alt=\"discord\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n**Claude Context** 是一个 MCP 插件，它为 Claude Code 及其他 AI 编程助手添加了语义代码搜索功能，使它们能够从您的整个代码库中获取深度上下文。\n\n🧠 **将您的整个代码库作为上下文**：Claude Context 使用语义搜索技术，可以从数百万行代码中找到所有相关代码。无需多轮查找，直接将结果融入 Claude 的上下文。\n\n💰 **对大型代码库经济高效**：与其每次请求都把整个目录加载到 Claude 中（这可能会非常昂贵），Claude Context 会将您的代码库高效地存储在向量数据库中，并且只在上下文中使用相关的代码，从而保持成本可控。\n\n---\n\n## 🚀 演示\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_896511f59e20.png)\n\n模型上下文协议 (MCP) 允许您将 Claude Context 与您喜爱的 AI 编程助手集成，例如 Claude Code。\n\n## 快速入门\n\n### 前提条件\n\n\u003Cdetails>\n\u003Csummary>在 Zilliz Cloud 上获取免费向量数据库 👈\u003C\u002Fsummary>\n\nClaude Context 需要一个向量数据库。您可以 [注册](https:\u002F\u002Fcloud.zilliz.com\u002Fsignup?utm_source=github&utm_medium=referral&utm_campaign=2507-codecontext-readme) Zilliz Cloud 账户以获取 API 密钥。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_d66df5e37ce0.png)\n\n复制您的个人密钥，替换配置示例中的 `your-zilliz-cloud-api-key`。\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>获取 OpenAI 嵌入模型的 API 密钥\u003C\u002Fsummary>\n\n您需要一个 OpenAI API 密钥来使用嵌入模型。可以通过在 [OpenAI](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys) 注册获得。\n\n您的 API 密钥看起来像这样：总是以 `sk-` 开头。复制您的密钥，并在下面的配置示例中将其用作 `your-openai-api-key`。\n\u003C\u002Fdetails>\n\n### 为 Claude Code 配置 MCP\n\n**系统要求：**\n\n- Node.js >= 20.0.0 且 \u003C 24.0.0\n\n> Claude Context 不兼容 Node.js 24.0.0，如果您的 Node 版本大于或等于 24，则需要先降级。\n\n#### 配置\n\n使用命令行界面添加 Claude Context MCP 服务器：\n\n```bash\nclaude mcp add claude-context \\\n  -e OPENAI_API_KEY=sk-your-openai-api-key \\\n  -e MILVUS_TOKEN=your-zilliz-cloud-api-key \\\n  -- npx @zilliz\u002Fclaude-context-mcp@latest\n```\n\n有关 MCP 服务器管理的更多信息，请参阅 [Claude Code MCP 文档](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Fmcp)。\n\n### 其他 MCP 客户端配置\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>OpenAI Codex CLI\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCodex CLI 使用 TOML 配置文件：\n\n1. 创建或编辑 `~\u002F.codex\u002Fconfig.toml` 文件。\n\n2. 添加以下配置：\n\n```toml\n# 重要提示：顶级键是 `mcp_servers`，而不是 `mcpServers`。\n[mcp_servers.claude-context]\ncommand = \"npx\"\nargs = [\"@zilliz\u002Fclaude-context-mcp@latest\"]\nenv = { \"OPENAI_API_KEY\" = \"your-openai-api-key\", \"MILVUS_TOKEN\" = \"your-zilliz-cloud-api-key\" }\n# 可选：覆盖默认的 10 秒启动超时\nstartup_timeout_ms = 20000\n```\n\n3. 保存文件并重启 Codex CLI 以应用更改。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Gemini CLI\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nGemini CLI 需要通过 JSON 文件手动配置：\n\n1. 创建或编辑 `~\u002F.gemini\u002Fsettings.json` 文件。\n2. 添加以下配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n3. 保存文件并重启 Gemini CLI 以应用更改。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Qwen Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n创建或编辑 `~\u002F.qwen\u002Fsettings.json` 文件，并添加以下配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cursor\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n前往：`Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`\n\n建议将以下配置粘贴到您的 Cursor `~\u002F.cursor\u002Fmcp.json` 文件中。您也可以在特定项目中创建 `.cursor\u002Fmcp.json` 文件来进行配置。更多信息请参阅 [Cursor MCP 文档](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcontext\u002Fmcp)。\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Void\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n前往：`Settings` -> `MCP` -> `Add MCP Server`\n\n将以下配置添加到您的 Void MCP 设置中：\n\n```json\n{\n  \"mcpServers\": {\n    \"code-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Claude Desktop\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n将以下内容添加到你的 Claude Desktop 配置中：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Windsurf\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nWindsurf 支持通过 JSON 文件进行 MCP 配置。将以下配置添加到你的 Windsurf MCP 设置中：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>VS Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nClaude Context MCP 服务器可以通过与 MCP 兼容的扩展在 VS Code 中使用。将以下配置添加到你的 VS Code MCP 设置中：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cherry Studio\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCherry Studio 允许通过其设置界面进行可视化的 MCP 服务器配置。虽然它不直接支持手动 JSON 配置，但你可以通过 GUI 添加新服务器：\n\n1. 导航至 **设置 → MCP 服务器 → 添加服务器**。\n2. 填写服务器详细信息：\n   - **名称**: `claude-context`\n   - **类型**: `STDIO`\n   - **命令**: `npx`\n   - **参数**: `[\"@zilliz\u002Fclaude-context-mcp@latest\"]`\n   - **环境变量**:\n     - `OPENAI_API_KEY`: `your-openai-api-key`\n     - `MILVUS_ADDRESS`: `your-zilliz-cloud-public-endpoint`\n     - `MILVUS_TOKEN`: `your-zilliz-cloud-api-key`\n3. 保存配置以激活服务器。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cline\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCline 使用 JSON 配置文件来管理 MCP 服务器。要集成提供的 MCP 服务器配置：\n\n1. 打开 Cline 并点击顶部导航栏中的 **MCP 服务器** 图标。\n\n2. 选择 **已安装** 选项卡，然后点击 **高级 MCP 设置**。\n\n3. 在 `cline_mcp_settings.json` 文件中，添加以下配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n4. 保存文件。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Augment\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n要在 Augment Code 中配置 Claude Context MCP，你可以使用图形界面或手动配置。\n\n#### **A. 使用 Augment Code UI**\n\n1. 点击汉堡菜单。\n\n2. 选择 **设置**。\n\n3. 导航到 **工具** 部分。\n\n4. 点击 **+ 添加 MCP** 按钮。\n\n5. 输入以下命令：\n\n   ```\n   npx @zilliz\u002Fclaude-context-mcp@latest\n   ```\n\n6. 将 MCP 命名为：**Claude Context**。\n\n7. 点击 **添加** 按钮。\n\n------\n\n#### **B. 手动配置**\n\n1. 按下 Cmd\u002FCtrl Shift P 或进入 Augment 面板中的汉堡菜单。\n2. 选择编辑设置。\n3. 在高级设置中，点击编辑 settings.json。\n4. 将服务器配置添加到 `augment.advanced` 对象中的 `mcpServers` 数组中。\n\n```json\n\"augment.advanced\": { \n  \"mcpServers\": [ \n    { \n      \"name\": \"claude-context\", \n      \"command\": \"npx\", \n      \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  ]\n}\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Roo Code\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nRoo Code 使用 JSON 配置文件来管理 MCP 服务器：\n\n1. 打开 Roo Code，导航至 **设置 → MCP 服务器 → 编辑全局配置**。\n\n2. 在 `mcp_settings.json` 文件中，添加以下配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-openai-api-key\",\n        \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n        \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n      }\n    }\n  }\n}\n```\n\n3. 保存文件以激活服务器。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Zencoder\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nZencoder 在其 JetBrains 和 VS Code 插件版本中均支持 MCP 工具和服务器。\n\n1. 打开 Zencoder 菜单 (...)\n2. 从下拉菜单中选择 `工具`。\n3. 点击 `添加自定义 MCP`。\n4. 添加名称（即 `Claude Context`）以及下方的服务器配置，并确保点击 `安装` 按钮。\n\n```json\n{\n    \"command\": \"npx\",\n    \"args\": [\"@zilliz\u002Fclaude-context-mcp@latest\"],\n    \"env\": {\n      \"OPENAI_API_KEY\": \"your-openai-api-key\",\n      \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\",\n      \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n    }\n}\n\n```\n\n5. 点击 `安装` 按钮保存服务器。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>LangChain\u002FLangGraph\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n有关 LangChain\u002FLangGraph 集成示例，请参阅[此示例](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fblob\u002F643796a0d30e706a2a0dff3d55621c9b5d831807\u002Fevaluation\u002Fretrieval\u002Fcustom.py#L88)。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>其他 MCP 客户端\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n该服务器使用 stdio 传输并遵循标准 MCP 协议。可以通过运行以下命令将其集成到任何兼容 MCP 的客户端中：\n\n```bash\nnpx @zilliz\u002Fclaude-context-mcp@latest\n```\n\n\u003C\u002Fdetails>\n\n---\n\n\n\n### 在你的代码库中使用\n\n1. **打开 Claude Code**\n\n   ```\n   cd your-project-directory\n   claude\n   ```\n\n2. **索引你的代码库**：\n\n   ```\n   索引这个代码库\n   ```\n\n3. **检查索引状态**：\n\n   ```\n   查看索引状态\n   ```\n\n4. **开始搜索**：\n\n   ```\n   查找处理用户认证的函数\n   ```\n\n🎉 **完成了！** 你现在可以在 Claude Code 中进行语义代码搜索了。\n\n---\n\n### 环境变量配置\n\n如需更详细的 MCP 环境变量配置，请参阅我们的 [环境变量指南](docs\u002Fgetting-started\u002Fenvironment-variables.md)。\n\n### 使用不同的嵌入模型\n\n要配置自定义嵌入模型（例如，OpenAI 的 `text-embedding-3-large`、VoyageAI 的 `voyage-code-3`），请参阅 [MCP 配置示例](packages\u002Fmcp\u002FREADME.md#embedding-provider-configuration)，以获取各提供商的详细设置说明。\n\n### 文件包含与排除规则\n\n有关文件包含与排除规则的详细说明以及如何自定义这些规则，请参阅我们的 [文件包含与排除规则](docs\u002Fdive-deep\u002Ffile-inclusion-rules.md)。\n\n### 可用工具\n\n#### 1. `index_codebase`\n\n对代码库目录进行索引，以支持混合搜索（BM25 + 密集向量）。\n\n#### 2. `search_code`\n\n使用自然语言查询，通过混合搜索（BM25 + 密集向量）来搜索已索引的代码库。\n\n#### 3. `clear_index`\n\n清除特定代码库的搜索索引。\n\n#### 4. `get_indexing_status`\n\n获取代码库的当前索引状态。显示正在索引中的代码库的进度百分比，以及已完成索引的代码库的完成状态。\n\n---\n\n## 📊 评估\n\n我们的受控评估表明，在检索质量相当的情况下，Claude Context MCP 能够实现约 40% 的令牌减少。这在生产环境中意味着显著的成本和时间节省。这也表明，在令牌上下文长度受限的情况下，使用 Claude Context 能够带来更好的检索和回答效果。\n\n![MCP 效率分析图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_0541e1c6ea99.png)\n\n有关详细的评估方法和结果，请参阅 [评估目录](evaluation\u002F)。\n\n---\n\n## 🏗️ 架构\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_1a0efb1ada1c.png)\n\n### 🔧 实现细节\n\n- 🔍 **混合代码搜索**：您可以提出诸如“查找处理用户认证的函数”之类的查询，并借助先进的混合搜索技术（BM25 + 密集向量），即时获得相关且上下文丰富的代码。\n- 🧠 **上下文感知**：即使面对数百万行代码的大规模代码库，也能轻松发现并理解其不同部分之间的关系。\n- ⚡ **增量索引**：利用默克尔树高效地仅对更改过的文件重新索引。\n- 🧩 **智能代码分块**：通过抽象语法树（AST）分析代码并进行分块。\n- 🗄️ **可扩展性**：无论您的代码库有多大，都可以与 Zilliz Cloud 集成，实现可扩展的向量搜索。\n- 🛠️ **可定制性**：支持配置文件扩展名、忽略模式以及嵌入模型。\n\n### 核心组件\n\nClaude Context 是一个单体仓库，包含三个主要包：\n\n- **`@zilliz\u002Fclaude-context-core`**：核心索引引擎，集成嵌入和向量数据库功能。\n- VSCode 扩展：用于 Visual Studio Code 的语义代码搜索扩展。\n- **`@zilliz\u002Fclaude-context-mcp`**：用于 AI 代理集成的 Model Context 协议服务器。\n\n### 支持的技术\n\n- **嵌入提供商**：[OpenAI](https:\u002F\u002Fopenai.com)、[VoyageAI](https:\u002F\u002Fvoyageai.com)、[Ollama](https:\u002F\u002Follama.com)、[Gemini](https:\u002F\u002Fgemini.google.com)\n- **向量数据库**：[Milvus](https:\u002F\u002Fmilvus.io) 或 [Zilliz Cloud](https:\u002F\u002Fzilliz.com\u002Fcloud)（完全托管的向量数据库即服务）\n- **代码分割器**：基于 AST 的分割器（自动回退机制）、LangChain 基于字符的分割器\n- **编程语言**：TypeScript、JavaScript、Python、Java、C++、C#、Go、Rust、PHP、Ruby、Swift、Kotlin、Scala、Markdown\n- **开发工具**：VSCode、Model Context 协议\n\n---\n\n## 📦 使用 Claude Context 的其他方式\n\n虽然推荐通过 MCP 将 Claude Context 与 AI 助手结合使用，但您也可以直接使用它，或通过 VSCode 扩展来使用。\n\n### 使用核心包构建应用\n\n`@zilliz\u002Fclaude-context-core` 包提供了代码索引和语义搜索的基础功能。\n\n```typescript\nimport { Context, MilvusVectorDatabase, OpenAIEmbedding } from '@zilliz\u002Fclaude-context-core';\n\n\u002F\u002F 初始化嵌入提供商\nconst embedding = new OpenAIEmbedding({\n    apiKey: process.env.OPENAI_API_KEY || 'your-openai-api-key',\n    model: 'text-embedding-3-small'\n});\n\n\u002F\u002F 初始化向量数据库\nconst vectorDatabase = new MilvusVectorDatabase({\n    address: process.env.MILVUS_ADDRESS || 'your-zilliz-cloud-public-endpoint',\n    token: process.env.MILVUS_TOKEN || 'your-zilliz-cloud-api-key'\n});\n\n\u002F\u002F 创建上下文实例\nconst context = new Context({\n    embedding,\n    vectorDatabase\n});\n\n\u002F\u002F 对代码库进行索引，并跟踪进度\nconst stats = await context.indexCodebase('.\u002Fyour-project', (progress) => {\n    console.log(`${progress.phase} - ${progress.percentage}%`);\n});\nconsole.log(`已索引 ${stats.indexedFiles} 个文件，共 ${stats.totalChunks} 个代码块`);\n\n\u002F\u002F 执行语义搜索\nconst results = await context.semanticSearch('.\u002Fyour-project', '向量数据库操作', 5);\nresults.forEach(result => {\n    console.log(`文件: ${result.relativePath}:${result.startLine}-${result.endLine}`);\n    console.log(`得分: ${(result.score * 100).toFixed(2)}%`);\n    console.log(`内容: ${result.content.substring(0, 100)}...`);\n});\n```\n\n### VSCode 扩展\n\n将 Claude Context 直接集成到您的 IDE 中，提供直观的界面来进行语义代码搜索和导航。\n\n1. **直接链接**：[从 VS Code Marketplace 安装](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n2. **手动搜索**：\n    - 在 VSCode 中打开扩展视图（Ctrl+Shift+X 或 Mac 上的 Cmd+Shift+X）\n    - 搜索“Semantic Code Search”\n    - 点击安装\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_readme_f16571b16532.png)\n---\n\n## 🛠️ 开发\n\n### 设置开发环境\n\n#### 先决条件\n\n- Node.js 20.x 或 22.x\n- pnpm（推荐的包管理工具）\n\n#### 跨平台设置\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context.git\ncd claude-context\n\n# 安装依赖\npnpm install\n\n# 构建所有包\npnpm build\n\n# 启动开发模式\npnpm dev\n```\n\n#### Windows 特定设置\n\n在 Windows 上，请确保您已安装：\n\n- **Git for Windows** 并正确配置换行符\n- **Node.js** 通过官方安装程序或包管理工具安装\n- **pnpm** 全局安装：`npm install -g pnpm`\n\n```powershell\n# Windows PowerShell\u002F命令提示符\ngit clone https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context.git\ncd claude-context\n\n# 配置 Git 换行符（推荐）\ngit config core.autocrlf false\n\n# 安装依赖\npnpm install\n\n# 构建所有包（使用跨平台脚本）\npnpm build\n\n# 启动开发模式\npnpm dev\n```\n\n### 构建\n\n```bash\n# 构建所有包（跨平台）\npnpm build\n\n# 构建特定包\npnpm build:core\npnpm build:vscode\npnpm build:mcp\n\n# 性能基准测试\npnpm benchmark\n```\n\n#### Windows 构建说明\n\n- 所有构建脚本都使用 rimraf 实现跨平台兼容。\n- 启用了构建缓存，以加快后续构建速度。\n- 可以使用 PowerShell 或命令提示符，两者效果相同。\n\n### 运行示例\n\n```bash\n# 开发模式并监听文件变化\ncd examples\u002Fbasic-usage\npnpm dev\n```\n\n---\n\n## 📖 示例\n\n请查看 `\u002Fexamples` 目录，获取完整的使用示例：\n\n- **基本用法**：简单的索引和搜索示例\n\n---\n\n## ❓ 常见问题解答\n\n**常见问题：**\n\n- **[Claude Context 会决定嵌入哪些文件？](docs\u002Ftroubleshooting\u002Ffaq.md#q-what-files-does-claude-context-decide-to-embed)**\n- **[我可以使用完全本地化的部署方案吗？](docs\u002Ftroubleshooting\u002Ffaq.md#q-can-i-use-a-fully-local-deployment-setup)**\n- **[它是否支持多个项目或代码库？](docs\u002Ftroubleshooting\u002Ffaq.md#q-does-it-support-multiple-projects--codebases)**\n- **[Claude Context 与其他编码工具相比如何？](docs\u002Ftroubleshooting\u002Ffaq.md#q-how-does-claude-context-compare-to-other-coding-tools-like-serena-context7-or-deepwiki)**\n\n❓ 如需详细解答及更多故障排除技巧，请参阅我们的 [FAQ 指南](docs\u002Ftroubleshooting\u002Ffaq.md)。\n\n🔧 **遇到问题？** 请访问我们的 [故障排除指南](docs\u002Ftroubleshooting\u002Ftroubleshooting-guide.md)，获取分步解决方案。\n\n📚 **需要更多帮助？** 请查阅我们的 [完整文档](docs\u002F)，获取详细的指南和故障排除建议。\n\n---\n\n## 🤝 贡献\n\n我们欢迎各方贡献！请参阅我们的 [贡献指南](CONTRIBUTING.md)，了解如何开始参与。\n\n**各包的特定贡献指南：**\n\n- [核心包贡献指南](packages\u002Fcore\u002FCONTRIBUTING.md)\n- [MCP 服务器贡献指南](packages\u002Fmcp\u002FCONTRIBUTING.md)\n- [VSCode 扩展贡献指南](packages\u002Fvscode-extension\u002FCONTRIBUTING.md)\n\n---\n\n## 🗺️ 路线图\n\n- [x] 基于 AST 的代码分析，以提升理解能力\n- [x] 支持更多嵌入服务提供商\n- [ ] 基于代理的交互式搜索模式\n- [x] 更完善的代码分块策略\n- [ ] 搜索结果排序优化\n- [ ] 稳定的 Chrome 扩展\n\n---\n\n## 📄 许可证\n\n本项目采用 MIT 许可证授权——详情请参阅 [LICENSE](LICENSE) 文件。\n\n---\n\n## 🔗 链接\n\n- [GitHub 仓库](https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context)\n- [VSCode 市场](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=zilliz.semanticcodesearch)\n- [Milvus 文档](https:\u002F\u002Fmilvus.io\u002Fdocs)\n- [Zilliz Cloud](https:\u002F\u002Fzilliz.com\u002Fcloud)","# Claude Context 快速上手指南\n\n**Claude Context** 是一个基于 MCP（Model Context Protocol）的插件，它为 Claude Code 及其他 AI 编程助手提供语义代码搜索能力。它能将你的整个代码库作为上下文，帮助 AI 精准理解百万行代码中的相关逻辑，无需多轮对话探索，同时通过向量数据库优化成本。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统要求和前置依赖：\n\n### 1. 系统要求\n- **Node.js**: 版本需 >= 20.0.0 且 \u003C 24.0.0。\n  > ⚠️ **注意**：Claude Context 暂不兼容 Node.js 24.0.0 及以上版本。如果你的版本过高，请先降级。\n\n### 2. 获取必要密钥\n你需要准备两个 API Key：\n\n*   **Zilliz Cloud API Key (向量数据库)**\n    1. 访问 [Zilliz Cloud](https:\u002F\u002Fcloud.zilliz.com\u002Fsignup?utm_source=github&utm_medium=referral&utm_campaign=2507-codecontext-readme) 注册免费账号。\n    2. 创建实例后，复制你的 **Personal Key**。\n    3. 在后续配置中，将其替换为 `your-zilliz-cloud-api-key`。\n\n*   **OpenAI API Key (嵌入模型)**\n    1. 访问 [OpenAI Platform](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys) 获取 API Key。\n    2. 确保密钥以 `sk-` 开头。\n    3. 在后续配置中，将其替换为 `your-openai-api-key`。\n\n## 安装步骤\n\n以下以最常用的 **Claude Code** 为例进行安装。其他编辑器（如 Cursor, VS Code, Windsurf 等）的配置方式类似，均为在对应的 MCP 配置文件中添加 JSON 或 TOML 配置。\n\n### 配置 Claude Code MCP\n\n使用命令行界面添加 Claude Context MCP 服务器：\n\n```bash\nclaude mcp add claude-context \\\n  -e OPENAI_API_KEY=sk-your-openai-api-key \\\n  -e MILVUS_TOKEN=your-zilliz-cloud-api-key \\\n  -- npx @zilliz\u002Fclaude-context-mcp@latest\n```\n\n> 💡 **提示**：请将 `sk-your-openai-api-key` 和 `your-zilliz-cloud-api-key` 替换为你实际获取的密钥。\n\n#### 其他常见编辑器配置示例\n\n如果你使用的是其他支持 MCP 的工具，请在其配置文件中添加如下内容（注意替换密钥）：\n\n*   **Cursor \u002F VS Code \u002F Windsurf \u002F Claude Desktop** (`mcp.json`):\n    ```json\n    {\n      \"mcpServers\": {\n        \"claude-context\": {\n          \"command\": \"npx\",\n          \"args\": [\"-y\", \"@zilliz\u002Fclaude-context-mcp@latest\"],\n          \"env\": {\n            \"OPENAI_API_KEY\": \"sk-your-openai-api-key\",\n            \"MILVUS_ADDRESS\": \"your-zilliz-cloud-public-endpoint\", \n            \"MILVUS_TOKEN\": \"your-zilliz-cloud-api-key\"\n          }\n        }\n      }\n    }\n    ```\n    *(注：部分工具如 Cursor 可能需要填写 `MILVUS_ADDRESS`，即 Zilliz Cloud 的公共端点)*\n\n*   **OpenAI Codex CLI** (`config.toml`):\n    ```toml\n    [mcp_servers.claude-context]\n    command = \"npx\"\n    args = [\"@zilliz\u002Fclaude-context-mcp@latest\"]\n    env = { \"OPENAI_API_KEY\" = \"sk-your-openai-api-key\", \"MILVUS_TOKEN\" = \"your-zilliz-cloud-api-key\" }\n    ```\n\n## 基本使用\n\n配置完成后，无需额外启动命令，直接在支持的 AI 助手（如 Claude Code）中使用自然语言提问即可。\n\n### 使用示例\n\n假设你的项目中有一个复杂的用户认证逻辑分散在多个文件中。\n\n**在终端中输入：**\n\n```bash\nclaude \"请分析项目中用户登录认证的完整流程，包括密码加密和令牌验证的部分。\"\n```\n\n**效果：**\n1.  **自动索引**：Claude Context 会自动利用语义搜索，从你的整个代码库中检索与“登录”、“认证”、“加密”、“令牌”相关的代码片段。\n2.  **注入上下文**：检索到的关键代码会被自动注入到 Claude 的上下文中。\n3.  **精准回答**：Claude 将基于这些具体的代码片段，直接给出准确的流程分析，而无需你手动打开文件或反复追问文件位置。\n\n现在，你可以尝试询问关于代码架构、特定函数实现或跨文件依赖的问题，体验全库语义搜索带来的效率提升。","某后端团队正在维护一个拥有数百万行代码的遗留电商系统，急需在不破坏现有逻辑的前提下重构支付模块。\n\n### 没有 claude-context 时\n- **上下文缺失导致盲目猜测**：开发者只能手动粘贴零散文件给 AI，AI 因缺乏全局视野，常给出忽略关键依赖或调用链的错误代码。\n- **多轮对话效率低下**：为了理清复杂的业务逻辑，必须经过数十轮“询问 - 反馈 - 修正”的拉锯战，严重拖慢开发节奏。\n- **Token 成本失控**：试图将整个相关目录一次性喂给 AI 以获取完整上下文，导致单次请求消耗巨额 Token，甚至频繁触发上限报错。\n- **深层逻辑难以定位**：对于跨模块的隐蔽调用（如事件监听器或反射调用），传统关键词搜索失效，AI 无法感知这些隐性关联。\n\n### 使用 claude-context 后\n- **全库语义感知**：claude-context 自动将百万行代码索引至向量数据库，AI 能瞬间理解整个代码库架构，直接生成符合全局规范的重构方案。\n- **单轮精准交付**：无需多轮探索，AI 基于语义搜索直接定位所有相关实现（包括隐藏的回调函数），首轮回复即可提供可落地的完整代码。\n- **成本大幅优化**：仅将语义匹配的高相关性代码片段动态注入上下文，避免了全量加载，使处理大型项目的 Token 成本降低 90% 以上。\n- **深度关联挖掘**：凭借语义理解能力，轻松发现跨文件的深层逻辑耦合，确保重构后的支付模块与库存、订单系统无缝衔接。\n\n核心价值在于 claude-context 让 AI 真正拥有了“阅读”整个代码库的能力，将原本昂贵且低效的全局上下文构建过程，转变为即时、精准且低成本的智能辅助体验。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzilliztech_claude-context_0541e1c6.png","zilliztech","Zilliz","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fzilliztech_c42ecbb4.png","Vector Database for Enterprise-grade AI and LLM applications",null,"info@zilliz.com","zilliz_universe","https:\u002F\u002Fzilliz.com\u002Fcloud","https:\u002F\u002Fgithub.com\u002Fzilliztech",[83,87,91,95,98],{"name":84,"color":85,"percentage":86},"TypeScript","#3178c6",69.2,{"name":88,"color":89,"percentage":90},"Python","#3572A5",15.4,{"name":92,"color":93,"percentage":94},"JavaScript","#f1e05a",10.4,{"name":96,"color":97,"percentage":10},"CSS","#663399",{"name":99,"color":100,"percentage":32},"HTML","#e34c26",5947,525,"2026-04-17T14:03:01","MIT","Linux, macOS, Windows","未说明",{"notes":108,"python":106,"dependencies":109},"该工具是一个基于 Node.js 的 MCP 插件，不依赖本地 GPU 或 Python 环境。核心运行要求是安装 Node.js（版本需在 20 到 24 之间，不支持 24+）。必须拥有 Zilliz Cloud 向量数据库的 API 密钥（MILVUS_TOKEN）以及 OpenAI 的 API 密钥（用于嵌入模型）。支持通过 npx 直接运行，并可集成到 Claude Code、Cursor、VS Code 等多种编辑器中。",[110,111,112,113],"Node.js >= 20.0.0 且 \u003C 24.0.0","@zilliz\u002Fclaude-context-mcp","Zilliz Cloud (Milvus)","OpenAI API (Embedding Model)",[13,14,45,16,35],[116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,56],"agent","agentic-rag","ai-coding","code-search","cursor","embedding","mcp","nodejs","openai","rag","semantic-search","typescript","vector-database","vibe-coding","voyage-ai","vscode-extension","merkle-tree","code-generation","claude-code","2026-03-27T02:49:30.150509","2026-04-18T09:19:31.587497",[138,143,148,153,158,162],{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},38841,"为什么索引成功后 search_code 工具仍报错“代码库未索引”？","这通常是由状态同步问题引起的。主要原因有两点：\n1. **云同步具有破坏性**：`syncIndexedCodebasesFromCloud()` 函数在云集合与本地不匹配时会删除本地快照条目，导致刚索引成功的代码库被误删。\n2. **内存状态丢失**：`getCodebaseStatus()` 等函数读取的是内存中的 `codebaseInfoMap`，重启进程后该地图会清空。虽然磁盘上的快照文件（`~\u002F.context\u002Fmcp-codebase-snapshot.json`）保存了正确状态，但代码未能重新读取它。\n\n**解决方案**：\n请升级到 **v0.1.6** 或更高版本，该版本已修复上述多进程竞争条件和状态持久化问题。如果问题依旧，尝试手动删除快照文件 `~\u002F.context\u002Fmcp-codebase-snapshot.json` 并重新索引。","https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fissues\u002F226",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},38842,"如何查看代码库索引的实时进度？","默认情况下进度可能不明显，特别是在处理大型代码库时。您可以通过以下方式查看详细进度：\n\n1. **启用调试模式**：在运行 Claude Code 时添加 `--debug` 标志。\n2. **观察日志输出**：开启调试后，您将看到类似以下的实时日志：\n   ```text\n   [LOG] 🔄 Processing batch of 100 chunks (~11879 tokens)\n   [LOG] 📊 Processed 3447\u002F18005 files\n   [LOG] 🌳 Using AST splitter for cpp file: ...\n   ```\n\n此外，如果您使用的是 Zilliz Cloud 且遇到索引似乎卡住的情况，请检查是否已达到账户的最大 Collection 数量限制，这在旧版本中可能不会抛出明显错误。","https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fissues\u002F99",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},38843,"是否支持 Mistral 和 Gemini 模型？","**Mistral**：已经支持。您只需配置 Mistral 的 API URL、API Key 以及对应的 Embedding 模型名称即可使用，无需额外开发。\n\n**Gemini**：目前主要关注点在于 OpenAI 兼容端点的通用支持。对于特定的 Gemini 模型（如 004 或 001），如果它们提供 OpenAI 兼容的接口，理论上可以通过配置通用端点使用，但针对特定提供商的维度处理和速率限制可能需要专门的适配。建议优先尝试配置为 OpenAI 兼容模式，若遇问题可关注后续对特定提供商的原生支持更新。","https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fissues\u002F80",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},38844,"索引过程中报错\"TypeError: Cannot read properties of undefined (reading 'map')\"怎么办？","这是一个在处理文件分块批次时发生的间歇性错误，通常由特定文件引起或并发处理时机问题导致。\n\n**排查步骤**：\n1. **观察失败位置**：注意错误是否总是发生在相同的文件数量处（例如总是在 977\u002F982 文件处）。如果是固定位置，极可能是某个特定文件的内容格式导致了解析异常。\n2. **隔离问题文件**：尝试从项目中排除最近修改的文件或特定类型的文件，看是否能完成索引。\n3. **环境检查**：确保您的 Node.js 和 Python 环境版本符合推荐要求（如 Node.js 22+，Python 3.11+）。\n\n如果问题持续存在且无法定位具体文件，建议提交包含完整错误堆栈和触发该错误的文件样本的新 Issue 以便开发者复现。","https:\u002F\u002Fgithub.com\u002Fzilliztech\u002Fclaude-context\u002Fissues\u002F106",{"id":159,"question_zh":160,"answer_zh":161,"source_url":142},38845,"Milvus 索引正常但搜索失败，是否有替代方案？","如果基于 Milvus 的方案持续出现状态同步或连接问题，可以尝试社区提供的替代方案 **beacon-plugin**。\n\n**特点**：\n- **无需 Milvus**：使用单个 SQLite 文件存储所有数据，利用 `sqlite-vec` 处理向量，`FTS5` 处理全文搜索。\n- **混合搜索**：结合语义嵌入（Semantic Embeddings）捕捉概念匹配，以及 BM25 关键词匹配捕捉精确的名称和导入引用，这在代码搜索中往往比纯向量搜索更可靠。\n- **部署简单**：作为 Claude Code 插件运行，通过生命周期钩子自动索引，仅需安装插件并确保 Ollama 运行即可，无外部服务依赖。\n\n项目地址：https:\u002F\u002Fgithub.com\u002Fsagarmk\u002Fbeacon-plugin",{"id":163,"question_zh":164,"answer_zh":165,"source_url":147},38846,"索引大型项目时长时间无响应或看似卡死是什么原因？","在处理数万个源文件的大型代码库时，索引过程可能需要数小时，这是正常现象。如果看似卡死，请检查以下情况：\n\n1. **静默的资源限制错误**：如果您使用 Zilliz Cloud，可能是因为账户已达到最大 Collection 数量限制，导致新数据无法写入但未抛出明显错误。解决方法是清理旧集合或切换到自托管的 Milvus 实例。\n2. **缺乏进度反馈**：默认输出可能长时间停留在\"Determining...\"状态。请务必使用 `--debug` 参数启动 Claude Code，以查看详细的文件处理日志（如 `Processed X\u002FY files`），确认进程实际上仍在运行而非卡死。\n3. **硬件资源**：确保宿主机有足够的内存和 CPU 资源供 Ollama 和向量数据库使用。",[]]