dynamic_grounding_for_github_copilot 0.1.0

MCP server providing Google Gemini AI integration for enhanced codebase search and analysis
Documentation
# Dynamic Grounding for GitHub Copilot - Installation Guide


## Overview


Dynamic Grounding extends GitHub Copilot with Google Gemini AI capabilities for advanced codebase searching and analysis. The system consists of:

1. **Rust MCP Server** - High-performance server implementing 4 AI-powered tools
2. **VS Code Extension** - Seamless integration with GitHub Copilot

## Prerequisites


- VS Code 1.85.0 or later
- GitHub Copilot subscription
- Google Gemini API key (free tier available)
- Rust toolchain (for server installation via cargo)

## Installation Steps


### Step 1: Install the VS Code Extension


You have two options:

**Option A: Install from .vsix file (Local)**
```bash
cd vscode-extension
code --install-extension dynamic-grounding-copilot-0.1.0.vsix
```

**Option B: Install from VS Code Marketplace (Coming Soon)**
- Search for "Dynamic Grounding" in VS Code Extensions
- Click Install

### Step 2: Get a Google Gemini API Key


1. The extension will prompt you automatically, or run the command: `Dynamic Grounding: Setup`
2. The wizard will open https://aistudio.google.com/app/apikey in your browser
3. Sign in with your Google account
4. Click "Create API Key"
5. Copy the key (starts with `AIza...`)

**Free Tier Limits:**
- 15 requests per minute
- 1,500 requests per day
- 1 million tokens per minute

### Step 3: Install the MCP Server


The extension will prompt you to install the server. Choose one:

**Option A: Via Cargo (Recommended)**
```bash
cargo install dynamic_grounding_for_github_copilot
```

**Option B: Via Extension Command**
- Run command: `Dynamic Grounding: Setup`
- Choose "Install via Cargo"
- Wait for installation to complete in terminal

### Step 4: Complete Setup


1. Run command: `Dynamic Grounding: Setup` (or wait for auto-prompt)
2. Enter your API key when prompted
3. The extension will:
   - Validate your API key
   - Store it securely in VS Code Secret Storage
   - Start the MCP server
   - Register with GitHub Copilot

## Verification


After installation, verify everything works:

1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
2. Type "Dynamic Grounding"
3. You should see these commands:
   - `Dynamic Grounding: Setup` - Run setup wizard
   - `Dynamic Grounding: View Quota Status` - Check API usage
   - `Dynamic Grounding: Clear API Key` - Remove stored key
   - `Dynamic Grounding: Restart Server` - Restart MCP server
   - `Dynamic Grounding: Check for Updates` - Update checker

4. Check the Output panel:
   - View → Output
   - Select "Dynamic Grounding" from dropdown
   - Should show "MCP server started successfully"

## Using with GitHub Copilot


Once installed, the 4 tools are available through GitHub Copilot Chat:

### 1. Search Codebase

Ask Copilot natural language questions about your code:
```
@workspace where is the authentication logic implemented?
@workspace find all database query functions
@workspace show me error handling patterns in this codebase
```

### 2. Analyze Files

Request cross-file analysis:
```
@workspace analyze the relationship between UserController and UserService
@workspace how does the frontend communicate with the backend API?
```

### 3. Ask About Code

Get contextual answers:
```
@workspace explain how the payment processing works
@workspace what design patterns are used here?
@workspace how is state management implemented?
```

### 4. Summarize Directory

Get project overviews:
```
@workspace summarize the src/components directory
@workspace what's the structure of the backend folder?
```

## Configuration


Open VS Code Settings (Ctrl+, / Cmd+,) and search for "Dynamic Grounding":

- **Auto Start** (default: true) - Start server when VS Code opens
- **Server Path** - Custom path to MCP server binary
- **Log Level** (default: info) - Logging verbosity
- **Show Quota Warnings** (default: true) - Alert when approaching limits

## Troubleshooting


### Server Not Found

- Ensure Rust is installed: `rustc --version`
- Reinstall server: `cargo install --force dynamic_grounding_for_github_copilot`
- Check server path in settings

### API Key Issues

- Run: `Dynamic Grounding: Clear API Key`
- Run: `Dynamic Grounding: Setup`
- Verify key starts with `AIza` and is from https://aistudio.google.com/app/apikey

### Server Won't Start

- Check Output panel for errors
- Verify API key is valid
- Try: `Dynamic Grounding: Restart Server`
- Ensure port is not in use

### Quota Exceeded

- Run: `Dynamic Grounding: View Quota Status`
- Free tier resets daily
- Consider upgrading at https://ai.google.dev/pricing

### Extension Not Working

- Check extension is enabled: Extensions → Dynamic Grounding
- Reload VS Code: Developer → Reload Window
- Check logs: View → Output → Dynamic Grounding
- Report issues: https://github.com/ciresnave/dynamic_grounding_for_github_copilot/issues

## Updating


### Update Extension

```bash
cd vscode-extension
npm run package
code --install-extension dynamic-grounding-copilot-0.1.0.vsix
```

### Update Server

```bash
cargo install --force dynamic_grounding_for_github_copilot
```

Then restart VS Code or run: `Dynamic Grounding: Restart Server`

## Uninstallation


1. Uninstall extension:
   - Extensions → Dynamic Grounding → Uninstall
   - Or: `code --uninstall-extension ciresnave.dynamic-grounding-copilot`

2. Remove server:
   ```bash
   cargo uninstall dynamic_grounding_for_github_copilot

   ```

3. Clear stored data:
   - API key is automatically removed with extension
   - No other data is stored

## Privacy & Security


- **API Key Storage**: Securely stored in VS Code Secret Storage (same as GitHub Copilot)
- **Data Transmission**: Code snippets sent to Google Gemini API for analysis
- **No Logging**: API key never logged or stored in plaintext
- **Local Server**: MCP server runs locally on your machine
- **No Telemetry**: No usage data collected by this extension

## Support


- **Documentation**: See TOOLS.md for detailed tool capabilities
- **Issues**: https://github.com/ciresnave/dynamic_grounding_for_github_copilot/issues
- **License**: MIT OR Apache-2.0 (server), MIT (extension)

## Next Steps


1. Try the example queries above with `@workspace`
2. Explore the 4 tools in TOOLS.md
3. Configure settings to your preference
4. Report any issues on GitHub

Enjoy enhanced GitHub Copilot with Google Gemini AI! 🚀