Navigation
VectorCode: Instant Code Indexing & Smarter Problem Solving - MCP Implementation

VectorCode: Instant Code Indexing & Smarter Problem Solving

VectorCode: Supercharge LLM workflows with instant code repo indexing. Smarter insights, faster problem-solving. No more digging—just precision.

Developer Tools
4.4(124 reviews)
186 saves
86 comments

This tool saved users approximately 6549 hours last month!

About VectorCode

What is VectorCode: Instant Code Indexing & Smarter Problem Solving?

VectorCode is an intelligent code repository indexing tool designed to enhance coding efficiency by contextualizing your project for Large Language Models (LLMs). By creating semantic embeddings of your codebase, it enables LLMs to generate more accurate and relevant suggestions, eliminating the need for manual context setup. Ideal for developers working on complex projects, it bridges the gap between code understanding and AI-driven problem solving.

How to Use VectorCode: Instant Code Indexing & Smarter Problem Solving?

  1. Install via package managers or clone the repository
  2. Run vectorise command to index your codebase
  3. Integrate with Neovim through the provided plugin
  4. Query contextual code insights directly in your editor

Full documentation available via GitHub repository and dedicated docs site.

VectorCode Features

Key Features of VectorCode: Instant Code Indexing & Smarter Problem Solving?

  • Smart chunking: Automatically segments code into logical units for precise analysis
  • Project root detection: Accurately identifies workspace boundaries without manual configuration
  • Chromadb integration: Leverages vector database for fast semantic searches
  • Tool-calling support: Seamlessly interacts with LLM tools like Minuet- and CodeCompanion
  • Exclude path management: Customizable ignore patterns for build/artifact directories

Use Cases of VectorCode: Instant Code Indexing & Smarter Problem Solving?

Developers use VectorCode to:

  • Resolve ambiguous code references by showing relevant project context
  • Accelerate onboarding by highlighting key patterns in unfamiliar codebases
  • Generate documentation stubs using contextual code examples
  • Create reproducible AI experiments with consistent code context

VectorCode FAQ

FAQ from VectorCode: Instant Code Indexing & Smarter Problem Solving?

  • Which embeddings does it support? - Currently uses OpenAI's ada-002 but supports custom models via API
  • How to update the index? - Run vectorise --update to refresh only modified files
  • Can I use it offline? - Base indexing requires internet, but querying works offline with cached embeddings
  • Where are docs for older versions? - Check GitHub releases or versioned archives

Content

VectorCode

codecov Test and Coverage pypi

VectorCode is a code repository indexing tool. It helps you write better prompt for your coding LLMs by indexing and providing information about the code repository you're working on. This repository also contains the corresponding neovim plugin because that's what I used to write this tool.

[!NOTE] This project is in beta quality and only implements very basic retrieval and embedding functionalities. There are plenty of rooms for improvements and any help is welcomed.

[!NOTE] Chromadb, the vector database backend behind this project, supports multiple embedding engines. I developed this tool using SentenceTransformer, but if you encounter any issues with a different embedding function, please open an issue (or even better, a pull request :D).

  • Why VectorCode?
  • Documentation
  • TODOs
  • Credit

Why VectorCode?

LLMs usually have very limited understanding about close-source projects, projects that are not well-known, and cutting edge developments that have not made it into releases. Their capabilities on these projects are quite limited. Take my little toy sudoku-solving project as an example: When I wrote the first few lines and want the LLM to fill in the list of solvers that I implemented in solver_candidates, without project context, the completions are simply random guesses that might be part of another sudoku project: But with RAG context provided by VectorCode, my completion LLM was able to provide completions that I actually implemented: This makes the completion results far more usable. A similar strategy is implemented in continue, a popular AI completion and chat plugin available on VSCode and JetBrain products.

Documentation

[!NOTE] The documentation on the main branch reflects the code on the latest commit (apologies if I forget to update the docs, but this will be what I aim for). To check for the documentation for the version you're using, you can check out the corresponding tags.

TODOs

  • query by file path excluded paths;
  • chunking support;
    • add metadata for files;
    • chunk-size configuration;
    • smarter chunking (semantics/syntax based), implemented with py-tree-sitter and tree-sitter-language-pack;
    • configurable document selection from query results.
  • NeoVim Lua API with cache to skip the retrieval when a project has not been indexed Returns empty array instead;
  • job pool for async caching;
  • persistent-client;
  • [-] proper remote Chromadb support (with authentication, etc.);
  • respect .gitignore;
  • implement some sort of project-root anchors (such as .git or a custom .vectorcode.json) that enhances automatic project-root detection. Implemented project-level.vectorcode/ and .git as root anchor
  • ability to view and delete files in a collection (atm you can only drop and vectorise again);
  • joint search (kinda, using codecompanion.nvim).

Credit

Related MCP Servers & Clients