dependency-health-mcp
Monitors and analyzes dependency health in Node.js projects, providing tools to check outdated packages, vulnerabilities, licenses, and suggest safe upgrades.
README
Dependency Health Monitor MCP Server
A Model Context Protocol (MCP) server that monitors and analyzes dependency health across your Node.js projects. This server provides intelligent tools to check for outdated packages, security vulnerabilities, license compliance, and suggests safe upgrade paths.
Important: Each MCP server instance is configured to monitor a specific project. The project path is specified when starting the server, and all tools operate only on that configured project for security and clarity.
Features
- 🔍 Check Outdated Packages - Find packages with newer versions available
- 🛡️ Security Audit - Identify vulnerabilities in your dependencies
- 📊 Dependency Analysis - Get statistics about your dependency tree
- ⚖️ License Compliance - Check for restrictive licenses that may require attention
- 💡 Smart Update Suggestions - Get prioritized recommendations for safe updates
- 🔄 Automated Upgrades - Safely upgrade dependencies with fine-grained control
Prerequisites
- Node.js >= 18.0.0
- npm, yarn, or pnpm package manager
- A project with package.json
Installation
Option 1: Local Development/Testing
Clone this repository and install dependencies:
git clone https://github.com/pramodyadav/dependency-health-mcp.git
cd dependency-health-mcp
npm install
Option 2: Install from npm
Since this library is already published to npm, you can install globally:
npm install -g @pramodyadav027/dependency-health-mcp
Configuration
Each MCP server instance monitors one specific project. You specify the project path when configuring the server.
For Local Development (Claude Desktop)
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"dependency-health-myproject": {
"command": "node",
"args": [
"/absolute/path/to/dependency-health-mcp/index.js",
"/path/to/your/project"
]
}
}
}
To monitor multiple projects, add separate server entries:
{
"mcpServers": {
"dependency-health-project1": {
"command": "node",
"args": [
"/absolute/path/to/dependency-health-mcp/index.js",
"/path/to/project1"
]
},
"dependency-health-project2": {
"command": "node",
"args": [
"/absolute/path/to/dependency-health-mcp/index.js",
"/path/to/project2"
]
}
}
}
For npm Package (After Publishing)
{
"mcpServers": {
"dependency-health": {
"command": "npx",
"args": [
"@pramodyadav027/dependency-health-mcp",
"/path/to/your/project"
]
}
}
}
Or if installed globally:
{
"mcpServers": {
"dependency-health": {
"command": "dependency-health-mcp",
"args": [
"/path/to/your/project"
]
}
}
}
Available Tools
All tools operate on the project configured when the server was started.
1. check_outdated_packages
Check for outdated packages and get version comparison.
Parameters:
packageManager(optional): npm, yarn, or pnpm (default: npm)
2. check_vulnerabilities
Scan for security vulnerabilities using npm/yarn/pnpm audit.
Parameters:
packageManager(optional): npm, yarn, or pnpm (default: npm)
3. analyze_dependencies
Get detailed statistics about your dependency tree.
Parameters: None
4. check_license_compliance
Identify packages with restrictive licenses (GPL, AGPL, etc.).
Parameters: None
5. suggest_updates
Get prioritized update recommendations based on semantic versioning.
Parameters: None
6. upgrade_dependencies
Automatically upgrade dependencies with fine-grained control.
Parameters:
packageManager(optional): npm, yarn, or pnpm (default: npm)packages(optional): Array of specific packages to upgradeupdateType(optional): patch, minor, major, or latest (default: latest)
Usage Examples
Once configured with an MCP client (like Claude Desktop or VS Code Copilot), you can ask:
- "Check for outdated packages in this project"
- "Are there any security vulnerabilities?"
- "Analyze my project dependencies"
- "Check license compliance"
- "Suggest safe updates for my dependencies"
- "Upgrade all patch versions"
- "Upgrade only the react package"
The tools will automatically operate on the project you configured for this server instance.
Development
Architecture
The codebase is organized into modular components for better maintainability:
- index.js - Clean entry point (10 lines)
- server.js - Server orchestration and MCP protocol handling
- tools/ - Individual tool implementations (~80 lines each)
- utils/ - Shared utilities for validation and package manager abstraction
This modular structure makes it easy to:
- Add new tools
- Test individual components
- Understand the codebase
- Maintain and update existing functionality
Running Locally
# Start the server for a specific project
node index.js /path/to/your/project
# Or use npm scripts (operates on current directory)
npm start
# Development mode with auto-reload
npm run dev
Testing
You can test the server by configuring it in Claude Desktop or VS Code and asking questions about the configured Node.js project.
Publishing to npm (For Maintainers)
# Build/test first
npm install
npm start # Verify it works
# Login to npm
npm login
# Publish
npm publish --access public
Project Structure
dependency-health-mcp/
├── index.js # Entry point
├── server.js # MCP server orchestration
├── cli.js # CLI entry point (for bin)
├── tools/ # Tool implementations
│ ├── outdated.js # Check outdated packages
│ ├── vulnerabilities.js # Security audit
│ ├── analyze.js # Dependency analysis
│ ├── licenses.js # License compliance
│ ├── suggest.js # Update suggestions
│ └── upgrade.js # Automated upgrades
├── utils/ # Shared utilities
│ ├── validation.js # Input validation
│ └── package-manager.js # Package manager abstraction
├── package.json # Package configuration
├── README.md # This file
├── CHANGELOG.md # Version history
├── QUICKSTART.md # Quick start guide
├── LICENSE # MIT License
├── example-config.json # Configuration examples
├── .gitignore # Git ignore rules
└── .npmignore # npm ignore rules
Security
This server only operates on the specific project path configured at startup. Tools cannot access or modify files outside the configured project directory. For enhanced security:
- Use absolute paths in your MCP configuration
- Create separate server instances for each project you want to monitor
- Review the configured project path before running any upgrade operations
License
MIT
Author
Pramod Kumar Yadav
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues, questions, or contributions, please visit the GitHub repository.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。