Commit Graph

1 Commits

Author SHA1 Message Date
Yaojia Wang
fda586907e feat(backend): Install and integrate Microsoft MCP SDK v0.4.0-preview.3 (Phase 1 PoC)
This commit implements Phase 1 of the MCP SDK migration plan:
installing the official Microsoft ModelContextProtocol SDK and
creating a Proof-of-Concept to validate SDK capabilities.

Changes:
- Installed ModelContextProtocol v0.4.0-preview.3 NuGet package
- Added SDK server configuration in Program.cs (parallel with custom MCP)
- Created SdkPocTools.cs with 3 attribute-based tools:
  * Ping() - Simple test tool
  * GetProjectInfo() - Tool with parameters
  * GetServerTime() - Tool with dependency injection
- Created SdkPocResources.cs with 2 attribute-based resources:
  * GetSdkStatus() - SDK integration status
  * GetHealthCheck() - Health check resource
- Enabled auto-discovery of Tools and Resources from assembly

SDK Key Findings:
-  Attribute-based registration works ([McpServerToolType], [McpServerTool])
-  [Description] attribute for tool/parameter descriptions
-  Dependency injection supported (ILogger<T> works)
-  Parameter marshalling works (Guid, bool, defaults)
-  Async Task<T> return types supported
- ⚠️ McpServerResource attribute ONLY works on methods, NOT properties
-  Compilation successful with .NET 9

Next Steps (Phase 2):
- Test SDK PoC at runtime (verify Tools/Resources are discoverable)
- Analyze SDK API for Resource URI patterns
- Compare SDK vs. custom implementation performance
- Create detailed migration plan

Related:
- Epic: docs/plans/sprint_5_story_0.md (MCP SDK Integration)
- Story: docs/plans/sprint_5_story_13.md (Phase 1 Foundation)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 22:32:42 +01:00