-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathllms.txt
More file actions
102 lines (73 loc) · 4.6 KB
/
llms.txt
File metadata and controls
102 lines (73 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# RagCode MCP Server
<!-- AI Agents: This is the summarized documentation for RagCode. For full details, see llms-full.txt -->
> Privacy-first MCP server for semantic code search using RAG. Runs 100% locally.
## Why RagCode?
- **5-10x faster** code understanding vs. reading files manually
- **98% token savings** - returns only relevant code, not entire files
- **Zero cost** - no API fees, runs on local Ollama + Qdrant
- **Privacy-first** - code never leaves your machine
## RagCode vs Generic RAG
Unlike generic RAG that splits code into arbitrary text chunks, RagCode:
- **Semantic chunking** - extracts complete functions, classes, methods (not random 512-token splits)
- **Rich metadata** - name, type, parameters, return type, dependencies, line numbers
- **Relationships** - knows class inheritance, method calls, imports
- **AST parsing** - understands Go, PHP, Python syntax (not regex/heuristics)
- **Exact + semantic search** - find "UserController" exactly, not just similar text
- **Complete code units** - AI sees runnable code, not fragments
## Compatibility
- **IDEs:** Windsurf, Cursor, VS Code + GitHub Copilot, Claude Desktop, Antigravity
- **Languages:** Go, PHP (Laravel), Python (full support with classes, decorators, type hints)
- **Planned:** JavaScript/TypeScript (tree-sitter based)
- **OS:** Linux, macOS, Windows (all require Docker)
## Quick Install
**Linux:**
```bash
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_linux_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
```
**macOS (Apple Silicon):**
```bash
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_arm64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
```
**macOS (Intel):**
```bash
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
```
**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri "https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_windows_amd64.zip" -OutFile "ragcode.zip"; Expand-Archive ragcode.zip -DestinationPath . -Force; .\ragcode-installer.exe -ollama=docker -qdrant=docker
```
**Windows with WSL:** Install Linux version in WSL, then configure Windows IDEs to use `wsl.exe` as command with args `["-e", "/home/USER/.local/share/ragcode/bin/rag-code-mcp"]`.
Key flags: `-ollama` (docker/local), `-qdrant` (docker/remote), `-gpu`, `-models-dir`, `-skip-build`
## Example Usage
User: "Find authentication middleware in this codebase"
→ RagCode uses `search_code` tool
→ Returns exact functions with file paths and line numbers
→ AI can now reason about the code without reading 50 files
## 9 MCP Tools
1. `search_code` - **USE FIRST** - Semantic search by MEANING. Returns complete source code + file:line. Better than hybrid_search for exploration. **Go, PHP, Python, HTML.**
2. `hybrid_search` - Keyword + semantic for **EXACT matches** only. Returns code + file:line + metadata. Use when search_code misses exact terms. **Go, PHP, Python, HTML.**
3. `get_function_details` - **COMPLETE** function source: signature, params, return types, body. **Go, PHP, Python.**
4. `find_type_definition` - Complete type source with fields, methods, inheritance chain. **Go, PHP, Python.**
5. `find_implementations` - All callers/usages with code snippets + file:line. **Use before refactoring.** **Go, PHP, Python.**
6. `list_package_exports` - Structured list: symbol names, types, signatures. **Go, PHP, Python.**
7. `search_docs` - Doc snippets with file paths. **Markdown only. Not for code** - use search_code.
8. `get_code_context` - Code snippet with configurable context lines. **Any text file.**
9. `index_workspace` - Reindex codebase. **USUALLY AUTOMATIC.** Call after git pull/branch switch. **Go, PHP, Python, HTML.**
## Configuration
Config file: `~/.local/share/ragcode/config.yaml`
```yaml
llm:
provider: "ollama"
model: "phi3:medium"
embed_model: "mxbai-embed-large"
storage:
vector_db:
url: "http://localhost:6333"
```
## Status
✅ Production-ready | ✅ Active development | ✅ MIT License
## Links
- GitHub: https://github.com/doITmagic/rag-code-mcp
- Full docs: https://github.com/doITmagic/rag-code-mcp/blob/main/llms-full.txt
## Keywords
semantic-code-search, rag, retrieval-augmented-generation, mcp-server, model-context-protocol, ai-code-assistant, vector-search, code-navigation, ollama, qdrant, github-copilot, cursor-ai, windsurf, go, php, laravel, python, django, flask, local-ai, privacy-first, offline-ai, self-hosted, zero-cost