McpEndpointsTools 1.0.0-alpha
See the version list below for details.
dotnet add package McpEndpointsTools --version 1.0.0-alpha
NuGet\Install-Package McpEndpointsTools -Version 1.0.0-alpha
<PackageReference Include="McpEndpointsTools" Version="1.0.0-alpha" />
<PackageVersion Include="McpEndpointsTools" Version="1.0.0-alpha" />
<PackageReference Include="McpEndpointsTools" />
paket add McpEndpointsTools --version 1.0.0-alpha
#r "nuget: McpEndpointsTools, 1.0.0-alpha"
#addin nuget:?package=McpEndpointsTools&version=1.0.0-alpha&prerelease
#tool nuget:?package=McpEndpointsTools&version=1.0.0-alpha&prerelease
MCP Endpoints Tools
Library for ASP.NET Core Web API, which automatically turns each controller method into a tool for the MCP server.
Under the hood, MCP Endpoints Tools uses the Model Context Protocol C# SDK for working with tools.
Description
MCP Endpoints Tools scans the application build, finds all controllers and their public methods marked with HTTP attributes, and registers them as Model Context Protocol (MCP) tools. In this case, XML comments from the assembly are used to fill in the description (summary) of the tools.
Features
- Automatic registration of all controller methods as MCP tools and resources
- Support for method exclusion via the
[McpIgnore]
attribute - Автоматическое добавление описания инструмента из XML-комментариев сборки через
XmlCommentsProvider
- Flexible configuration via
ServerOptions
(path, name, description, version, XML path) - Easy integration into 'IServiceCollection
and
IEndpointRouteBuilder' via extensionsServiceCollectionExtensions
andEndpointRouteBuilderExtensions
Installation
Add the
McpEndpointsTools
project to your solution or connect via NuGet (if there is a package):dotnet add package McpEndpointsTools
In the file
Program.cs
(orStartup.cs
), register the services and mapping:using McpEndpointsServer.Extensions; var builder = WebApplication.CreateBuilder(args); // MCP Server registration and controller scanning builder.Services.AddMcpEndpointsServer(opts => { opts.PipelineEndpoint = "/mcp"; // path for the HTTP pipeline opts.ServerName = "My MCP Server"; // server name opts.ServerDescription = "API for MCP"; // description opts.ServerVersion = "1.2.3"; // version opts.XmlCommentsPath = "MyApp.xml "; // path to the XML documentation file opts.HostUrl = "https://api.mysite "; // base URL });
Set up routing in the same or another location:
var app = builder.Build(); app.MapControllers(); // regular controllers app.MapMcpEndpointsServer(); // MCP endpoints (HTTP stream & SSE) app.Run();
Attributes
McpIgnoreAttribute
It is placed above the controller method to exclude it from the list of generated MCP tools.Authorize
Methods and controllers marked with the Authorize attribute will not be added to the tools. In future versions, support for authentication authorization may be added.
License
MIT License. See the LICENSE file for details.
Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.Mvc.Core (>= 2.3.0)
- ModelContextProtocol (>= 0.1.0-preview.13)
- ModelContextProtocol.AspNetCore (>= 0.1.0-preview.13)
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.10-alpha | 62 | 5/17/2025 |
1.0.8-alpha | 61 | 5/17/2025 |
1.0.6-alpha | 78 | 5/17/2025 |
1.0.4-alpha | 177 | 5/15/2025 |
1.0.0-alpha | 178 | 5/13/2025 |
Add core structure and functionalities for MCP Endpoints Tools
Introduced the initial implementation of the MCP Endpoints Tools project, including foundational classes for server options, XML documentation handling, operation registration, and hosting setup. Added support for extension methods, dependency injection, and endpoint routing to facilitate server configuration and behavior. Included project structure, solution setup, and necessary `.gitignore` entries.