GemForge is an enterprise-grade integration that connects Google's Gemini AI with the MCP ecosystem. It allows Claude, Roo Code, Windsurf, and other MCP agents to leverage Gemini's capabilities for codebase analysis, live search, multi-format document processing, and more.
The fastest way to get started with GemForge is using the one-line installer:
npx @gemforge/mcp-server@latest init
For more control over your installation, follow these steps:
claude_desktop_config.json
:{
"mcpServers": {
"GemForge": {
"command": "node",
"args": ["./dist/index.js"],
"env": {
"GEMINI_API_KEY": "your_api_key_here"
}
}
}
}
npm install gemforge-mcp
npm start
For containerized environments, use the Docker image:
docker run -e GEMINI_API_KEY=your_api_key ghcr.io/pv-bhat/gemforge:latest
For one-click cloud deployment, you can use the Smithery.ai platform.
GemForge can be configured using these environment variables:
GEMINI_API_KEY=your_api_key_here # Required: Gemini API key
GEMINI_PAID_TIER=true # Optional: Set to true if using paid tier
DEFAULT_MODEL_ID=gemini-2.5-pro # Optional: Override default model
LOG_LEVEL=info # Optional: Set logging verbosity
GemForge intelligently selects the optimal Gemini model for each task:
gemini_search
: Uses gemini-2.5-flash
for speed and search integrationgemini_reason
: Uses gemini-2.5-pro
for deep reasoninggemini_code
: Uses gemini-2.5-pro
for code understandinggemini_fileops
: Selects between models based on file sizeYou can override the model selection by adding the model_id
parameter to any tool call.
Provides real-time web access for retrieving current information:
{
"toolName": "gemini_search",
"toolParams": {
"query": "Latest advancements in quantum computing",
"enable_thinking": true
}
}
Processes complex logic problems with step-by-step thinking:
{
"toolName": "gemini_reason",
"toolParams": {
"question": "Solve this optimization problem...",
"enable_thinking": true
}
}
Analyzes code repositories, generates solutions, and debugs code:
{
"toolName": "gemini_code",
"toolParams": {
"question": "Identify improvements and new features",
"directory_path": "path/to/project",
"repomix_options": "--include \"**/*.js\" --no-gitignore"
}
}
Handles multiple file formats (60+ supported) including PDFs, images, and more:
{
"toolName": "gemini_fileops",
"toolParams": {
"file_path": ["contract_v1.pdf", "contract_v2.pdf"],
"operation": "analyze",
"instruction": "Compare these contract versions and extract all significant changes."
}
}
GemForge can compare different versions of documents, images, or code:
{
"toolName": "gemini_fileops",
"toolParams": {
"file_path": ["version1.js", "version2.js"],
"operation": "compare",
"instruction": "Identify any security vulnerabilities introduced in the new version"
}
}
Analyze entire codebases with configurable inclusion/exclusion patterns:
{
"toolName": "gemini_code",
"toolParams": {
"question": "Provide a high-level architecture overview of this project",
"directory_path": "./src",
"repomix_options": "--include \"**/*.{js,ts}\" --exclude \"**/*.test.js\""
}
}
Process structured XML data with specialized handling:
{
"toolName": "gemini_fileops",
"toolParams": {
"file_path": "data.xml",
"operation": "extract",
"instruction": "Extract all customer records with purchases over $1000"
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "GemForge" '{"command":"node","args":["./dist/index.js"],"env":{"GEMINI_API_KEY":"your_api_key_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"GemForge": {
"command": "node",
"args": [
"./dist/index.js"
],
"env": {
"GEMINI_API_KEY": "your_api_key_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"GemForge": {
"command": "node",
"args": [
"./dist/index.js"
],
"env": {
"GEMINI_API_KEY": "your_api_key_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect