OpenMcp.Client 1.0.2

dotnet add package OpenMcp.Client --version 1.0.2
                    
NuGet\Install-Package OpenMcp.Client -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenMcp.Client" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenMcp.Client" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OpenMcp.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenMcp.Client --version 1.0.2
                    
#r "nuget: OpenMcp.Client, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenMcp.Client@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenMcp.Client&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OpenMcp.Client&version=1.0.2
                    
Install as a Cake Tool

OpenMcp.Client

NuGet

A generic, high-performance .NET client for the Model Context Protocol (MCP).
Designed to integrate MCP Servers (like PostgreSQL, FileSystem, Web Search) into Semantic Kernel agents or standard .NET applications.

Installation

dotnet add package OpenMcp.Client

Usage with Semantic Kernel

This is the primary use case. The client is designed to be imported directly as a Plugin.

using Microsoft.SemanticKernel;
using OpenMcp.Client.Plugins;

// 1. Setup Dependency Injection (HttpClient is required)
var httpClient = new HttpClient();
var logger = LoggerFactory.Create(b => b.AddConsole()).CreateLogger<DuckDuckGoMcpClient>();

// 2. Initialize the MCP Client
var ddgClient = new DuckDuckGoMcpClient(httpClient, "http://localhost:8083", logger);

// 3. Import into Kernel
var kernelBuilder = Kernel.CreateBuilder();
kernelBuilder.Plugins.AddFromObject(ddgClient, "DuckDuckGo");
var kernel = kernelBuilder.Build();

// 4. The Agent can now use the tool automatically!
// Invoke it via the Kernel (Simulating what an Agent would do)
    // Instead of calling client.SearchAsync() directly, we ask the Kernel to invoke it.
    // In a full Agent scenario, the LLM would automatically select this tool and generate the arguments.

var result = await kernel.InvokeAsync("DuckDuckGo", "Search", 
    new KernelArguments { ["query"] = "Latest .NET 9 features" });

🛠 Available Clients

1. DuckDuckGoMcpClient

  • Purpose: Web Search (Privacy focused).
  • Tools: SearchAsync, SearchNewsAsync, SearchSiteAsync, FetchPageAsync

2. FileSystemMcpClient

  • Purpose: Read/Write files in a sandboxed environment.
  • Tools: ListDirectoryAsync, ReadFileAsync, WriteFileAsync

3. PostgresMcpClient

  • Purpose: Query databases safely.
  • Tools: QueryDatabaseAsync, FindTablesAsync, GetTableSchemaAsync

Manual Usage

You can also use the clients directly without Semantic Kernel.

using OpenMcp.Client.Plugins;

var client = new FileSystemMcpClient(httpClient, "http://localhost:8082", logger);

// Direct call
await client.WriteFileAsync("notes.txt", "Meeting at 10 AM");
var content = await client.ReadFileAsync("notes.txt");

Configuration

The clients require a BaseUrl pointing to the running MCP Server (usually a Docker container).

  • Postgres: http://localhost:8081
  • FileSystem: http://localhost:8082
  • DuckDuckGo: http://localhost:8083

MCP server docker images

To pull and start MCP servers from docker refer to doc - https://github.com/rahulanand428/OpenMcp/blob/9b322daea2c92a7c18b28c8736405a9a9babb07b/src/README.md

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 87 2/26/2026
1.0.1 87 2/26/2026
1.0.0 88 2/26/2026