Cursor
This guide describes how to configure Mobb Vibe Shield (MVS) as an MCP (Model Context Protocol) server in Cursor.
Prerequisites
Before setting up MVS, ensure the following:
Cursor is installed and up to date.
Node.js v18.20 or later is installed. (Check with
node --version)
Setup Instructions
Create the MCP Configuration File
In your project root, create a file at
.vscode/mcp.json(Cursor supports this path):{ "servers": { "mobb-mcp": { "type": "stdio", "command": "npx", "args": ["--yes", "mobbdev@latest", "mcp"], "env": { } } } }For single-tenant users, add the variables
API_URLandWEB_APP_URLin theenvsection. You can also specify which modes are enabled usingTOOLS_ENABLED:{ "servers": { "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"] } } } }Start the MCP Server
Cursor will automatically detect the
mcp.jsonfile and start the server. You should see logs indicating the server is running and tools are available.Using the Modes
To scan and fix vulnerabilities, use the
scan_and_fix_vulnerabilitiestool.Example prompt:
Scan and fix vulnerabilities in my project using Mobb MCP.
To fetch available fixes, use the
fetch_available_fixestool.Example prompt:
Check for available fixes using the Mobb MCP.
To trigger the background scan for new fixes, use the
check_for_new_available_fixestool. The first call starts the scan, and MVS will continue to check every 15 minutes.Example prompt:
Check for new available fixes using the Mobb MCP.
Deploying a Rulebook for Automated Security Scanning and Fixing
To ensure comprehensive security coverage in your development workflow, we recommend the deployment of a security-focused rulebook that mandates Mobb vulnerability scanning and fixing after every code change. In the attached rulebook .security.mdc, the following rules are specified:
Automatic Mobb scanning and fixing after implementing any new features or making code changes
Security fix rule creation for every vulnerability type discovered by Mobb
Vulnerability prevention by building a library of security fix rules specific to your codebase
Deployment Instructions:
Download the rulebook: Save the
security.mdcfile to your project's.cursor/rules/directoryEnable always-apply mode: The rulebook is configured with
alwaysApply: trueto ensure it's enforced on every interactionVerify enforcement: The rulebook includes a critical checklist that prevents task completion without proper security scanning
For more details about Cursor Rules, see the Cursor Rules documentation.
Troubleshooting
Ensure Node.js is available in your system PATH.
Check the MCP server logs in Cursor for errors.
Validate your
mcp.jsonsyntax and paths.Restart Cursor if the MCP server fails to launch after edits.
For more information, refer to the VS Code guide for similar setup steps and troubleshooting tips.
Last updated
Was this helpful?