Muvon/octocode logo

Muvon/octocode

Free

Rust 编写的语义代码索引器,构建代码库 GraphRAG 知识图谱并通过 MCP 暴露给 AI 代理。支持 13+ 语言,提供 tree-sitter 解析、ast-grep 结构化搜索和代码签名视图。

FreeFree tier
Type
Open Source

About Muvon/octocode

Octocode is an open-source semantic code searcher and codebase utility written in Rust. It transforms source code into a navigable knowledge graph using GraphRAG (Graph-based Retrieval-Augmented Generation) and exposes it via the Model Context Protocol (MCP) to AI agents like Claude, Cursor, and Windsurf. By leveraging tree-sitter AST parsing, it extracts real symbols (functions, imports, dependencies) and builds a structured knowledge graph of file relationships. It supports 13+ programming languages, offers ast-grep structured search, and provides code signatures for understanding code without reading entire files. Octocode gives AI assistants persistent memory across sessions, enabling them to search, understand, and navigate codebases intelligently.

Key Features

Semantic search by meaning, not keywords
Knowledge graph (GraphRAG) of imports, calls, and dependencies
Code signatures for quick structural overview
Persistent memory for context across AI sessions
MCP server integration with Claude Desktop, Cursor, Windsurf, and any MCP-compatible AI
Tree-sitter AST parsing for real symbol extraction
ast-grep structured code search
Supports 13+ programming languages
Written in Rust for performance

Pros & Cons

Pros
  • Gives AI deep structural understanding of code, not just flat text
  • Works with popular AI tools like Claude, Cursor, and Windsurf via MCP
  • Open source and self-hosted, no third-party API dependencies
  • Fast and efficient due to Rust implementation
  • Supports many languages through tree-sitter
  • Persistent memory enables long-running AI assistance
Cons
  • Requires setup and configuration as a local MCP server
  • Command-line interface may be less accessible to non-developers
  • Only supports languages with tree-sitter grammars (most common ones are covered)
  • Documentation and community resources are still early-stage

Best For

AI agents understanding codebase architecture and dependenciesFinding code by functionality without relying on keywordsNavigating import chains and call graphsMaintaining context across multiple AI conversations about a projectAutomated code review and bug fixing with structural awarenessOnboarding new developers to large codebases

FAQ

What is Octocode?
Octocode is an open-source Rust tool that acts as a semantic code searcher and codebase utility. It builds a knowledge graph from your source code using GraphRAG and exposes it via the Model Context Protocol (MCP) to AI agents, enabling them to understand and navigate your codebase intelligently.
How does Octocode work?
Octocode uses tree-sitter to parse source code into ASTs, extracts symbols like functions, imports, and dependencies, then builds a GraphRAG knowledge graph of relationships between files. This graph is exposed via an MCP server that AI assistants can query.
Which AI tools are compatible with Octocode?
Octocode works with any MCP-compatible AI assistant, including Claude Desktop, Cursor, Windsurf, and others that support the Model Context Protocol.
What programming languages does Octocode support?
Octocode supports 13+ languages via tree-sitter parsers, covering most major programming languages including Rust, Python, JavaScript, TypeScript, Go, and more.