Skip to content

Conversation

@cognitivegears
Copy link
Owner

Added support for MCP to Depgate

@cognitivegears cognitivegears assigned Copilot and unassigned Copilot Nov 5, 2025
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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.

@cognitivegears cognitivegears merged commit 7700f1e into main Nov 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants