Code Sage
A high - performance MCP server for semantic code search, written in Rust, supporting hybrid search (BM25 + vector embedding), AST intelligent chunking, and over 60 programming languages.
rating : 2.5 points
downloads : 4.6K
What is Code Sage?
Code Sage is an intelligent code search tool designed specifically for developers. It can understand the semantic meaning of code, rather than just keyword matching. By analyzing your codebase, it can quickly find functions, classes, and methods related to your query intent, greatly improving the efficiency of code search.How to use Code Sage?
Using Code Sage is very simple: First, configure the MCP client (such as Claude Desktop), then analyze your codebase to create an index, and finally, you can use natural language queries to search for code. The entire process is completely local, protecting the privacy of your code.Use Cases
Code Sage is particularly suitable for the following scenarios: 1. Quickly locate function implementations in a new codebase 2. Find specific business logic or algorithms 3. Understand complex code architectures 4. Quickly find relevant code during code reviews 5. Explore the code structure when learning open - source projectsMain Features
Hybrid Search Technology
Combines keyword search (BM25) and semantic search (vector embedding), and re - ranks the results through the RRF algorithm to provide the most relevant results. It retains the precision of traditional search and has AI understanding capabilities.
Intelligent Code Chunking
Uses AST (Abstract Syntax Tree) technology to intelligently split code by semantic units (functions, classes, methods) instead of simple character chunking. It supports over 60 programming languages, including mainstream languages such as Python, JavaScript, Java, Rust, etc.
Multi - Model Support
Supports multiple embedding model providers: OpenAI cloud service, LM Studio local model, and Ollama local deployment. It is recommended to use LM Studio for better stability and local privacy protection.
Intelligent File Filtering
Automatically identifies and respects the.gitignore file, avoiding the analysis of temporary files, build artifacts, etc. It also supports custom extensions and ignore patterns, flexibly adapting to various project structures.
Zero External Dependencies
All data is stored locally, eliminating the need to connect to an external database server. It uses an embedded storage engine to ensure data security and fast access.
MCP Protocol Compatibility
Fully compatible with the Model Context Protocol, it can be seamlessly integrated with MCP - supported clients such as Claude Desktop and Cursor, providing a unified AI assistant experience.
Advantages
๐ Semantic Understanding: Truly understand the meaning of code, not just keyword matching
โก High Performance: Written in Rust, with fast processing speed and high memory efficiency
๐ Privacy Protection: All data is stored locally, and code is not uploaded to the cloud
๐ Offline Availability: Can work completely offline when using local models
๐ Multi - Language Support: Over 60 programming languages and configuration file formats
๐ฏ Precise Search: Hybrid search technology provides the most relevant results
Limitations
๐ File Size Limit: A single file cannot exceed 1MB
๐ง Configuration Required: The MCP client needs to be set up for the first use
๐พ Storage Space: Indexing will occupy a certain amount of disk space
๐ Model Switching: Re - indexing is required when changing the embedding model
๐ฑ Platform Limitation: Ollama may be unstable on macOS M1
โฑ๏ธ First - Time Indexing: Analyzing a large codebase for the first time takes time
How to Use
Installation and Building
Build Code Sage from the source code. You need to install Rust version 1.70 or higher.
Configure the MCP Client
Add the Code Sage server configuration to your MCP client (such as Claude Desktop). It is recommended to use LM Studio as the embedding model provider.
Set Up the Embedding Model
Download and start LM Studio, load the nomic - embed - text model, and start the local server.
Analyze the Codebase
Use the analyze_code tool to create a code index. The first analysis may take some time, depending on the size of the codebase.
Search for Code
Use the find_code tool to search for code through natural language queries.
Usage Examples
Search for Authentication - Related Code
In a large - scale web application, you need to find all code related to user authentication, including login, registration, and permission checks.
Search for Specific API Endpoints
You know there is a callback API for processing payments in the project, but you are not sure about its specific location and implementation details.
Understand the Database Architecture
Newly joined the project, you need to quickly understand the code structure and data models related to the database.
Code Review Assistance
During code review, you need to find all code related to a specific function to ensure no omissions.
Frequently Asked Questions
Does Code Sage require an internet connection?
Which programming languages are supported?
How to protect the privacy of my code?
How long does it take to analyze a large codebase?
Can multiple codebases be analyzed simultaneously?
What needs to be done after changing the embedding model?
How to add support for new file types?
What is the sorting basis for search results?
Related Resources
GitHub Repository
Source code and latest version of Code Sage
MCP Protocol Documentation
Official specification of the Model Context Protocol
LM Studio Official Website
Local AI model running platform, recommended for Code Sage
Ollama Official Website
Local large - language model running tool
Claude Desktop
AI assistant desktop application supporting the MCP protocol
Architecture Documentation
Detailed architecture design description of Code Sage
Issue Feedback
Submit bug reports and feature requests
Discussion Area
Exchange usage experiences with other users

Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
27.0K
5 points

Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
18.1K
4.3 points

Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
17.5K
4.5 points

Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
54.0K
4.3 points

Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
22.7K
5 points

Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
50.4K
4.5 points

Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
18.1K
4.5 points

Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
34.9K
4.8 points
ยฉ 2025AIBase