OSV.dev Security Analyzer MCP server

Integrates with OSV.dev to identify and analyze potential vulnerabilities in codebases, providing dependency checking and code security analysis with optional Semgrep-enhanced static analysis.
Back to servers
Provider
Gleicon Moraes
Release date
Apr 09, 2025
Language
Go
Stats
7 stars

The MCP Security Analyst server provides security analysis capabilities by integrating with OSV.dev and AI models to help identify and analyze potential vulnerabilities in your codebase. It works through the Model Context Protocol (MCP) to seamlessly integrate with various AI tools and provide security insights.

Requirements

Core Requirements

make deps
make install

Optional: Semgrep Installation

For enhanced static code analysis, you can install Semgrep:

macOS

brew install semgrep

Linux

python3 -m pip install semgrep

For other platforms, visit the Semgrep Installation Guide for detailed instructions.

Note that the MCP server will work without Semgrep installed, but will skip the static analysis portion when analyzing directories.

Installation

To install the MCP Security Analyst:

make deps
make install

After installation, the mcp-osv command will be available on your PATH and will use the stdin/stdout method for communication.

Available Tools

The server provides the following security analysis tools:

check_vulnerabilities

This tool checks for known vulnerabilities in dependencies using the OSV.dev database.

Parameters:

  • package_name: Name of the package to check
  • version: Version of the package to check

analyze_security

This tool analyzes code for potential security issues based on OSV.dev database.

Parameters:

  • file_path: Path to the file to analyze

Integration with AI Assistants

Setting Up with Cursor IDE

  1. See the mcp.json-template file for a configuration example that works with Cursor IDE.
  2. After setup, restart Cursor and try a query like "Analyze the security of my project using mcp-osv".
  3. For debugging in VSCode, go to Help -> Toggle developer tools and check the console for MCP-related logs.

Setting Up with Claude

To connect the MCP Security Analyst with Claude, edit the config file and add the following section:

{
    "mcpServers": {
        "mcp_osv": {
            "command": "/usr/local/bin/mcp-osv",
            "args": []
        }
    }
}

If you already have other tools installed, just add the mcp_osv section to your existing configuration.

Usage Examples

Here are some examples of how to use the MCP Security Analyst:

# Check for vulnerabilities in a package
"Check for vulnerabilities in the package 'express' version '4.17.1'"

# Analyze a specific file
"Analyze the security of the file 'main.go'"

The server will process these requests and provide security insights through your AI assistant using the MCP protocol.

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later