Libraries.io MCP Server
Provides tools for searching and analyzing open source packages, versions, dependencies, dependents, security issues, licenses, ecosystem statistics, and project dependency audits via the Libraries.io API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Libraries.io MCP Server
A comprehensive Model Context Protocol (MCP) server that provides AI assistants with seamless access to Libraries.io's vast database of 9.96M+ open source packages across 33+ package managers including NPM, PyPI, Maven, Go, NuGet, and more.
π Overview
The Libraries.io MCP Server transforms how AI assistants interact with open source ecosystems by providing:
Package Discovery: Search, filter, and discover packages across multiple platforms
Deep Analysis: Comprehensive dependency analysis, security checks, and license compatibility
Ecosystem Insights: Platform statistics, trending packages, and alternative recommendations
Project Management: Dependency auditing, update tracking, and comprehensive reporting
Real-time Data: Access to current package information, versions, and dependencies
Related MCP server: package-intel-mcp
β¨ Features
π Package Discovery & Search
Search packages by keywords, languages, licenses, and platforms
Discover trending and popular packages
Filter results by specific criteria
Compare multiple packages side-by-side
π Package Analysis
Detailed package information and metadata
Complete version history and release tracking
Dependency tree analysis with configurable depth
Security vulnerability assessments
License compatibility checking
π Ecosystem Analysis
Platform-specific statistics and insights
Alternative package recommendations
Dependency impact analysis
Package ecosystem health scoring
π οΈ Project Management
Comprehensive dependency auditing
Update monitoring and tracking
Security-focused dependency reports
Project health scoring and recommendations
π Installation
Prerequisites
Python 3.8 or higher
A Libraries.io API key (Get your API key here)
An MCP-compatible client (Claude Desktop, etc.)
Quick Installation
# Clone the repository
git clone https://github.com/librariesio/libraries-io-mcp-server.git
cd libraries-io-mcp-server
# Install dependencies
pip install -r requirements.txt
# Or using uv (recommended)
uv syncDevelopment Installation
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
isort src/
# Lint code
flake8 src/βοΈ Configuration
Environment Setup
Copy the example environment file:
cp .env.example .envEdit the
.envfile with your configuration:
# Required: Your Libraries.io API key
LIBRARIES_IO_API_KEY=your_api_key_here
# Optional: Base URL for the Libraries.io API (default: https://libraries.io/api)
LIBRARIES_IO_BASE_URL=https://libraries.io/api
# Optional: Rate limiting configuration
RATE_LIMIT_REQUESTS=60
RATE_LIMIT_WINDOW=60
# Optional: Logging level
LOG_LEVEL=INFOAPI Key Setup
Visit Libraries.io API
Sign up for an account if you don't have one
Generate an API key
Add it to your environment variables or
.envfile
π Usage
With Claude Desktop
Configure Claude Desktop with the provided configuration files:
claude-desktop-config.jsonfor basic setupclaude-desktop-config-advanced.jsonfor advanced configuration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"libraries-io": {
"command": "uv",
"args": [
"run",
"fastmcp",
"run",
"src/libraries_io_mcp/server.py"
],
"env": {
"LIBRARIES_IO_API_KEY": "your_api_key_here"
}
}
}
}With Docker
# Build and run with Docker Compose
docker-compose up --build
# Or run directly with Docker
docker run -d \
--name libraries-io-mcp-server \
-p 8000:8000 \
-e LIBRARIES_IO_API_KEY=your_api_key_here \
libraries-io-mcp-serverDirect Server Usage
# Start the server
python -m src.libraries_io_mcp.server
# Or using uv
uv run fastmcp run src/libraries_io_mcp/server.pyπ οΈ Available Tools
Package Discovery
search_packages- Search packages by keyword, language, or licenseget_trending_packages- Get trending packages by platformget_popular_packages- Get most popular packages
Package Analysis
get_package_info- Get detailed package informationget_package_versions- List all versions of a packageget_package_dependencies- Get package dependenciesget_package_dependents- Get packages that depend on this onecompare_packages- Compare multiple packagescheck_package_security- Check for security issues
Ecosystem Analysis
analyze_dependency_tree- Deep dependency analysisfind_alternatives- Find alternative packagesget_platform_stats- Get statistics for a package managercheck_license_compatibility- Check license compatibility
Project Management
track_package_updates- Monitor package for updatesgenerate_dependency_report- Generate comprehensive dependency reportaudit_project_dependencies- Audit all dependencies in a project
π Documentation
Core Documentation
API Reference - Complete API documentation for all tools and resources
Deployment Guide - Multiple deployment options and configurations
Development Guide - Contributing guidelines and development setup
Integration Guides
Claude Desktop Integration - Step-by-step Claude Desktop setup
Docker Deployment - Container deployment and scaling
Examples - Usage examples and sample workflows
Additional Resources
Architecture Overview - System architecture and design patterns
Testing Guide - Testing procedures and best practices
Security Guidelines - Security best practices and reporting
Changelog - Version history and updates
π§ Development
Project Structure
libraries-io-mcp-server/
βββ src/
β βββ libraries_io_mcp/
β βββ __init__.py
β βββ server.py # Main FastMCP server
β βββ client.py # Libraries.io API client
β βββ models.py # Pydantic data models
β βββ tools.py # MCP tools implementation
β βββ resources.py # MCP resources implementation
β βββ prompts.py # MCP prompts implementation
β βββ utils.py # Utility functions
βββ tests/
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ fixtures/ # Test fixtures
βββ docs/ # Documentation
βββ examples/ # Usage examples
βββ .env.example # Environment template
βββ pyproject.toml # Project configuration
βββ requirements.txt # DependenciesSetting Up Development Environment
# Clone the repository
git clone https://github.com/librariesio/libraries-io-mcp-server.git
cd libraries-io-mcp-server
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Set up environment variables
cp .env.example .env
# Edit .env with your API key
# Run tests
pytest
# Run with coverage
pytest --cov=src/libraries_io_mcp
# Format code
black src/
isort src/
# Lint code
flake8 src/
mypy src/Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=src/libraries_io_mcp --cov-report=html
# Run specific test categories
pytest tests/unit/
pytest tests/integration/
# Run tests in parallel
pytest -n autoποΈ Architecture
The Libraries.io MCP Server is built with a modular architecture:
FastMCP Server: Core MCP protocol implementation
Libraries.io Client: HTTP client with caching and rate limiting
Tools: MCP tools for package discovery and analysis
Resources: MCP resources for contextual data access
Prompts: AI interaction templates and workflows
Models: Pydantic data models for validation and serialization
π Performance & Scaling
Built-in Optimizations
Intelligent Caching: Reduces API calls and improves response times
Rate Limiting: Respects Libraries.io API limits and prevents abuse
Async Operations: Concurrent request processing for better performance
Request Deduplication: Eliminates duplicate API calls
Scaling Strategies
Horizontal Scaling: Multiple server instances behind a load balancer
Caching Layer: Redis integration for distributed caching
Load Balancing: Nginx or cloud load balancers
Container Orchestration: Kubernetes for automated scaling
π Security
Security Features
API Key Management: Secure storage and rotation
Input Validation: Comprehensive parameter validation
Rate Limiting: Prevents abuse and ensures fair usage
Error Handling: Graceful degradation and secure error messages
Security Best Practices
Never commit API keys to version control
Use environment variables for sensitive information
Implement proper access controls
Regular security audits and updates
See Security Guidelines for detailed security information.
π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for:
Development setup and workflow
Code style and quality standards
Testing procedures
Pull request process
Issue reporting
Quick Contribution Steps
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes and add tests
Run the test suite:
pytestFormat your code:
black src/ && isort src/Commit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
π Monitoring & Observability
Logging
Structured logging with correlation IDs
Configurable log levels (DEBUG, INFO, WARNING, ERROR)
Request/response logging for debugging
Metrics
API usage statistics
Response time monitoring
Cache hit rates
Error rate tracking
Health Checks
API connectivity monitoring
Cache health checks
Memory usage tracking
Service availability monitoring
π Troubleshooting
Common Issues
API Key Issues
Verify your API key is valid and has sufficient permissions
Check that the environment variable is set correctly
Ensure you haven't exceeded rate limits
Connection Problems
Check network connectivity to Libraries.io API
Verify firewall settings
Check proxy configurations if applicable
Performance Issues
Monitor API usage and rate limits
Check cache hit rates
Review server logs for errors
Getting Help
Check the troubleshooting section
Review GitHub Issues
Create a new issue with detailed information
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Libraries.io for providing the comprehensive open source package database
FastMCP for the excellent MCP framework
Pydantic for data validation and serialization
httpx for async HTTP client functionality
π Support
For support and questions:
π Issues: GitHub Issues
π¬ Discussions: GitHub Discussions
π Documentation: Full Documentation
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, dependβ¦
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve detailed package information from multiple package registries (NPM, crates.io, NuGet, PyPI, Go).MIT
- AlicenseAqualityBmaintenanceProvides software supply-chain intelligence for AI agents, enabling them to query package metadata, versions, downloads, dependencies, and health signals for npm, PyPI, and crates.io packages without API keys.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables safety-ranked discovery of open-source components across npm, PyPI, crates.io, RubyGems, GitHub, and Hugging Face, with license, security, and health checks.1,348 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to retrieve maintainer-written release notes and compare installed versus target dependency versions, search packages, and report on projects pushed to a dashboard.MIT