| Crates.io | dynamic_grounding_for_github_copilot |
| lib.rs | dynamic_grounding_for_github_copilot |
| version | 0.1.0 |
| created_at | 2025-11-01 18:10:31.918724+00 |
| updated_at | 2025-11-01 18:10:31.918724+00 |
| description | MCP server providing Google Gemini AI integration for enhanced codebase search and analysis |
| homepage | https://github.com/ciresnave/dynamic_grounding_for_github_copilot |
| repository | https://github.com/ciresnave/dynamic_grounding_for_github_copilot |
| max_upload_size | |
| id | 1912262 |
| size | 2,464,926 |
A Model Context Protocol (MCP) server that integrates Google's Gemini AI to provide enhanced codebase search and analysis capabilities for GitHub Copilot in VS Code.
Search through your entire codebase using plain English queries
Get intelligent suggestions for improving your project
Analyze relationships and dependencies across multiple files
Quota Tracker (src/quota.rs)
Gemini Client (src/gemini.rs)
search_codebase, analyze_files, ask_about_code, summarize_directoryAPI Key Manager (src/api_key.rs)
SecureString type that zeros memory on dropMCP Server (src/mcp_server.rs)
Install from VS Code Marketplace:
Ctrl+Shift+X (or Cmd+Shift+X on Mac) to open ExtensionsCtrl+Shift+P → "Dynamic Grounding: Setup API Key"The extension automatically downloads the MCP server binary for your platform. No Rust toolchain required!
From Source:
git clone https://github.com/ciresnave/dynamic_grounding_for_github_copilot
cd dynamic_grounding_for_github_copilot
# Build the Rust MCP server
cargo build --release
# Build the VS Code extension
cd vscode-extension
npm install
npm run compile
npx vsce package
Via Cargo:
cargo install dynamic_grounding_for_github_copilot
The easiest way to get started is with the interactive setup wizard:
# After installation, run:
dynamic_grounding_for_github_copilot --setup
The wizard will:
No need to manually navigate URLs or remember configuration steps - just follow the prompts!
If you prefer manual configuration:
The MCP server receives the API key through initialization parameters from the VS Code extension (secure VS Code Secret Storage). Never use environment variables for API keys in production.
Run the interactive setup wizard to configure your API key:
dynamic_grounding_for_github_copilot --setup
This will walk you through the entire process with automatic browser opening and key validation.
dynamic_grounding_for_github_copilot
The server communicates via stdio and awaits MCP protocol messages.
The server exposes 4 tools that GitHub Copilot can use:
search_codebaseSearch through code files using natural language queries.
Parameters:
query (string): Natural language search queryfiles (array): Array of file objects with path and content fieldsExample:
{
"query": "Find all error handling implementations",
"files": [
{
"path": "src/error.rs",
"content": "..."
},
{
"path": "src/gemini.rs",
"content": "..."
}
]
}
Returns: Structured results with relevant file paths, line numbers, explanations, and code snippets.
analyze_filesAnalyze relationships and dependencies across multiple files.
Parameters:
question (string): Question about the filesfiles (array): Array of file objects with path and content fieldsExample:
{
"question": "How does the quota tracker integrate with the API client?",
"files": [
{
"path": "src/quota.rs",
"content": "..."
},
{
"path": "src/gemini.rs",
"content": "..."
}
]
}
Returns: Detailed analysis of relationships, dependencies, and answers to the question.
ask_about_codeAsk questions about specific code sections with context.
Parameters:
context (string): Code context or snippetquestion (string): Question about the codeExample:
{
"context": "pub struct QuotaTracker { ... }",
"question": "How does this struct track API rate limits?"
}
Returns: Clear, concise explanation based on the provided context.
summarize_directoryGet a high-level overview of a directory's structure and purpose.
Parameters:
directory_structure (string): Tree-like directory structurefiles (array): Array of key file objects with path and content fieldsExample:
{
"directory_structure": "src/\n main.rs\n lib.rs\n ...",
"files": [
{
"path": "src/lib.rs",
"content": "..."
}
]
}
Returns: Summary including overall purpose, architecture, key components, and notable patterns.
{
"method": "tools/call",
"params": {
"name": "search_codebase",
"arguments": {
"query": "Find all error handling implementations",
"file_paths": ["src/error.rs", "src/gemini.rs"]
}
}
}
The quota tracker monitors all three limits and provides warnings in tool responses.
SecureString type prevents accidental logging.gitignore patternsNever commit:
.env files*secret* or *token* in the namecargo test
Completed:
Pending:
Contributions welcome! Please:
cargo test passesMIT OR Apache-2.0