Connect AI assistants to PyPI and OSV.dev to detect known vulnerabilities in Python packages, scan project dependencies, and identify safer upgrade candidates. Includes five MCP tools, Python source code, an interactive MCP Chat demo, and validation documentation.

Building AI applications often involves installing and maintaining numerous Python packages. Keeping track of dependency versions, security vulnerabilities, and available fixes can be time-consuming, especially as projects grow.
The Python Dependency Security MCP Server simplifies this process by connecting AI agents to the Python Package Index (PyPI) and the OSV vulnerability database through the Model Context Protocol (MCP).
Developers can use their AI assistants to inspect Python packages, scan dependency files, identify known vulnerabilities, and explore potentially safer package versions using natural-language requests.
The server is read-only, requires no API key, and is designed for integration into MCP-compatible AI development workflows.
Integrate dependency security intelligence into your AI development tools and workflows:
AI Coding Assistants: Check Python packages for known vulnerabilities while developing applications.
Dependency Review Agents: Analyze pinned dependencies from requirements.txt or pyproject.toml content.
Security Analysis Assistants: Retrieve vulnerability details, severity information, and available fixes.
Software Maintenance Agents: Identify potential upgrade candidates for vulnerable dependencies.
AI Development Workflows: Add dependency security checks to custom AI agents and developer tools.
The MCP server provides a reusable integration layer, allowing developers to access package and vulnerability information without implementing the underlying PyPI and OSV API connections themselves.
The server exposes five tools that AI agents can call automatically.
MCP Tool | Function |
|---|---|
| Retrieve Python package metadata, versions, dependencies, and release information from PyPI |
| Check a specific Python package version for known security vulnerabilities |
| Scan dependency declarations from |
| Retrieve detailed information about an OSV, GHSA, CVE, or PYSEC advisory |
| Find the smallest non-yanked upgrade candidate with no known OSV vulnerabilities |
"Does FastAPI version 0.95.0 have any known security vulnerabilities?"
"Scan these Python dependencies and identify packages with reported vulnerabilities."
"What are the details of this CVE and which package versions are affected?"
"Suggest an upgrade version for this vulnerable package."
"Show me the latest PyPI package information for LangChain."
The AI assistant selects the appropriate MCP tools, retrieves the relevant package and vulnerability data, and explains the findings.
You don't need to integrate the MCP server into an existing AI application to explore its capabilities.
The downloadable package also includes MCP Chat, a local web application that allows you to interact with the server through natural-language conversations.
With MCP Chat, you can:
Connect to an AI model through OpenRouter.
Ask questions about Python packages and security vulnerabilities.
Submit dependency declarations for vulnerability analysis.
Observe how the AI model selects and calls MCP tools.
Inspect tool arguments and returned results.
Experiment with different security checks before integrating the MCP server into your own application.
MCP Chat requires an OpenRouter API key and internet access. The MCP server itself does not require an API key but needs internet access to query PyPI and OSV.dev.
1. Download and extract the ZIP file
Download the asset from Alinme and extract it to your computer.
2. Install the dependencies
Make sure Python 3.11+ and uv are installed.
Open a terminal in the extracted MCP server directory:
uv sync3. Start the MCP server
uv run pydeps-security-mcpThe server communicates through MCP's standard input/output (stdio) transport and can be connected to compatible AI clients.
4. Run the included MCP Chat demo
Open another terminal inside the mcp-chat directory:
uv sync
uv run python app.pyOpen the following address in your browser:
http://127.0.0.1:8765
Configure your OpenRouter model and API key in the chat settings, and select the Python Dependency Security MCP server if necessary.
You can now explore the tools through natural-language conversations.
5. Integrate it into your own AI application
You can connect the server to MCP-compatible clients such as Claude Desktop, Claude Code, or your own AI application.
For example, configure Claude Desktop using:
{
"mcpServers": {
"pydeps-security": {
"command": "uv",
"args": [
"run",
"--quiet",
"--directory",
"/absolute/path/to/pydeps-security-mcp",
"pydeps-security-mcp"
]
}
}
}Replace the example path with the directory where you extracted the asset.
The downloadable ZIP package includes:
Complete Python source code for the Dependency Security MCP server.
Five read-only MCP tools for package inspection, vulnerability detection, dependency scanning, and upgrade recommendations.
MCP Chat application for testing and interacting with the tools using an AI model.
Automated tests for verifying MCP functionality.
API research and validation documentation covering PyPI and OSV endpoints, test results, integration behavior, and known limitations.
Setup instructions and configuration files for local development and MCP integration.
MIT-licensed MCP implementation, allowing modification and reuse under the license terms.
Feature | Details |
|---|---|
Protocol | Model Context Protocol (MCP) |
Programming language | Python 3.11+ |
Transport | stdio |
Data sources | PyPI and OSV.dev |
Dependency formats | requirements.txt and pyproject.toml content |
Vulnerability identifiers | OSV, GHSA, CVE, PYSEC |
Authentication | No API key required for MCP server |
Network | Internet required |
Operations | Read-only |
License | MIT for the MCP implementation |
This MCP server retrieves publicly reported vulnerabilities from OSV.dev and package metadata from PyPI.
Please consider the following limitations:
Only explicitly pinned name==version dependencies are checked for vulnerabilities. Unpinned dependencies are reported as not checked.
Transitive dependencies are not resolved.
Dependency text is parsed but never executed, with a maximum of 500 lines or 100 KB.
Vulnerability results depend on the information available in OSV.dev at the time of the query.
A package with no reported vulnerabilities is not necessarily secure.
Suggested upgrade versions are candidates, not guarantees of compatibility or complete security.
CVSS v3.x severity vectors can be scored; CVSS v4 vectors are returned without a calculated score.
External API availability and network connectivity can affect results.
This tool supports dependency security reviews but does not replace comprehensive software composition analysis, dependency resolution, or professional security assessment.
The implementation is unofficial and is not affiliated with or endorsed by PyPI, the Python Software Foundation, or Google.
After exploring the tools using the included MCP Chat demo, developers can integrate the server into their own AI coding assistants and development workflows.
Possible next steps include:
Adding dependency vulnerability checks to custom coding agents.
Building AI-assisted dependency maintenance workflows.
Integrating security analysis into existing AI development tools.
Extending the server to support transitive dependency resolution.
Combining dependency scanning with other security tools for broader application security analysis.
The included source code, automated tests, and validation documentation provide a foundation for further development.