Skip to content

Add mcp integration primitives#52

Merged
HandyS11 merged 9 commits intodevelopfrom
012-mcp-integration-primitives
Mar 11, 2026
Merged

Add mcp integration primitives#52
HandyS11 merged 9 commits intodevelopfrom
012-mcp-integration-primitives

Conversation

@HandyS11
Copy link
Copy Markdown
Owner

This pull request introduces the contracts and quality checklist for the "MCP Integration Primitives" feature (012-mcp-integration-primitives), supporting the integration of ProjGraph with ModelContextProtocol (MCP) for advanced .NET solution analysis. The changes add detailed specifications for MCP resources, prompts, and roots, as well as implementation notes and requirements checklists. It also updates the .NET SDK version and disables a markdown lint rule for project documentation.

Key changes:

1. MCP Integration Primitives Contracts and Specification

  • Added a comprehensive requirements quality checklist for the MCP Integration Primitives feature, ensuring specification completeness, clarity, and readiness for planning.
  • Introduced the full MCP Resources contract, detailing static and dynamic resources, caching, notification behaviors, and implementation notes for ProjGraph's MCP server integration.
  • Added the MCP Prompts contract, specifying guided workflows for architecture review, dependency analysis, database schema review, and class structure review, along with their arguments, messages, and implementation details.
  • Documented the MCP Roots contract, defining client-declared workspace roots, path resolution rules, client-server interaction sequences, and implementation notes for root management.

2. Documentation and Configuration Updates

  • Updated .github/agents/copilot-instructions.md to reflect new active technologies and recent changes related to MCP integration primitives. [1] [2]
  • Disabled the MD041 markdown lint rule in .markdownlint.json to allow documents without a top-level heading.
  • Bumped the .NET SDK version in global.json from 10.0.101 to 10.0.103 for compatibility with new features.

- Updated README.md to include detailed setup instructions, capabilities, tools, and prompts for the ProjGraph MCP server.
- Introduced WorkspaceRootService to manage workspace root paths and resolve file paths against them.
- Added progress notifications for tools to provide feedback during execution.
- Enhanced existing tools to include new parameters for progress reporting.
- Created comprehensive tests for prompts, resources, and progress reporting to ensure functionality and reliability.
- Implemented caching for diagram resources with LRU eviction strategy.
- Added integration tests for various functionalities including prompts, resources, and workspace root resolution.
Copilot AI review requested due to automatic review settings March 11, 2026 12:00
Copy link
Copy Markdown
Contributor

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

Adds “MCP Integration Primitives” to ProjGraph.Mcp by extending the existing tools-only server with MCP Prompts, Resources, Roots-based path resolution, and progress notifications, plus accompanying specs and test coverage.

Changes:

  • Introduces MCP primitives implementation (ProjGraphPrompts, ProjGraphResources, DiagramResourceCache, WorkspaceRootService) and wires them into the MCP host.
  • Adds contract + integration tests covering prompts/resources/progress/roots behaviors.
  • Updates supporting docs/specs and bumps tooling/config (SDK version, markdownlint rule).

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
tests/ProjGraph.Tests.Integration.Mcp/McpRootsTests.cs Adds integration tests for root-based path resolution.
tests/ProjGraph.Tests.Integration.Mcp/McpResourcesTests.cs Adds integration tests for welcome/diagram resources and cache behavior.
tests/ProjGraph.Tests.Integration.Mcp/McpPromptsTests.cs Adds integration tests for prompt message content and structure.
tests/ProjGraph.Tests.Integration.Mcp/McpProgressTests.cs Adds integration tests for 3-stage progress notifications per tool.
tests/ProjGraph.Tests.Integration.Mcp/Helpers/McpTestHelper.cs Updates tool construction to include new MCP dependencies.
tests/ProjGraph.Tests.Contract/McpResourceContractTests.cs Contract tests for resource attributes and cache constants.
tests/ProjGraph.Tests.Contract/McpPromptContractTests.cs Contract tests for prompt attributes/signatures and content expectations.
tests/ProjGraph.Tests.Contract/McpProjectStatsContractTests.cs Updates tool signature expectations to include progress parameter.
tests/ProjGraph.Tests.Contract/McpProjectGraphContractTests.cs Updates tool signature expectations to include progress parameter.
tests/ProjGraph.Tests.Contract/McpErdContractTests.cs Updates tool signature expectations to include progress parameter.
src/ProjGraph.Mcp/WorkspaceRootService.cs Implements lazy roots capability detection + relative-path resolution.
src/ProjGraph.Mcp/README.md Documents MCP tools/prompts/resources/roots/progress usage.
src/ProjGraph.Mcp/ProjGraphTools.cs Adds progress reporting, resource caching, and root resolution to tools.
src/ProjGraph.Mcp/ProjGraphResources.cs Adds welcome + diagram resource read handler.
src/ProjGraph.Mcp/ProjGraphPrompts.cs Adds the 4 MCP prompt workflows.
src/ProjGraph.Mcp/Program.cs Wires prompts/resources into MCP server and registers new services.
src/ProjGraph.Mcp/DiagramResourceCache.cs Adds in-memory diagram/stat cache with eviction + notifications.
src/ProjGraph.Lib/ProjGraph.Lib.csproj Removes redundant EF Core package reference from aggregator project.
src/ProjGraph.Lib.ProjectGraph/ProjGraph.Lib.ProjectGraph.csproj Removes redundant DI package reference (now transitively available).
src/ProjGraph.Lib.EntityFramework/ProjGraph.Lib.EntityFramework.csproj Removes redundant DI package reference (now transitively available).
src/ProjGraph.Cli/ProjGraph.Cli.csproj Removes redundant DI package reference (now transitively available).
specs/012-mcp-integration-primitives/tasks.md Adds implementation task breakdown and checkpoints for the feature.
specs/012-mcp-integration-primitives/spec.md Adds the feature specification and acceptance scenarios.
specs/012-mcp-integration-primitives/research.md Adds SDK research notes and decisions for primitives implementation.
specs/012-mcp-integration-primitives/quickstart.md Adds usage examples for prompts/resources/roots/progress.
specs/012-mcp-integration-primitives/plan.md Adds implementation plan and architecture notes.
specs/012-mcp-integration-primitives/data-model.md Defines the in-memory entities used by the MCP primitives.
specs/012-mcp-integration-primitives/contracts/mcp-roots.md Defines expected MCP Roots behavior and interactions.
specs/012-mcp-integration-primitives/contracts/mcp-resources.md Defines resource URIs/templates and notification expectations.
specs/012-mcp-integration-primitives/contracts/mcp-prompts.md Defines prompt names/args and expected message sequences.
specs/012-mcp-integration-primitives/checklists/requirements.md Adds a specification quality checklist for the feature.
global.json Bumps .NET SDK version.
.markdownlint.json Disables MD041 to allow docs without top-level headings.
.github/agents/copilot-instructions.md Updates “active technologies”/recent changes documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/ProjGraph.Tests.Integration.Mcp/McpRootsTests.cs
Comment thread src/ProjGraph.Mcp/DiagramResourceCache.cs
Comment thread src/ProjGraph.Mcp/ProjGraphTools.cs Outdated
Comment thread src/ProjGraph.Mcp/WorkspaceRootService.cs
Comment thread src/ProjGraph.Mcp/ProjGraphTools.cs Outdated
Comment thread src/ProjGraph.Mcp/ProjGraphTools.cs Outdated
Comment thread tests/ProjGraph.Tests.Integration.Mcp/McpRootsTests.cs Outdated
Comment thread src/ProjGraph.Mcp/ProjGraphTools.cs Outdated
Comment thread tests/ProjGraph.Tests.Integration.Mcp/McpRootsTests.cs Outdated
Comment thread specs/012-mcp-integration-primitives/research.md
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@HandyS11 I've opened a new pull request, #53, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@HandyS11 I've opened a new pull request, #54, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@HandyS11 I've opened a new pull request, #55, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@HandyS11 I've opened a new pull request, #56, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@HandyS11 I've opened a new pull request, #57, to work on those changes. Once the pull request is ready, I'll request review from you.

@HandyS11 HandyS11 merged commit 71faaea into develop Mar 11, 2026
3 checks passed
@HandyS11 HandyS11 deleted the 012-mcp-integration-primitives branch March 11, 2026 13:21
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.

3 participants