Skip to content

Commit af04fea

Browse files
authored
Merge pull request #994 from SciSharp/upgrademcp
feat:upgrade modelcontextprotocol 0.1.0-preview.5
2 parents 11d315d + 3ea5b3a commit af04fea

File tree

13 files changed

+15
-422
lines changed

13 files changed

+15
-422
lines changed

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
<PackageVersion Include="MSTest.TestFramework" Version="3.1.1" />
112112
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
113113
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
114-
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.2" />
114+
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.5" />
115+
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="0.1.0-preview.5" />
115116
</ItemGroup>
116117
<ItemGroup>
117118
<PackageVersion Include="BotSharp.Core" Version="$(BotSharpVersion)" />

src/Infrastructure/BotSharp.Abstraction/MCP/Models/McpServerConfigModel.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ public class McpServerConfigModel
2424
/// </summary>
2525
public string? Location { get; set; }
2626

27-
/// <summary>
28-
/// Arguments (if any) to pass to the executable.
29-
/// </summary>
30-
public string[]? Arguments { get; set; }
31-
3227
/// <summary>
3328
/// Additional transport-specific configuration.
3429
/// </summary>

src/Infrastructure/BotSharp.Core.MCP/BotSharpMCPExtensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using BotSharp.Core.MCP.Functions;
2-
using BotSharp.Core.MCP.Settings;
32
using BotSharp.Core.MCP.Hooks;
3+
using BotSharp.Core.MCP.Managers;
4+
using BotSharp.Core.MCP.Services;
5+
using BotSharp.Core.MCP.Settings;
46
using Microsoft.Extensions.Configuration;
5-
using ModelContextProtocol.Configuration;
7+
using ModelContextProtocol;
68
using ModelContextProtocol.Client;
7-
using BotSharp.Core.MCP.Managers;
89

910
namespace BotSharp.Core.MCP;
1011

@@ -18,6 +19,7 @@ public static class BotSharpMcpExtensions
1819
/// <returns></returns>
1920
public static IServiceCollection AddBotSharpMCP(this IServiceCollection services, IConfiguration config)
2021
{
22+
services.AddScoped<IMcpService, McpService>();
2123
var settings = config.GetSection("MCP").Get<McpSettings>();
2224
services.AddScoped(provider => { return settings; });
2325

src/Infrastructure/BotSharp.Core.MCP/McpPlugin.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/Infrastructure/BotSharp.Core.MCP/Services/McpService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public IEnumerable<McpServerConfigModel> GetServerConfigs()
2626
Name = x.Name,
2727
TransportType = x.TransportType,
2828
TransportOptions = x.TransportOptions,
29-
Arguments = x.Arguments,
3029
Location = x.Location
3130
});
3231
}

src/Infrastructure/BotSharp.Core.MCP/Settings/MCPSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using ModelContextProtocol.Client;
2-
using ModelContextProtocol.Configuration;
2+
using ModelContextProtocol;
33

44
namespace BotSharp.Core.MCP.Settings;
55

tests/BotSharp.PizzaBot.MCPServer/BotSharp.PizzaBot.MCPServer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<PackageReference Include="Microsoft.Extensions.Hosting" />
1111
<PackageReference Include="Microsoft.Extensions.Logging" />
1212
<PackageReference Include="ModelContextProtocol" />
13+
<PackageReference Include="ModelContextProtocol.AspNetCore" />
1314
<PackageReference Include="Serilog.Extensions.Logging" />
1415
<PackageReference Include="Serilog.Sinks.File" />
1516
</ItemGroup>

tests/BotSharp.PizzaBot.MCPServer/McpEndpointRouteBuilderExtensions.cs

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)