How estevaosaleme/dependency-mcp-server works
Project Type and Purpose
• This is a backend microservice (“Dependency MCP Server”) implemented in Python.
• Purpose: Expose HTTP endpoints that, given a package identifier, query various public package registries asynchronously and return the latest stable version.
Key Components (derived from file tree & README)
• main.py
• Entrypoint: initializes the HTTP server (Flask/FastAPI or similar), registers routes from urls.py.
• urls.py
• Defines the HTTP routes/endpoints mapping to handler functions for each language.
• Handlers for each language (in main.py or imported modules)
• get_latest_python_version, get_latest_npm_version, etc.
• Invoke an async HTTP client to call external registries.
• requirements.txt
• Lists dependencies (e.g., httpx/requests-async, Flask/FastAPI, uvicorn).
• Dockerfile
• Containerizes the service.
• External Package Registries
• Maven Central, PyPI, npm Registry, crates.io, Packagist, RubyGems, pub.dev, Swift Index, Conan Center, NuGet, etc.
Client
• Could be CLI, browser, or IDE plugin (Cursor/Claude Desktop) via STDIO or HTTP.
HTTP Server
• Receives request → routes to appropriate handler.
Handler Layer
• For each language endpoint, handler constructs the registry API URL and parameters.
Async HTTP Client
• Issues non-blocking calls to external registries in parallel if needed.
External Registries
• Respond with metadata (JSON/XML), handler extracts latest stable version.
Response
• Server returns JSON payload with version to the client.
Architectural Patterns & Design Principles
• Microservice Pattern: Single responsibility, no internal DB, stateless.
• Async I/O: Improves throughput when querying multiple external APIs.
• Modularity: One handler per language → easy to extend.
• Containerization: Dockerfile ensures consistent environments.
Final Checklist
• External registries together but distinguish each.
• Docker boundary and note relevant config files.