Set up Safety MCP in 30 seconds
Free, no account needed. Just copy, paste, and start generating secure code immediately.
NEW: Cursor One-Click Install
- Click the Add to Cursor button below.

Cursor Setup via Settings
- Select MCP from the left navigation.
- Click the Settings icon in the top right corner.
- Click the "Add new global MCP server" button.
- Add the following to the mcp.json file:
{
"mcpServers": {
"safety-mcp": {
"url": "https://mcp.safetycli.com/sse?api-key=[OPTIONAL_API_KEY]"
}
}
}
Copy- Go back to Settings and click Rules, then input the following into User Rules:
- Every time you import a Python package or add a package to a requirements.txt or pyproject.toml, use the safety-mcp to check if the version you have chosen is secure and is the latest version of the package. Make sure you always use the latest_secure_version (returned by safety-mcp) for any package.
- If a package already exists in a codebase, and a user asks you to check it for vulnerabilities, use the safety-mcp and evaluate whether there are any secure versions in the same major version and acknowledge these options. Additionally, inform the user of the latest secure version of the package.
CopyWindsurf Setup
Note: Safety MCP currently does not work with Claude 3.7 in Windsurf.
- Within Cascade (the prompt area on the right hand side), click the hammer icon, then on the right, click the "Configure" button, and "Configure" once more.
- In mcp_config.json, paste the following and save the file:
{
"mcpServers": {
"safety-mcp": {
"serverUrl": "https://mcp.safetycli.com/sse?api-key=[OPTIONAL_API_KEY]"
}
}
}
Copy- Click "Refresh" near the hammer icon.
- Click Windsurf Settings (icon top left of Cascade).
- In the search input type "Rules".
- Click Edit global rules, paste the following and save the file:
- Every time you import a Python package or add a package to a requirements.txt or pyproject.toml, use the safety-mcp to check if the version you have chosen is secure and is the latest version of the package. Make sure you always use the latest_secure_version (returned by safety-mcp) for any package.
- If a package already exists in a codebase, and a user asks you to check it for vulnerabilities, use the safety-mcp and evaluate whether there are any secure versions in the same major version and acknowledge these options. Additionally, inform the user of the latest secure version of the package.
CopyCopilot Setup
- Open VS Code settings (settings icon in bottom left corner) and click Settings.
- Search for "MCP".
- Click Edit in settings.json
- Paste the following and save the file:
{
"mcp": {
"servers": {
"safety-mcp": {
"url": "https://mcp.safetycli.com/sse?api-key=[OPTIONAL_API_KEY]",
"type": "sse"
}
}
}
}
Copy- To use Safety MCP with Copilot, switch to agent mode.
- To configure Copilot instructions follow the steps on this page and add the following instructions:
- Every time you import a Python package or add a package to a requirements.txt or pyproject.toml, use the safety-mcp to check if the version you have chosen is secure and is the latest version of the package. Make sure you always use the latest_secure_version (returned by safety-mcp) for any package.
- If a package already exists in a codebase, and a user asks you to check it for vulnerabilities, use the safety-mcp and evaluate whether there are any secure versions in the same major version and acknowledge these options. Additionally, inform the user of the latest secure version of the package.
CopyClaude Code Setup
In your terminal run the following:
claude mcp add --transport sse safety-mcp "https://mcp.safetycli.com/sse?api-key=[OPTIONAL_API_KEY]"
CopyClaude Setup
- Click the Claude menu from the top menu bar in Mac.
- Click Settings.
- Select the Developer tab.
- Click Edit Config.
- Open the
claude_desktop_config.json
file in an editor of your choice. - Add the following to your config:
{
"mcpServers": {
"safety-mcp": {
"command": "uvx",
"args": [
"mcp-proxy",
"https://mcp.safetycli.com/sse"
],
"env": {
"api-key": "Bearer [OPTIONAL_API_KEY]"
}
}
}
}
CopyDon't see your tool? Safety MCP works with any application that supports the Model Context Protocol.