SuperAPI AI Directory

octocode

Semantic code indexer with a GraphRAG knowledge graph: index a codebase and search it in natural language to understand its architecture.

Open website

About this tool

Purpose

Octocode is positioned to provide "structured code intelligence" for AI agents. The core problem it solves is that AI assistants typically only see flat text snippets, cannot search the entire codebase, cannot understand dependencies between files, and cannot maintain code context across sessions. Octocode turns a project into a navigable knowledge graph, enabling Claude, Cursor, and any other MCP-compatible AI client to search, understand, and browse your code.

Main Capabilities

  • Real-time AST graph: Based on tree-sitter parsing, it extracts file nodes and symbol nodes directly from the current source code, and establishes deterministic relationships such as contains, imports, calls, extends, and implements.
  • Semantic search: Find code by meaning rather than keywords.
  • Knowledge graph navigation: Supports graph queries, relationship traversal, path finding, and overview, even when disabled [graphrag].enabled = false can also be used.
  • Code signature viewing: View code structure without reading the entire file.
  • LSP precision: Provides go-to-definition, find references, and hover documentation through language servers.
  • Hybrid search: Semantic similarity + BM25 full-text search + reranking, separately handling meaning-based code retrieval.
  • MCP server: Exposes to any MCP-compatible client semantic_search、view_signatures、graphrag and structural_search and other tools.
  • Optional GraphRAG enhancement: After enabling indexed GraphRAG, it overlays semantic file matching, LLM-generated descriptions, and broader file-level architectural relationships; symbols themselves are never embedded or generated by an LLM.

How to Use

The typical workflow is: install Octocode → configure API keys (supports multiple embedding providers, including fully local embeddings via fastembed, with no API key required) → index the codebase → search code → connect the AI assistant to the MCP server.

After adding Octocode to the MCP client configuration (Claude Desktop, Cursor, Windsurf, etc.), the AI assistant can directly access search and code navigation tools. Octomind (zero-configuration, preconfigured Octocode) is also officially provided, along with configuration methods for clients such as Claude Code CLI, Claude Desktop, Cursor, and Windsurf, and a complete MCP client setup guide covering more than 15 clients. Enabling LSP tools requires specifying your language server when starting the server.

Supported Languages

The official description supports 17 languages, all with full tree-sitter AST parsing capabilities.

Use Cases

  • Developers who want AI assistants to deeply understand large or complex codebases.
  • Teams that need to retrieve code through natural language, trace dependencies, and preserve code context across sessions.
  • Users of Claude, Cursor, Windsurf, or other MCP-compatible clients.

Retrieval Quality

The project includes reproducible retrieval benchmarks (benchmark/): 127 carefully curated code search queries, with line-range annotated ground truth, run against octocode's own source code. The official description mentions that shifting RRF fusion toward BM25/keyword signals can improve Hit@5 by +22% and Recall@10 by +20%, without increasing cost; it also points out that a general-purpose local cross-encoder reranker (bge-reranker-base) actually degrades results, and code retrieval requires a code-aware reranker. The complete methodology and metric definitions are in benchmark/README.md.

Privacy and Security

  • Local-first: via fastembed - Fully local embeddings, no API key required; cloud providers are optional.
  • API keys are stored locally, with environment variable support.
  • Respects .gitignore and does not index sensitive files.
  • MCP security: the server runs only locally, and search does not access the external network.
  • Cloud security: when using a cloud provider, only the embedded code chunks are sent; if fully offline indexing is needed, local models can be used.

Limitations

  • No official pricing, fees, or subscription information is provided, and none is available for now.
  • Performance and accuracy depend on the chosen embedding provider and reranker configuration.
  • In cloud provider mode, the embedded code chunks are sent to the corresponding service.
  • The project is built with Rust, and the supported languages are the 17 officially listed.