Dynamic Grounding for GitHub Copilot
Enhance GitHub Copilot with Google Gemini AI for advanced codebase search and analysis using natural language queries.
Features
- Enhanced Codebase Search: Use plain English to search across your entire codebase with Gemini's 2M token context window
- File Analysis: Get detailed insights about specific files and their relationships
- Code Q&A: Ask questions about your code and get intelligent answers
- Directory Summarization: Understand the structure and purpose of directories
Screenshots
Natural Language Codebase Search
Search through your entire codebase using plain English queries - find patterns, implementations, and relationships instantly
AI-Powered Project Analysis
Get intelligent suggestions for improving your project - architecture, performance, security, and more
Multi-File Code Understanding
Analyze relationships and dependencies across multiple files with deep contextual understanding
Requirements
- Google Gemini API Key: Free tier available at Google AI Studio
- VS Code: Version 1.85.0 or higher
- GitHub Copilot: Active GitHub Copilot subscription
Note: The extension automatically downloads the MCP server binary for your platform. No Rust toolchain required!
Installation
- Install from VS Code Marketplace (or install the .vsix file manually)
- Run the setup wizard when prompted:
- The extension will offer to download the MCP server binary automatically
- Then guide you through API key configuration
- Alternative: Run commands manually:
Dynamic Grounding: Setup API Key - Configure your Gemini API key
- The extension handles all server installation automatically
That's it! No Rust toolchain, no manual builds, no configuration files to edit.
Usage
Once configured, the extension automatically:
- Starts the MCP server when VS Code launches
- Registers with GitHub Copilot
- Provides enhanced codebase search capabilities
Use GitHub Copilot Chat as usual - the extension adds powerful search tools that Copilot can use automatically when needed.
Available Commands
- Dynamic Grounding: Setup API Key - Configure or update your Gemini API key
- Dynamic Grounding: View API Quota - Check your remaining API quota
- Dynamic Grounding: Clear API Key - Remove stored API key
- Dynamic Grounding: Restart MCP Server - Restart the background server
- Dynamic Grounding: Check for Updates - Check if a newer version is available
Configuration
Settings
dynamicGrounding.autoStart (default: true) - Automatically start the MCP server on VS Code startup
dynamicGrounding.serverPath (default: auto-detected) - Custom path to the MCP server binary
dynamicGrounding.logLevel (default: info) - Logging verbosity: error, warn, info, or debug
dynamicGrounding.showQuotaWarnings (default: true) - Show warnings when approaching API quota limits
API Key Storage
Your API key is stored securely using VS Code's Secret Storage API, which:
- Encrypts secrets at rest
- Integrates with OS credential managers (Keychain, Credential Manager, etc.)
- Never writes keys to plain text files
- Syncs securely with Settings Sync if enabled
Free Tier Limits
Google Gemini's free tier includes:
- 15 requests per minute (RPM)
- 1,500 requests per day (RPD)
- 1 million tokens per minute (TPM)
- 2 million token context window
The extension tracks your usage and warns you when approaching limits.
Troubleshooting
Server won't start
- Check the Output panel (View → Output → "Dynamic Grounding") for error messages
- Try restarting the server:
Dynamic Grounding: Restart MCP Server
- If the binary is missing, the extension will offer to download it automatically
API key validation fails
- Verify your key at Google AI Studio
- Ensure the key has the correct permissions
- Check your internet connection
Quota exceeded
- View current usage:
Dynamic Grounding: View API Quota
- Wait for the quota to reset (1 minute for RPM, 24 hours for RPD)
- Consider upgrading to a paid plan for higher limits
Privacy & Security
- API keys are stored in VS Code Secret Storage (encrypted)
- Code content is sent only to Google's Gemini API when you use the tools
- No telemetry is collected by this extension
- Local quota tracking - no usage data sent to external services
Development
This extension is open source! Contributions welcome:
License
MIT License - See LICENSE file for details
Acknowledgments
Built with: