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.
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.
Metadata
Release files for iflow-mcp_mcp-codebase-rag 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iflow_mcp_mcp_codebase_rag-1.0.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iflow_mcp_mcp_codebase_rag-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / iflow_mcp_mcp_codebase_rag-1.0.0.tar.gz
| Download URL | iflow_mcp_mcp_codebase_rag-1.0.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45ab6ee7243347a0d0bda89ef5a996b62d8bb64fbcee3c06a5caa80e411a771a
|
|
BLAKE2b-256 checksum How to use checksums |
bf9c07010437c8b57e617ff324f61195e2c0c99b6405a98804f355b317761042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / iflow_mcp_mcp_codebase_rag-1.0.0-py3-none-any.whl
| Download URL | iflow_mcp_mcp_codebase_rag-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2861d37d917f61dc70bf70ab54f5574e61886bbc1e75b850c7cf34536e29e45a
|
|
BLAKE2b-256 checksum How to use checksums |
ee8f6b7def907bb4769033bb0f7bbd06e333c156a96ea9ac456e91ba83e33eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|