-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/mcp #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/mcp #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an experimental MCP (Model Context Protocol) server mode to DepGate, exposing dependency analysis tools via the official MCP Python SDK. The implementation adds a new mcp subcommand that exposes three tools: Lookup_Latest_Version, Scan_Project, and Scan_Dependency.
- Adds MCP server implementation with stdio transport support
- Implements JSON schema validation for MCP tool inputs/outputs using Draft-07 schemas
- Extends test mocks to handle Session.request() calls and additional metadata fields
- Updates documentation and package metadata for v0.6.0 release
Reviewed Changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli_mcp.py | Core MCP server implementation with three tool handlers and FastMCP integration |
| src/args.py | Adds MCP-specific CLI arguments for transport, networking, and runtime configuration |
| src/depgate.py | Integrates mcp action into main CLI entry point |
| src/mcp_validate.py | JSON schema validation helpers with soft fallback when jsonschema not installed |
| src/mcp_schemas.py | Draft-07 JSON schemas defining tool input/output contracts |
| src/depgate_mcp/*.py | Duplicate validation/schema modules in separate package namespace |
| tests/test_mcp_*.py | Integration and basic tests for MCP server functionality |
| tests/e2e_mocks/sitecustomize.py | Enhanced mocks for Session.request() and metadata fields |
| src/registry/npm/scan.py, src/registry/pypi/scan.py | Removes unused import statements |
| src/registry/pypi/client.py | Reorders import statement |
| src/repository/provider_validation.py | Reformats long conditional expressions for readability |
| src/cli_build.py | Removes unused variable in linked analysis |
| pyproject.toml, README.md, PKG-INFO | Updates version to 0.6.0, Python requirement to 3.10, adds MCP documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added support for MCP to Depgate