VS Code + Gemini Code Assist
This guide describes how to configure Mobb Vibe Shield (MVS) as an MCP (Model Context Protocol) server in Visual Studio Code with Gemini Code Assist.
Prerequisites
Before setting up MVS, ensure the following:
VS Code
Gemini Code Assist VS Code Extension
Install the Gemini Code Assist extension from the VS Code Marketplace (Link)
Node.js
Ensure Node.js v18.20 or later is installed. The Mobb MCP server uses npx and requires a modern Node.js runtime.
node --versionIf not installed or outdated, install via nodejs.org.
Step 1: Configure Mobb MCP Server
You can configure the MCP server either per workspace or globally.
Option A: Workspace-Level (.gemini/settings.json)
.gemini/settings.json)In your project root, create
.gemini/settings.json:
{
"mcpServers": {
"mobb-mcp": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "mobbdev@latest", "mcp"],
"env": {
}
}
}
}
This file can be committed to your repo and shared across your team.
For single-tenant users, ensure you add the variables API_URL and WEB_APP_URL in the env section. Furthermore, TOOLS_ENABLED allows you to specify which modes are allowed:
For example:
{
"mcpServers": {
"mobb-mcp": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "mobbdev@latest", "mcp"],
"env": {
"API_URL": "https://api-st-<YOUR_TENANT_NAME>.mobb.ai/v1/graphql",
"WEB_APP_URL": "https://<YOUR_TENANT_NAME>.mobb.ai",
"TOOLS_ENABLED": ["fetch_available_fixes"]
}
}
}
}Option B: Global Configuration
Open your Gemini settings JSON file, located at
~/.gemini/settings.jsonwhere~is your home directory (Mac/Linux) or%USERPROFILE%\.gemini\settings.json(Windows)Add or update the MCP configuration as follows:
{
"mcpServers": {
"mobb-mcp": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "mobbdev@latest", "mcp"],
"env": {
}
}
}
}This allows you to reuse the same setup across all projects.
For single-tenant users, ensure you add the variables API_URL and WEB_APP_URL in the env section. Furthermore, TOOLS_ENABLED allows you to specify which modes are allowed:
For example:
{
"mcpServers": {
"mobb-mcp": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "mobbdev@latest", "mcp"],
"env": {
"API_URL": "https://api-st-<YOUR_TENANT_NAME>.mobb.ai/v1/graphql",
"WEB_APP_URL": "https://<YOUR_TENANT_NAME>.mobb.ai",
"TOOLS_ENABLED": ["fetch_available_fixes"]
}
}
}
}Step 2: Restart VS Code
After configuring the MCP server, restart VS Code to load the new configuration:
Close and reopen VS Code completely, or
Reload VS Code
Open Command Palette (
Ctrl+Shift+PorCmd+Shift+P)Run
Developer: Reload Window

Step 3: Verify Mobb MCP Integration
Open Gemini from the left navigation panel in VS Code

Toggle agent mode on in the Gemini chat window

Type
/toolsto see if Mobb tools are available
Type
/mcpto see if Mobb MCP server is detected
If the configuration is successful, you'll see mobb-mcp tools available (such as scan_and_fix_vulnerabilities, fetch_available_fixes, and check_for_new_available_fixes).

Step 4: Use Mobb with Gemini Code Assist
Ensure Agent Mode is active. Then in the Gemini Code Assist chat, type:
Scan and fix my code using MobbGemini will automatically use the Mobb tools when appropriate
On first-time setup, MVS will open a browser window to connect to the Mobb platform. You will be prompted to log in and authorize the IDE integration.
Deploying a Rulebook for Automated Security Scanning and Fixing
To ensure comprehensive security coverage in your development workflow, you should deploy a security-focused rulebook that mandates Mobb vulnerability scanning and fixing after every code change. In VS Code with Gemini Code Assist, this can be done by adding a file named .gemini/GEMINI.md at the root of your project or repository:
This rulebook enforces a mandatory security rule that requires:
Automatic Mobb scanning and fixing after implementing any new features or making code changes
Local fix rule creation for every vulnerability type discovered by Mobb
Vulnerability prevention by building a library of security fix rules specific to your codebase
This security-first approach transforms your development workflow into a continuous security hardening process, where each vulnerability discovered becomes a permanent protection rule for future development.
Troubleshooting
Validate
nodeis available in the terminal by runningnode --versionCheck
.gemini/settings.jsonfor syntax or command errorsEnsure Gemini Code Assist extension is properly installed and configured
Verify that you're in agent mode when trying to use Mobb tools
After you make changes to the MCP settings, you may need to restart VS Code
For Gemini Code Assist specific issues, check the Google Cloud Code Assist Agent Mode Guide
Last updated
Was this helpful?