Rename project and namespaces
This commit is contained in:
parent
e7fa6194f6
commit
c9ed453745
16 changed files with 426 additions and 918 deletions
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\mcpdotnet\mcpdotnet.csproj" />
|
||||
<ProjectReference Include="..\..\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using McpDotNet.Protocol.Messages;
|
||||
using McpDotNet.Server;
|
||||
using McpDotNet.Utils.Json;
|
||||
using ModelContextProtocol.Protocol.Messages;
|
||||
using ModelContextProtocol.Server;
|
||||
using ModelContextProtocol.Utils.Json;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace AspNetCoreSseServer;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using McpDotNet;
|
||||
using ModelContextProtocol;
|
||||
using AspNetCoreSseServer;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
using System.Net.ServerSentEvents;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Channels;
|
||||
using McpDotNet.Protocol.Messages;
|
||||
using McpDotNet.Protocol.Transport;
|
||||
using McpDotNet.Utils.Json;
|
||||
using ModelContextProtocol.Protocol.Messages;
|
||||
using ModelContextProtocol.Protocol.Transport;
|
||||
using ModelContextProtocol.Utils.Json;
|
||||
|
||||
namespace AspNetCoreSseServer;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using McpDotNet.Server;
|
||||
using ModelContextProtocol.Server;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TestServerWithHosting.Tools;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using McpDotNet.Protocol.Types;
|
||||
using McpDotNet.Server;
|
||||
using ModelContextProtocol.Protocol.Types;
|
||||
using ModelContextProtocol.Server;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TestServerWithHosting.Tools;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Samples
|
||||
|
||||
This directory contains example projects demonstrating how to use mcpdotnet with different LLM SDKs and platforms.
|
||||
This directory contains example projects demonstrating how to use ModelContextProtocol with different LLM SDKs and platforms.
|
||||
|
||||
## Environment Setup
|
||||
|
||||
|
|
@ -13,14 +13,14 @@ Before running the samples, you'll need to set up the following environment vari
|
|||
|
||||
### Anthropic Integration
|
||||
|
||||
Located in `samples/anthropic`, this sample demonstrates integration with Anthropic's Claude API using mcpdotnet. The example shows how to:
|
||||
Located in `samples/anthropic`, this sample demonstrates integration with Anthropic's Claude API using ModelContextProtocol. The example shows how to:
|
||||
- Configure an MCP client for use with Anthropic
|
||||
- Map between MCP protocol types and Anthropic SDK types
|
||||
- Handle tool invocations and responses
|
||||
|
||||
### Microsoft.Extensions.AI Integration
|
||||
|
||||
Located in `samples/microsoft.extensions.ai`, this sample shows how to use mcpdotnet with Microsoft's AI SDK. It demonstrates:
|
||||
Located in `samples/microsoft.extensions.ai`, this sample shows how to use ModelContextProtocol with Microsoft's AI SDK. It demonstrates:
|
||||
- Setting up an MCP client with MEAI
|
||||
- Mapping MCP tools to MEAI function calls
|
||||
- Handling streaming responses and tool invocations
|
||||
|
|
@ -38,4 +38,4 @@ The complexity of this mapping varies depending on how closely the SDK's design
|
|||
3. Navigate to the desired sample directory
|
||||
4. Run `dotnet run` to execute the sample
|
||||
|
||||
For more detailed examples of mcpdotnet usage, you can also refer to the integration tests in the `tests/McpDotNet.IntegrationTests` project.
|
||||
For more detailed examples of ModelContextProtocol usage, you can also refer to the integration tests in the `tests/ModelContextProtocol.IntegrationTests` project.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
using McpDotNet;
|
||||
using ModelContextProtocol;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Serilog;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\mcpdotnet\mcpdotnet.csproj" />
|
||||
<ProjectReference Include="..\..\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using McpDotNet.Server;
|
||||
using ModelContextProtocol.Server;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TestServerWithHosting.Tools;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using McpDotNet.Protocol.Types;
|
||||
using McpDotNet.Server;
|
||||
using ModelContextProtocol.Protocol.Types;
|
||||
using ModelContextProtocol.Server;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TestServerWithHosting.Tools;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\src\mcpdotnet\mcpdotnet.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace McpDotNet;
|
||||
namespace ModelContextProtocol;
|
||||
|
||||
public static class McpToolExtensions
|
||||
{
|
||||
public static IList<Anthropic.SDK.Common.Tool> ToAnthropicTools(this IEnumerable<McpDotNet.Protocol.Types.Tool> tools)
|
||||
public static IList<Anthropic.SDK.Common.Tool> ToAnthropicTools(this IEnumerable<ModelContextProtocol.Protocol.Types.Tool> tools)
|
||||
{
|
||||
if (tools is null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
using Anthropic.SDK;
|
||||
using Anthropic.SDK.Constants;
|
||||
using Anthropic.SDK.Messaging;
|
||||
using McpDotNet;
|
||||
using McpDotNet.Client;
|
||||
using McpDotNet.Configuration;
|
||||
using McpDotNet.Protocol.Transport;
|
||||
using ModelContextProtocol;
|
||||
using ModelContextProtocol.Client;
|
||||
using ModelContextProtocol.Configuration;
|
||||
using ModelContextProtocol.Protocol.Transport;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\src\McpDotNet.Extensions.AI\McpDotNet.Extensions.AI.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\src\mcpdotnet\mcpdotnet.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using McpDotNet.Client;
|
||||
using McpDotNet.Configuration;
|
||||
using McpDotNet.Protocol.Transport;
|
||||
using ModelContextProtocol.Client;
|
||||
using ModelContextProtocol.Configuration;
|
||||
using ModelContextProtocol.Protocol.Transport;
|
||||
using Microsoft.Extensions.AI;
|
||||
using OpenAI;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue