dependency-health

dependency-health

An MCP server that performs comprehensive health checks on project dependencies for JavaScript and Python projects, detecting outdated packages and fetching changelogs.

Category
Visit Server

README

MCP Dependency Health Checker

A Model Context Protocol (MCP) server that performs comprehensive health checks on project dependencies for JavaScript and Python projects.

Features

  • šŸ” Automatic Ecosystem Detection: Detects whether your project is JavaScript or Python
  • šŸ“¦ Package Manager Support:
    • JavaScript: npm-compatible (package.json)
    • Python: pip (requirements.txt)
  • šŸ”„ Real-time Registry Queries: Fetches latest versions from npm and PyPI
  • āš ļø Outdated Dependency Detection: Compares current versions with latest releases
  • 🚨 Pre-release Detection: Identifies pre-release versions
  • šŸ“Š Detailed Status Reports: Provides comprehensive information about each dependency
  • šŸ¤– LLM-First Design: Clean, text-focused output designed for optimal LLM consumption
  • šŸš€ Automatic Changelog Fetching: Fetches actual release notes from GitHub releases so LLMs can analyze specific changes, bug fixes, and breaking changes without additional web requests
  • šŸ“ Always Actionable: Every dependency includes meaningful changelog content - either actual release notes or clear explanations when fetching fails

Installation

Prerequisites

  • Python 3.11 or higher
  • uv package manager

Setup

  1. Clone the repository:
git clone https://github.com/NY5184/mcp-dependency-health.git
cd mcp-dependency-health
  1. Install dependencies:
uv sync

Usage

Running the MCP Server

Start the server in development mode:

uv run mcp dev src/server.py

Using with MCP Clients

Configure your MCP client (like Claude Desktop) to connect to this server:

{
  "mcpServers": {
    "dependency-health": {
      "command": "uv",
      "args": ["run", "src/server.py"],
      "cwd": "/path/to/mcp-dependency-health"
    }
  }
}

Available Tools

dependency_health_check

Performs a comprehensive health check on project dependencies.

Input:

  • project_path (string): Path to the project directory
  • ecosystem (string, optional): "auto", "javascript", or "python" (defaults to "auto")

Output: Returns a list of dependencies with:

  • name: Package name
  • current: Currently specified version
  • latest: Latest version available in registry
  • status: "up-to-date", "outdated", or "unknown"
  • changelog_content: Always present - contains actual release notes when successfully fetched, or an explanatory message with source link if fetching failed
  • note: Additional information (optional)
  • release_date: When the latest version was released (optional)
  • description: Short package description (optional)

Example Input:

{
  "project_path": "/path/to/your/project",
  "ecosystem": "auto"
}

Example Output:

{
  "dependencies": [
    {
      "name": "react",
      "current": "^18.0.0",
      "latest": "18.2.0",
      "status": "outdated",
      "changelog_content": "Release v18.2.0:\n\n## Fixes\n- Fix memory leak in development mode\n- Fix Suspense bug with nested components\n- Improve TypeScript definitions\n\n## Features\n- Add useId hook\n- Suspense improvements",
      "release_date": "2022-06-14T16:55:41.036Z",
      "description": "React is a JavaScript library for building user interfaces."
    }
  ]
}

LLM-First Design: The output is designed for optimal LLM consumption:

  • āœ… No URL clutter - URLs are used internally but not exposed in the output
  • āœ… Always actionable - changelog_content always contains meaningful text
  • āœ… Self-contained - LLMs can provide specific upgrade advice without additional web requests
  • āœ… Clear fallbacks - When changelog fetching fails, the content explains what happened

Example changelog_content values:

  • Success: Actual release notes from GitHub
  • Fetch failed with source: "Changelog available at: https://github.com/user/repo/releases\n\nThe release notes exist but could not be automatically extracted. Visit the URL above for full details."
  • No source found: "Changelog could not be fetched automatically. No official changelog source was found."

With this structure, an LLM can immediately provide specific advice like:

  • "React 18.2.0 includes bug fixes for Suspense and fixes a memory leak in development mode. Safe to upgrade."
  • "This release was from June 2022, so it's well-tested and stable."

Project Structure

mcp-dependency-health/
ā”œā”€ā”€ main.py                      # Entry point (if needed)
ā”œā”€ā”€ pyproject.toml       # Project configuration and dependencies
ā”œā”€ā”€ uv.lock                     # Locked dependency versions
ā”œā”€ā”€ README.md                   # Project documentation
│
ā”œā”€ā”€ src/                        # Main source code
│   ā”œā”€ā”€ __init__.py
│   ā”œā”€ā”€ server.py              # MCP server implementation
│   └── services/              # Service layer
│       ā”œā”€ā”€ __init__.py
│       ā”œā”€ā”€ changelog_fetcher.py # Changelog content fetching
│       ā”œā”€ā”€ error_handlers.py  # Error handling utilities
│       └── registry_clients.py # npm/PyPI registry clients
│
ā”œā”€ā”€ schemas/                   # Data schemas
│   ā”œā”€ā”€ __init__.py
│   ā”œā”€ā”€ input.py              # Input validation schemas
│   └── output.py             # Output data schemas
│
ā”œā”€ā”€ utils/                    # Utility modules
│   ā”œā”€ā”€ __init__.py
│   ā”œā”€ā”€ file_finder.py       # Project file discovery
│   ā”œā”€ā”€ parsers.py           # Dependency file parsers
│   └── versions.py          # Version comparison utilities
│
└── tests/                   # Test suite
    ā”œā”€ā”€ test_file_finder.py
    ā”œā”€ā”€ test_parsers_js.py
    ā”œā”€ā”€ test_parsers_py.py
    ā”œā”€ā”€ test_registry_clients.py
    ā”œā”€ā”€ test_server_sanity.py
    └── test_versions.py

Development

Running Tests

uv run pytest

Code Structure

  • FastMCP Framework: Uses FastMCP for easy MCP server creation
  • Async Operations: Leverages httpx for efficient async HTTP requests
  • Type Safety: Full type hints with Pydantic models
  • Version Parsing: Uses packaging library for semantic version comparison

Dependencies

  • fastmcp or mcp>=1.25.0: MCP server framework
  • httpx>=0.28.1: Async HTTP client
  • pydantic>=2.12.5: Data validation
  • packaging>=25.0: Version parsing and comparison

How It Works

  1. File Discovery: Scans the project directory for package.json or requirements.txt
  2. Ecosystem Detection: Automatically determines if it's a JavaScript or Python project
  3. Dependency Parsing: Extracts package names and version specifications
  4. Registry Queries: Queries npm or PyPI for the latest versions and contextual information
  5. Changelog Fetching: Automatically fetches release notes from GitHub releases (when available)
  6. Version Comparison: Compares current versions with latest releases
  7. Status Report: Returns detailed information about each dependency with actual changelog content and links

Limitations

This tool has limited package manager support. It currently only supports:

Supported Package Managers

  • JavaScript: npm (via package.json)
  • Python: pip (via requirements.txt)

Unsupported Package Managers

The following package managers are not currently supported:

  • Python: Poetry (pyproject.toml), Pipenv (Pipfile), Conda (environment.yml)
  • Rust: Cargo (Cargo.toml)
  • Go: Go modules (go.mod)
  • Java: Maven (pom.xml), Gradle (build.gradle)
  • PHP: Composer (composer.json)
  • .NET: NuGet (.csproj, packages.config)
  • Ruby: Bundler (Gemfile)
  • Other: Any other package manager not listed above

When a project uses an unsupported package manager or no supported dependency file is found, the tool will return a dependency result with:

  • status: "unknown"
  • A clear note explaining that the project uses an unsupported dependency manager and listing the currently supported ones

Troubleshooting

"Failed to canonicalize script path"

If you encounter this error:

  1. Ensure you're in the project directory
  2. Recreate the virtual environment:
    uv sync
    
  3. Try running directly: uv run python src/server.py

Import Errors

If you see ModuleNotFoundError:

  • Ensure all dependencies are installed: uv sync
  • Check that you're using the correct virtual environment

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured