Skip to content

Latest commit

 

History

History
143 lines (116 loc) · 5.23 KB

File metadata and controls

143 lines (116 loc) · 5.23 KB

PR #001: Fix MCP Server Infrastructure

Summary

This PR fixes critical infrastructure issues preventing the DotNetDevMCP server from building and running as a proper MCP (Model Context Protocol) server.

Changes Made

1. Fixed Server Project References

Files Changed:

  • src/DotNetDevMCP.Server.Sse/SharpTools.SseServer.csprojDotNetDevMCP.Server.Sse.csproj
  • src/DotNetDevMCP.Server.Stdio/SharpTools.StdioServer.csprojDotNetDevMCP.Server.Stdio.csproj

Changes:

  • Updated project references from non-existent SharpTools.Tools to DotNetDevMCP.CodeIntelligence
  • Renamed assemblies to follow DotNetDevMCP.* naming convention
  • Updated root namespaces to match project structure

2. Added Server Projects to Solution

File Changed: DotNetDevMCP.sln

Changes:

  • Added DotNetDevMCP.Server.Sse project to solution file
  • Added DotNetDevMCP.Server.Stdio project to solution file
  • Configured build configurations for both projects
  • Nested projects under src folder in solution explorer

3. Fixed Namespace Consistency

Files Changed: All 41 .cs files in src/DotNetDevMCP.CodeIntelligence/

Changes:

  • Renamed all namespaces from SharpTools.Tools.* to DotNetDevMCP.CodeIntelligence.*
  • Updated all using statements accordingly
  • Renamed extension methods:
    • WithSharpToolsServicesWithCodeIntelligenceServices
    • WithSharpToolsWithCodeIntelligence

4. Updated Server Entry Points

Files Changed:

  • src/DotNetDevMCP.Server.Sse/Program.cs
  • src/DotNetDevMCP.Server.Stdio/Program.cs

Changes:

  • Updated all using statements to use DotNetDevMCP.CodeIntelligence.* namespaces
  • Changed application names:
    • SSE Server: SharpToolsMcpSseServerDotNetDevMCP.SseServer
    • Stdio Server: SharpToolsMcpStdioServerDotNetDevMCP.StdioServer
  • Updated command descriptions to reference "DotNetDevMCP" instead of "SharpTools"

5. Fixed Service Registration Extension

File Changed: src/DotNetDevMCP.CodeIntelligence/Extensions/ServiceCollectionExtensions.cs

Changes:

  • Updated XML documentation to reference "CodeIntelligence" instead of "SharpTools"
  • Changed assembly loading from Assembly.Load("SharpTools.Tools") to typeof(AnalysisTools).Assembly
  • This ensures proper type-safe assembly reference

Impact

Before This PR:

  • ❌ SSE and Stdio server projects could not build (referenced non-existent project)
  • ❌ Server projects not included in solution file
  • ❌ Namespace inconsistencies throughout codebase
  • ❌ MCP tools could not be discovered or registered

After This PR:

  • ✅ Both server projects build successfully
  • ✅ Servers properly integrated into solution
  • ✅ Consistent naming throughout codebase
  • ✅ MCP tools can be discovered and registered via WithCodeIntelligence() extension

Testing Performed

Build Verification

dotnet build src/DotNetDevMCP.Server.Sse/DotNetDevMCP.Server.Sse.csproj
dotnet build src/DotNetDevMCP.Server.Stdio/DotNetDevMCP.Server.Stdio.csproj
dotnet build DotNetDevMCP.sln

Namespace Verification

# Verify no SharpTools namespaces remain in CodeIntelligence
grep -r "namespace SharpTools" src/DotNetDevMCP.CodeIntelligence/
# Should return no results

# Verify new namespaces are present
grep -r "namespace DotNetDevMCP.CodeIntelligence" src/DotNetDevMCP.CodeIntelligence/
# Should return 41 matches

Breaking Changes

For Existing Code:

If you have any external code referencing the old namespaces, you'll need to update:

Old:

using SharpTools.Tools.Services;
using SharpTools.Tools.Interfaces;
using SharpTools.Tools.Mcp.Tools;
services.WithSharpToolsServices();
builder.WithSharpTools();

New:

using DotNetDevMCP.CodeIntelligence.Services;
using DotNetDevMCP.CodeIntelligence.Interfaces;
using DotNetDevMCP.CodeIntelligence.Mcp.Tools;
services.WithCodeIntelligenceServices();
builder.WithCodeIntelligence();

Related Issues

  • Fixes critical infrastructure blocking MCP server functionality
  • Prerequisite for implementing remaining MCP tool wrappers (Testing, Build, Orchestration, SourceControl)

Next Steps

  1. Create MCP tool wrappers for Testing service
  2. Create MCP tool wrappers for Build service
  3. Create MCP tool wrappers for Orchestration service
  4. Create MCP tool wrappers for SourceControl service
  5. Update documentation with accurate feature completion status
  6. Add integration tests for MCP endpoints

Files Modified

  • src/DotNetDevMCP.Server.Sse/DotNetDevMCP.Server.Sse.csproj (renamed from SharpTools.SseServer.csproj)
  • src/DotNetDevMCP.Server.Sse/Program.cs
  • src/DotNetDevMCP.Server.Stdio/DotNetDevMCP.Server.Stdio.csproj (renamed from SharpTools.StdioServer.csproj)
  • src/DotNetDevMCP.Server.Stdio/Program.cs
  • src/DotNetDevMCP.CodeIntelligence/**/*.cs (41 files - namespace updates)
  • DotNetDevMCP.sln

Checklist

  • Server projects reference correct dependencies
  • Server projects added to solution file
  • All namespaces updated to DotNetDevMCP.* convention
  • Extension methods renamed for consistency
  • Program.cs files updated with new namespaces
  • Build verification (requires .NET SDK)
  • Runtime testing of MCP endpoints
  • Update CHANGELOG.md
  • Update README.md with accurate status