AIKit.Mcp 0.0.3

dotnet add package AIKit.Mcp --version 0.0.3
                    
NuGet\Install-Package AIKit.Mcp -Version 0.0.3
                    
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="AIKit.Mcp" Version="0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIKit.Mcp" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="AIKit.Mcp" />
                    
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 AIKit.Mcp --version 0.0.3
                    
#r "nuget: AIKit.Mcp, 0.0.3"
                    
#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 AIKit.Mcp@0.0.3
                    
#: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=AIKit.Mcp&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=AIKit.Mcp&version=0.0.3
                    
Install as a Cake Tool

AIKit.Mcp

A .NET wrapper library for the Model Context Protocol (MCP) SDK that simplifies MCP server configuration with fluent builder patterns and helper classes.

Installation

dotnet add package AIKit.Mcp

Quick Start

using AIKit.Mcp;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAIKitMcp(mcp =>
{
    mcp.ServerName = "MyMcpServer";
    mcp.ServerVersion = "1.0.0";

    // Configure transport
    mcp.WithHttpTransport(opts =>
    {
        opts.HttpBasePath = "/mcp";
    });

    // Auto-discover tools, resources, and prompts
    mcp.WithAutoDiscovery();
    // Resources and prompts auto-discovery enabled by default
});

var app = builder.Build();
app.UseAIKitMcp("/mcp");
await app.RunAsync();

Authentication

AIKit.Mcp supports OAuth 2.0, JWT Bearer, and custom authentication schemes. Configure authentication using the fluent API:

builder.Services.AddAIKitMcp(mcp =>
{
    mcp.ServerName = "MyMcpServer";
    mcp.ServerVersion = "1.0.0";

    mcp.WithHttpTransport(opts =>
    {
        opts.HttpBasePath = "/mcp";

        // JWT Bearer authentication
        opts.WithJwtAuth(jwt =>
        {
            jwt.JwtIssuer = "your-issuer";
            jwt.JwtAudience = "your-audience";
            jwt.TokenValidationParameters = new TokenValidationParameters
            {
                ValidateIssuer = true,
                ValidateAudience = true,
                ValidateIssuerSigningKey = true,
                ValidAudience = "https://your-mcp-server.com/mcp",
                ValidIssuer = "https://your-oauth-server.com"
            };
        });

        // Or JWT Bearer authentication
        // opts.WithJwtAuth(jwt =>
        // {
        //     jwt.Authority = "https://your-oauth-server.com";
        //     jwt.TokenValidationParameters = new TokenValidationParameters
        //     {
        //         ValidateIssuer = true,
        //         ValidateAudience = true,
        //         ValidateIssuerSigningKey = true,
        //         ValidAudience = "https://your-mcp-server.com/mcp",
        //         ValidIssuer = "https://your-oauth-server.com"
        //     };
        //     jwt.SigningKey = "your-secret-key"; // For symmetric key validation
        // });

        // Or MCP-specific authentication with JWT and OAuth 2.0 resource metadata
        // opts.WithMcpAuth(mcpAuth =>
        // {
        //     mcpAuth.Authority = "https://your-oauth-server.com";
        //     mcpAuth.TokenValidationParameters = new TokenValidationParameters
        //     {
        //         ValidateIssuer = true,
        //         ValidateAudience = true,
        //         ValidateIssuerSigningKey = true,
        //         ValidAudience = "https://your-mcp-server.com/mcp",
        //         ValidIssuer = "https://your-oauth-server.com",
        //         NameClaimType = "name",
        //         RoleClaimType = "roles"
        //     };
        //     mcpAuth.ResourceMetadata = new ModelContextProtocol.Authentication.ProtectedResourceMetadata
        //     {
        //         AuthorizationServers = { "https://your-oauth-server.com" },
        //         ScopesSupported = ["mcp:tools"]
        //     };
        // });

        // Or custom authentication
        // opts.WithCustomAuth(custom =>
        // {
        //     custom.SchemeName = "MyAuth";
        //     custom.RegisterScheme = builder =>
        //         builder.AddScheme<AuthenticationSchemeOptions, MyAuthHandler>("MyAuth", null);
        // });
    });

    mcp.WithAutoDiscovery();
});

Features

  • Fluent Builder API: Intuitive configuration with AIKitMcpBuilder
  • Multiple Transports: STDIO and HTTP support
  • Authentication: OAuth 2.0, JWT Bearer, MCP-specific auth, and custom auth
  • Auto-Discovery: Automatic registration of MCP tools, resources, and prompts
  • Advanced Features: Tasks, progress, completion, sampling, and elicitation helpers
  • Logging: Integrated logging with clean output

Documentation

For detailed documentation, examples, and API reference, visit the GitHub repository.

License

MIT

  • NuGet package release
  • Additional authentication providers
  • WebSocket transport support
  • Performance optimizations
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
0.0.3 109 2/13/2026
0.0.2 84 2/13/2026
0.0.1 91 2/13/2026