Skip to content

Commit 7dec12b

Browse files
committed
feat: Add VS Code + GitHub Copilot integration support
- Added comprehensive VS Code + Copilot integration guide (docs/vscode-copilot-integration.md) - Updated README.md with VS Code setup instructions and examples - Enhanced QUICKSTART.md with detailed VS Code + Copilot section - Updated quick-install.sh with IDE-specific instructions for VS Code - Updated server.json description to mention VS Code + Copilot compatibility Features: - Automatic MCP configuration for VS Code during installation - Agent mode integration with GitHub Copilot - Explicit tool invocation with #ragcode - Comprehensive troubleshooting guide - Multi-workspace support documentation - Advanced configuration options (custom models, remote services) The integration enables semantic code search through Copilot's agent mode, allowing developers to leverage RagCode's tools directly from VS Code.
1 parent bfb2a28 commit 7dec12b

File tree

5 files changed

+680
-3
lines changed

5 files changed

+680
-3
lines changed

QUICKSTART.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,116 @@ Each project gets its own collection in Qdrant, and RagCode automatically switch
217217

218218
After installation, RagCode is automatically available in the IDE. **No manual action required!**
219219

220+
### In VS Code with GitHub Copilot
221+
222+
RagCode integrates with **GitHub Copilot's Agent Mode** in VS Code through the Model Context Protocol (MCP). This allows Copilot to use RagCode's semantic search capabilities as part of its autonomous coding workflow.
223+
224+
#### Prerequisites
225+
- **VS Code** with **GitHub Copilot** subscription
226+
- RagCode installed (via quick-install script above)
227+
- VS Code version **1.95+** (for MCP support)
228+
229+
#### Setup
230+
231+
The quick-install script automatically configures RagCode for VS Code by creating:
232+
```
233+
~/.config/Code/User/globalStorage/mcp-servers.json
234+
```
235+
236+
**Manual Configuration (if needed):**
237+
238+
Create or edit `~/.config/Code/User/globalStorage/mcp-servers.json`:
239+
240+
```json
241+
{
242+
"mcpServers": {
243+
"ragcode": {
244+
"command": "/home/YOUR_USERNAME/.local/share/ragcode/bin/rag-code-mcp",
245+
"args": [],
246+
"env": {
247+
"OLLAMA_BASE_URL": "http://localhost:11434",
248+
"OLLAMA_MODEL": "phi3:medium",
249+
"OLLAMA_EMBED": "nomic-embed-text",
250+
"QDRANT_URL": "http://localhost:6333"
251+
}
252+
}
253+
}
254+
}
255+
```
256+
257+
**Note:** Replace `YOUR_USERNAME` with your actual username.
258+
259+
#### Using RagCode with Copilot Agent Mode
260+
261+
1. **Open VS Code** in your project directory
262+
2. **Open Copilot Chat** (Ctrl+Shift+I or Cmd+Shift+I)
263+
3. **Enable Agent Mode** by clicking the "Agent" button or typing `/agent`
264+
4. **Use RagCode tools** - Copilot will automatically invoke them based on your prompts
265+
266+
**Example Prompts:**
267+
268+
```
269+
Find all authentication middleware functions in this codebase
270+
```
271+
272+
```
273+
Show me the User model definition and all its methods
274+
```
275+
276+
```
277+
Search for functions that handle database connections
278+
```
279+
280+
```
281+
Find all API endpoints related to user management
282+
```
283+
284+
Copilot will automatically use RagCode's `search_code`, `get_function_details`, `find_type_definition`, and other tools to answer your questions.
285+
286+
#### Explicit Tool Usage
287+
288+
You can also explicitly reference RagCode tools using the `#` symbol:
289+
290+
```
291+
#ragcode search for payment processing functions
292+
```
293+
294+
```
295+
#ragcode find the UserController type definition
296+
```
297+
298+
#### Verifying MCP Integration
299+
300+
1. Open **Command Palette** (Ctrl+Shift+P / Cmd+Shift+P)
301+
2. Type: `MCP: Show MCP Servers`
302+
3. Verify that `ragcode` appears in the list
303+
4. Check status shows "Connected"
304+
305+
#### Troubleshooting VS Code Integration
306+
307+
**MCP server not showing:**
308+
- Verify config file exists: `~/.config/Code/User/globalStorage/mcp-servers.json`
309+
- Restart VS Code
310+
- Check VS Code version (requires 1.95+)
311+
312+
**Tools not working:**
313+
- Ensure Qdrant and Ollama are running: `docker ps | grep qdrant`
314+
- Check MCP server logs in VS Code Output panel (select "MCP" from dropdown)
315+
- Verify binary path is correct in config
316+
317+
**Copilot not using tools:**
318+
- Make sure you're in **Agent Mode** (not regular chat)
319+
- Try explicitly mentioning `#ragcode` in your prompt
320+
- Ensure workspace is indexed (ask Copilot to index first)
321+
322+
**📖 For more details:** See [docs/vscode-copilot-integration.md](../docs/vscode-copilot-integration.md) for:
323+
- Advanced configuration options
324+
- Custom Ollama models
325+
- Remote Ollama/Qdrant setup
326+
- Detailed troubleshooting
327+
- Multi-workspace workflows
328+
- Performance optimization tips
329+
220330
#### Available Tools:
221331

222332
1. **`search_code`** - Semantic code search

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,63 @@ ollama list
186186

187187
---
188188

189-
## 🎯 Using RagCode in Windsurf / Cursor
189+
## 🎯 Using RagCode in Your IDE
190190

191191
After installation, RagCode is automatically available in supported IDEs. No additional configuration is required.
192192

193+
### Supported IDEs
194+
195+
- **Windsurf** - Full MCP support
196+
- **Cursor** - Full MCP support
197+
- **Antigravity** - Full MCP support
198+
- **Claude Desktop** - Full MCP support
199+
- **VS Code + GitHub Copilot** - Agent mode integration (requires VS Code 1.95+)
200+
201+
### VS Code + GitHub Copilot Integration
202+
203+
RagCode integrates with **GitHub Copilot's Agent Mode** through MCP, enabling semantic code search as part of Copilot's autonomous workflow.
204+
205+
**Quick Setup:**
206+
1. Install RagCode using the quick-install script (automatically configures VS Code)
207+
2. Open VS Code in your project
208+
3. Open Copilot Chat (Ctrl+Shift+I / Cmd+Shift+I)
209+
4. Enable **Agent Mode** (click "Agent" button or type `/agent`)
210+
5. Ask questions - Copilot will automatically use RagCode tools
211+
212+
**Example Prompts:**
213+
```
214+
Find all authentication middleware functions in this codebase
215+
Show me the User model definition and all its methods
216+
Search for functions that handle database connections
217+
```
218+
219+
**Manual Configuration:**
220+
Edit `~/.config/Code/User/globalStorage/mcp-servers.json`:
221+
```json
222+
{
223+
"mcpServers": {
224+
"ragcode": {
225+
"command": "/home/YOUR_USERNAME/.local/share/ragcode/bin/rag-code-mcp",
226+
"args": [],
227+
"env": {
228+
"OLLAMA_BASE_URL": "http://localhost:11434",
229+
"OLLAMA_MODEL": "phi3:medium",
230+
"OLLAMA_EMBED": "nomic-embed-text",
231+
"QDRANT_URL": "http://localhost:6333"
232+
}
233+
}
234+
}
235+
}
236+
```
237+
238+
**Verify Integration:**
239+
- Command Palette → `MCP: Show MCP Servers`
240+
- Check that `ragcode` appears with "Connected" status
241+
242+
**📖 Detailed Guide:** See [docs/vscode-copilot-integration.md](./docs/vscode-copilot-integration.md) for complete setup, troubleshooting, and advanced features.
243+
244+
See [QUICKSTART.md](./QUICKSTART.md) for detailed VS Code setup and troubleshooting.
245+
193246
### Available Tools
194247
1. **`search_code`** – semantic code search
195248
2. **`hybrid_search`** – semantic + lexical search
@@ -199,6 +252,7 @@ After installation, RagCode is automatically available in supported IDEs. No add
199252
6. **`list_package_exports`** – list all exported symbols in a package
200253
7. **`search_docs`** – search markdown documentation
201254
8. **`index_workspace`** – manually trigger indexing of a workspace (usually not needed)
255+
9. **`get_code_context`** – read code from specific file locations with context
202256

203257
**All tools require a `file_path` parameter** so that RagCode can determine the correct workspace.
204258

0 commit comments

Comments
 (0)