MO

muvon/octocode

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

518 stars 58 forks 质量 83 趋势 41Apache-2.0

AI代理的结构代码智能——语义搜索、知识图谱以及集成在一个Rust二进制文件中的MCP服务器。

概览

Octocode将你的项目转化为一个可导航的知识图谱,Claude、光标及其他AI代理可以搜索、理解和导航。 AI助手对你的代码库视而不见。他们无法搜索你的文件,无法理解依赖关系,也无法记住会话间的上下文。 Octocode 的 MCP 服务器为 AI 代理提供:- 🔍 — 通过意义而非关键词查找代码 - 🕸️ — 导航导入、调用和依赖 - 📝 - 无需读取整个文件即可查看结构 - 🧭 — 通过语言服务器访问定义、查找引用和悬停文档 Claude桌面 • 光标 • 风帆冲浪 • 任何兼容MCP的AI 它能找到类似的片段,但不知道auth_middleware.rs导入 jwt.rs、user_store调用.rs,并且连接到 router.rs。Octocode理解结构。 Octocode 用于构建一个包含文件、符号、导入、调用、继承和实现的实时图。

概述(AI 翻译)

AI代理结构代码智能 — MCP服务器 + 知识图谱 + 语义搜索

为你的AI助手提供代码库的大脑。 Octocode将你的项目转化为可导航的知识图谱,Claude、光标及其他AI代理可以搜索、理解和导航。

🚀 快速入门 • 🤖 MCP 集成 • 📖 文档 • 🌐 网站


🤖 为人工智能代理打造

问题: AI助手对你的代码库视而不见。它们无法搜索你的文件,无法理解依赖关系,也无法记住会话间的上下文。

解决方案: Octocode 的 MCP 服务器为 AI 代理提供了:

  • 🔍 语义搜索 — 按意义而非关键词查找代码
  • 🕸️ 知识图谱 — 导航导入、调用和依赖
  • 📝 代码签名 — 无需读取整个文件即可查看结构
  • 🧭 LSP precision — 通过语言服务器访问定义、查找引用和悬停文档

支持: Claude桌面 • 光标 • 风帆冲浪 • 任何兼容MCP的AI

现在你的AI助手可以:

🤔 为什么是八角代码?

标准RAG把你的代码当作平面文本块。 它会找到听起来相似的片段,但根本不知道’auth_middleware。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Octocode is a Rust CLI and MCP server for exploring codebases. It combines semantic search, structural search, and a live graph of symbols and dependencies. Connect it to Claude Code, Codex, Cursor, Windsurf, or another MCP client, or search directly from your terminal.

  • Find code by intent with hybrid vector and keyword search, plus configurable reranking.
  • Locate definitions and usages with structural search over the current source.
  • Trace relationships between files and symbols: imports, calls, inheritance, and implementations.
  • Read signatures without loading entire files; add a language server for definitions, references, and hover information.
  • Run locally with the default embedding and reranking models, or configure remote providers.

Quick start

1. Install

Use the installer on Linux or macOS, or in a Unix-compatible shell on Windows:

curl -fsSL https://raw.githubusercontent.com/Muvon/octocode/master/install.sh | sh

Alternatively, on macOS:

brew install muvon/tap/octocode

Verify the installation:

octocode --version

Run these commands in your project’s Git repository:

cd /path/to/your/project
octocode index
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "octocode": { "command": "octocode", "args": ["mcp", "--path", "/path/to/your/project"] } } }