Codebase RAG MCP Server
Uses PostgreSQL database to store and query code embeddings for semantic codebase search, enabling vector similarity searches across tracked code snippets and files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codebase RAG MCP Serversearch for authentication middleware in the codebase"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codebase RAG MCP Server
This MCP server provides semantic codebase search and file retrieval using embeddings and a PostgreSQL database. It exposes tools for searching code, listing files, and retrieving file contents.
Features
Semantic Code Search: Uses Voyage embedding model to convert queries into vectors and search code snippets by similarity.
File Listing: Lists all tracked files in the codebase.
File Content Retrieval: Fetches the full content of a file by filename.
Related MCP server: Codebase MCP Server
Tools
search_codebase
Returns code snippets relevant to the query.
Inputs:
query(string): Search terms
get_files
Lists all files in the codebase.
get_file_content
Returns the content of the specified file.
Inputs:
filename(string): Filename
Configuration
Getting a Voyage API Key
Sign up for a Voyage API account
Generate your API key from the dashboard
Environment Variables
DATABASE_URL: PostgreSQL connection string.VOYAGE_API_KEY: API key for embedding model.EMBEDDING_TABLE: Table name for code embeddings.TRACKING_TABLE: Table name for file tracking.
Docker
{
"mcpServers": {
"codebase-rag": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URL",
"-e",
"VOYAGE_API_KEY",
"-e",
"EMBEDDING_TABLE",
"-e",
"TRACKING_TABLE",
"-p",
"8080:8080",
"allentcm/mcp-codebase-rag:1.0.0"
],
"env": {
"DATABASE_URL": "postgres://cocoindex:cocoindex@localhost/cocoindex",
"VOYAGE_API_KEY": "voyage_api_key",
"EMBEDDING_TABLE": "codebase__code_embeddings",
"TRACKING_TABLE": "codebase__cocoindex_tracking"
}
}
}
}License
This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables semantic code search across local projects and Git repositories using AI embeddings with ChromaDB. Supports both OpenAI and local Ollama models for private, enterprise-ready code analysis and similar code discovery.Last updated44MIT
- Alicense-qualityDmaintenanceEnables AI assistants to semantically search and understand code repositories using PostgreSQL with pgvector embeddings. Provides repository indexing, natural language code search, and development task management with git integration.Last updatedMIT
- Alicense-qualityFmaintenanceEnables semantic search across your codebase using Google's Gemini embeddings and Qdrant Cloud vector storage. Supports 15+ programming languages with smart code chunking and real-time file change monitoring.Last updated7019MIT
- Flicense-qualityDmaintenanceEnables AI assistants to index and search codebases using semantic search powered by multiple embedding providers (OpenAI, VoyageAI, Gemini, Ollama) and vector database storage.Last updated
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/allentcm/mcp-codebase-rag'
If you have feedback or need assistance with the MCP directory API, please join our Discord server