关于 .net Types Explorer Mcp Server
.NET Types Explorer MCP Server 是一个 MCP 服务,通过反射读取编译后的 .NET 程序集,为 AI 编码 Agent 提供类型信息。它面向需要理解第三方 NuGet 包 API 的开发场景。
主要功能
- 01程序集、命名空间与类型浏览
- 02类型的方法、属性、字段与事件信息
- 03NuGet 包搜索与版本及依赖查询
- 04可配置的程序集解析模式
- 05支持通配符过滤与分页
适用场景
- 01让编码 Agent 查阅第三方 NuGet 包的 API
- 02在不完整构建的情况下探索包的类型
- 03查询包的版本历史与依赖关系
MCP 相关
该服务通过 MCP 向客户端暴露五个工具,包括 ReferencedAssembliesExplorer、NamespacesExplorer、NamespaceTypes、NuGetPackageSearch 和 NuGetPackageVersions。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
.NET 类型资源管理器 MCP 服务
一种 Model Context Protocol(MCP)服务,可为 AI 编码 Agent 提供 .NET 项目的详细类型信息。
概述
.NET 类型资源管理器 MCP 服务是一款功能强大的工具,旨在帮助 AI 编码 Agent 理解和使用 .NET 代码库。
它提供了一种结构化的方式来探索 .NET 项目中的程序集、命名空间和类型,让 AI Agent 更轻松地生成准确且结合上下文的代码建议。
该服务使用反射从已编译的 .NET 程序集中提取详细类型信息,包括类、接口、方法、属性、字段和事件。
这些信息随后会通过一组工具提供给 AI Agent,以便它们系统地探索代码库。
贡献
欢迎贡献!请随时提交 Pull Request。
功能
- 程序集探索:获取 .NET 项目引用的所有程序集列表
- 命名空间探索:查找指定程序集中的所有命名空间
- 类型探索:获取指定命名空间中类型的详细信息,包括:
- 包含泛型参数的完整类型名称
- 实现的接口
- 带参数的构造函数
- 包含返回类型和参数的方法
- 包含类型和访问器的属性
- 包含类型和修饰符的字段
- 包含处理程序类型的事件
- NuGet 包搜索:在 nuget.org 上搜索 NuGet 包,并支持筛选和分页
- NuGet 包版本信息:获取特定 NuGet 包的版本历史记录和依赖信息
- 可配置的程序集解析:从生成输出目录、NuGet 全局包缓存(仅还原,无需生成)中解析程序集,或自动尝试两者
- 筛选:应用通配符筛选条件以缩小结果范围
- 分页:使用内置分页处理大型结果集
路线图
- 添加 NuGet 集成,以提供实际的包版本信息
- 迁移至官方 Model Context Protocol C# SDK(modelcontextprotocol/csharp-sdk)
- 支持多个 NuGet 包源(自定义/私有源)
- 添加构建依赖关系图的功能
- 改进多项目场景
先决条件
- .NET 10.0 SDK 或更高版本
- 要探索的 .NET 项目
配置
NuGet 包源
该服务支持同时查询多个 NuGet 包源。在 appsettings.json 中配置自定义源:
{
"Tools": {
"DefaultPageSize": 20,
"IntendResponse": false,
"NuGetSources": [
{
"Name": "nuget.org",
"Url": "https://api.nuget.org/v3/index.json",
"Enabled": true
},
{
"Name": "MyPrivateFeed",
"Url": "https://my-company.com/nuget/v3/index.json",
"Enabled": true
},
{
"Name": "dotnet-core (MyGet)",
"Url": "https://dotnet.myget.org/F/dotnet-core/api/v3/index.json",
"Enabled": true,
"Comment": "Example: MyGet public feed for .NET Core preview packages"
}
]
}
}
配置选项:
- Name:包源的易读名称
- Url:NuGet v3 API 端点的完整 URL(必须以
/v3/index.json结尾) - Enabled:设为
false可暂时禁用某个源,而无需将其移除
行为:
- 为提升性能,所有已启用的源都会并行查询
- 系统会按包 ID 和版本自动去重结果
- 如果某个源失败,服务会继续使用其余源
- 默认源行为:只有在
appsettings.json中未配置任何源时,才会添加 nuget.org
源优先级与去重:
当在多个源中找到同一个包时,服务会采用基于优先级的策略:
- 优先级由顺序决定:配置中列出的顺序越靠前,优先级越高
- 结果确定:对于重复的包,列表中的第一个源始终优先
- 并行查询:尽管并行执行,结果仍会按优先级顺序处理
- 元数据一致性:包元数据(描述、下载次数等)始终来自包含该包的最高优先级源
示例:
{
"NuGetSources": [
{ "Name": "Internal", "Url": "https://internal.company.com/nuget/v3/index.json", "Enabled": true },
{ "Name": "nuget.org", "Url": "https://api.nuget.org/v3/index.json", "Enabled": true }
]
}
在此配置中,如果某个包同时存在于两个源中,将使用来自“Internal”的信息。
程序集解析模式
服务支持多种用于定位程序包程序集的策略。在 appsettings.json 中进行配置:
{
"Tools": {
"AssemblyResolutionMode": "NuGetCache"
}
}
| 模式 | 行为 |
|---|---|
BuildOutput | 默认模式。从生成输出目录(例如 bin/Debug/net10.0/)解析程序集。需要完整生成。 |
NuGetCache | 直接从 NuGet 全局程序包缓存解析程序集。只需运行 dotnet restore,无需生成。会妥善跳过项目类型。 |
Auto | 首先尝试从生成输出目录解析;如果未找到程序集,则回退到 NuGet 缓存。 |
如果你主要需要探索第三方程序包 API,而不想等待完整的生成周期,NuGetCache 模式就特别有用。系统会自动从 project.assets.json 读取全局程序包文件夹路径。
安装
选项 1:原生安装
- 克隆仓库
- 生成项目:
dotnet build -c Release - 发布项目:
将dotnet publish -c Release -r <runtime-identifier> --self-contained false<runtime-identifier>替换为目标平台(例如win-x64、linux-x64、osx-x64)。
选项 2:Docker
该服务以 Docker 容器形式提供,可实现更好的隔离和更简便的部署:
-
从 Docker Hub 拉取镜像:
docker pull vrogozhin/dotnet-types-explorer-mcp:latest -
或者在本地构建:
git clone https://github.com/V0v1kkk/DotNetMetadataMcpServer.git cd DotNetMetadataMcpServer docker build -t dotnet-types-explorer-mcp . -
运行容器:
docker run --rm -i \ -v /path/to/your/dotnet/projects:/workspace \ vrogozhin/dotnet-types-explorer-mcp:latest
Docker 部署的优势:
- 无需在计算机上安装 .NET SDK
- 隔离环境可避免冲突
- 在不同操作系统上保持一致的行为
- 包含 MSBuild 和所有必需的依赖项
- 拉取最新镜像即可轻松更新
配置
原生配置
要将 .NET Types Explorer MCP Server 与 AI Agent 配合使用,需要在 MCP 设置文件中进行配置。以下是配置示例:
{
"mcpServers": {
"dotnet-types-explorer": {
"command": "/path/to/DotNetMetadataMcpServer",
"args": [ "--homeEnvVariable", "/home/user" ],
"disabled": false,
"alwaysAllow": [],
"timeout": 300
}
}
}
将 /path/to/DotNetMetadataMcpServer 替换为已发布可执行文件的实际路径,并将 /home/user 替换为你的主目录。
Docker 配置
若要使用 Docker 部署,请按以下方式配置 MCP 客户端:
{
"mcpServers": {
"dotnet-types-explorer": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"/path/to/your/dotnet/projects:/workspace",
"vrogozhin/dotnet-types-explorer-mcp:latest"
],
"disabled": false,
"alwaysAllow": [],
"timeout": 300
}
}
}
将 /path/to/your/dotnet/projects 替换为包含 .NET 项目的目录。容器将能够访问此目录中的所有项目。
重要限制
- 是否需要生成取决于解析模式。 在
BuildOutput模式(默认)下,必须先生成项目才能扫描。在NuGetCache模式下,只需运行dotnet restore,服务便会直接从 NuGet 全局程序包缓存解析程序包程序集。只有在项目已生成时,才能使用项目特定类型。 - 该工具不会跟踪对其他项目的引用。 它只检查指定项目及其 NuGet 依赖项。如果需要分析多个项目,必须分别扫描每个项目。
如何定位项目输出
扫描项目时,服务需要已编译程序集的路径。MsBuildHelper 会评估项目,并按以下顺序尝试定位输出程序集:
- 首先使用请求的配置(默认是 Debug),然后
- 尝试 Release;如果仍未找到,
- 则回退到再次检查 Debug,作为安全默认值。
使用第一个找到的现有输出。如果未找到输出,则会采用合理的默认路径并记录警告。这样可确保本地运行(通常使用 Debug)和 CI 运行(通常使用 Release)的行为一致。请确保在扫描前已使用其中一种配置生成项目。
用法
该服务提供五个主要工具,供 AI Agent 使用:
- ReferencedAssembliesExplorer:获取 .NET 项目引用的程序集
- NamespacesExplorer:获取指定程序集中的命名空间
- NamespaceTypes:获取指定命名空间中的类型
- NuGetPackageSearch:在 nuget.org 上搜索 NuGet 包,并支持筛选和分页
- NuGetPackageVersions:获取特定 NuGet 包的版本历史和依赖信息
此工具已在 Roo Code Visual Studio 扩展中进行测试。该扩展是一款支持 Model Context Protocol 的 AI 编码助手。你可以在 GitHub 上了解更多关于 Roo Code 的信息。
可以使用
.clinerules文件来指示编码助手使用 MCP 服务。
AI 编码助手使用说明
如果你处理的是带有 NuGet 包引用的 .NET 项目,并且需要使用这些包编写代码,则应使用 Dotnet Type Explorer MCP 服务系统地探索这些包的 API。当你不熟悉包的 API 或文档有限时,这一点尤其重要。
处理 .NET 项目时:
-
首先,确保项目已构建。此工具依赖已编译的程序集来提取类型信息。
-
首先使用 ReferencedAssembliesExplorer 工具获取项目文件引用的所有程序集。这将列出所有可用的程序集。
-
重点关注第三方库和 NuGet 包,而非 System.* 或 Microsoft.* 等基类库(BCL)类型;这些类型在其他地方有详细文档。
-
确定相关程序集后,使用 NamespacesExplorer 工具发现这些程序集中的命名空间。这有助于了解库的组织方式。
-
确定相关命名空间后,使用 NamespaceTypes 工具获取你感兴趣的命名空间中类型的详细信息,包括方法、属性、字段、事件等。
-
仅在数据量过大或明确知道要查找的内容时使用筛选。
-
如果需要查找特定 NuGet 包,或查看其版本和依赖项,请使用 NuGetPackageSearch 工具按名称或关键字搜索包。
-
如果需要获取特定 NuGet 包的详细信息,包括其版本历史和依赖项,请使用 NuGetPackageVersions 工具。当你需要了解兼容性要求或依赖链时,此工具尤其有用。
-
搜索特定版本或具有特定命名模式的包时,使用 NuGet 工具的筛选功能缩小结果范围。
请记住,此工具只会检查指定项目及其 NuGet 依赖项,不会追踪到解决方案中的其他项目。如果需要分析多个项目,则必须分别扫描每个项目。
这种自上而下的方法(程序集 → 命名空间 → 类型)是在需要编写使用 .NET 库的代码时,探索和了解这些库的最高效方式。对于 API 不容易理解或文档不完善的第三方库,这种方法尤其有价值。NuGet 工具则对其加以补充,无需项目已引用相应包,即可直接获取包信息。
工作原理
服务器使用以下流程提取类型信息:
- 项目评估:使用 MSBuild 评估项目文件并查找已编译的程序集
- 程序集加载:加载已编译的程序集及其依赖项
- 类型反射:使用反射提取类型的详细信息
- 筛选和分页:对结果应用筛选和分页
- 响应格式化:将结果格式化为 JSON 并返回给客户端
API 参考
ReferencedAssembliesExplorer
根据筛选条件和分页设置检索引用的程序集。
输入架构:
{
"type": "object",
"properties": {
"ProjectFileAbsolutePath": {
"type": "string"
},
"PageNumber": {
"type": "integer"
},
"FullTextFiltersWithWildCardSupport": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}
},
"required": [
"ProjectFileAbsolutePath"
]
}
响应:
{
"AssemblyNames": ["Assembly1", "Assembly2", ...],
"CurrentPage": 1,
"AvailablePages": [1, 2, ...]
}
NamespacesExplorer
从指定的程序集检索命名空间,并支持筛选和分页。
输入架构:
{
"type": "object",
"properties": {
"ProjectFileAbsolutePath": {
"type": "string"
},
"AssemblyNames": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
},
"PageNumber": {
"type": "integer"
},
"FullTextFiltersWithWildCardSupport": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}
},
"required": [
"ProjectFileAbsolutePath"
]
}
响应:
{
"Namespaces": ["Namespace1", "Namespace2", ...],
"CurrentPage": 1,
"AvailablePages": [1, 2, ...]
}
NamespaceTypes
从指定的命名空间检索类型,并支持筛选和分页。
输入架构:
{
"type": "object",
"properties": {
"ProjectFileAbsolutePath": {
"type": "string"
},
"Namespaces": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
},
"PageNumber": {
"type": "integer"
},
"FullTextFiltersWithWildCardSupport": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}
},
"required": [
"ProjectFileAbsolutePath"
]
}
响应:
{
"TypeData": [
{
"FullName": "Namespace.TypeName",
"Implements": ["Interface1", "Interface2", ...],
"Constructors": ["(param1, param2)", ...],
"Methods": ["ReturnType MethodName(param1, param2)", ...],
"Properties": ["PropertyType PropertyName { get; set; }", ...],
"Fields": ["FieldType FieldName", ...],
"Events": ["event EventHandlerType EventName", ...]
},
...
],
"CurrentPage": 1,
"AvailablePages": [1, 2, ...]
}
NuGetPackageSearch
搜索 nuget.org 上的 NuGet 包,并支持筛选和分页。
输入架构:
{
"type": "object",
"properties": {
"SearchQuery": {
"type": "string"
},
"IncludePrerelease": {
"type": "boolean"
},
"PageNumber": {
"type": "integer"
},
"FullTextFiltersWithWildCardSupport": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}
},
"required": [
"SearchQuery"
]
}
响应:
{
"Packages": [
{
"Id": "Newtonsoft.Json",
"Version": "13.0.3",
"Description": "Json.NET is a popular high-performance JSON framework for .NET",
"Authors": "James Newton-King",
"DownloadCount": 1000000,
"Published": "2023-03-08T00:00:00Z"
},
...
],
"CurrentPage": 1,
"AvailablePages": [1, 2, ...]
}
NuGetPackageVersions
检索特定 NuGet 包的版本历史记录和依赖信息。
输入架构:
{
"type": "object",
"properties": {
"PackageId": {
"type": "string"
},
"IncludePrerelease": {
"type": "boolean"
},
"PageNumber": {
"type": "integer"
},
"FullTextFiltersWithWildCardSupport": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}
},
"required": [
"PackageId"
]
}
响应:
{
"PackageId": "Newtonsoft.Json",
"Versions": [
{
"Id": "Newtonsoft.Json",
"Version": "13.0.3",
"Description": "Json.NET is a popular high-performance JSON framework for .NET",
"Authors": "James Newton-King",
"DownloadCount": 1000000,
"Published": "2023-03-08T00:00:00Z",
"DependencyGroups": [
{
"TargetFramework": ".NETStandard2.0",
"Dependencies": [
{
"Id": "System.Text.Json",
"VersionRange": "6.0.0"
}
]
}
]
},
...
],
"CurrentPage": 1,
"AvailablePages": [1, 2, ...]
}
使用场景示例
以下示例展示了 AI Agent 如何使用 .NET Types Explorer MCP Server 探索 UI 框架 API:
-
筛选并检索程序集:
{ "ProjectFileAbsolutePath": "/home/user/Projects/MyApp/MyApp.csproj", "PageNumber": 1, "FullTextFiltersWithWildCardSupport": ["Avalonia*"] }响应:
{ "AssemblyNames": [ "Avalonia", "Avalonia.Controls.ColorPicker", "Avalonia.Controls.DataGrid", "Avalonia.Desktop", "Avalonia.Diagnostics", "Avalonia.Fonts.Inter", "Avalonia.FreeDesktop", "Avalonia.Native", "Avalonia.ReactiveUI", "Avalonia.Remote.Protocol" ], "CurrentPage": 1, "AvailablePages": [1, 2] } -
使用针对性筛选条件检索命名空间:
{ "ProjectFileAbsolutePath": "/home/user/Projects/MyApp/MyApp.csproj", "AssemblyNames": ["Avalonia"], "PageNumber": 1, "FullTextFiltersWithWildCardSupport": ["*Media*", "*Image*"] }响应:
{ "Namespaces": [ "Avalonia.Media", "Avalonia.Media.Transformation", "Avalonia.Media.TextFormatting", "Avalonia.Media.TextFormatting.Unicode", "Avalonia.Media.Immutable", "Avalonia.Media.Imaging", "Avalonia.Media.Fonts" ], "CurrentPage": 1, "AvailablePages": [1] } -
从特定命名空间检索类型:
{ "ProjectFileAbsolutePath": "/home/user/Projects/MyApp/MyApp.csproj", "Namespaces": ["Avalonia.Media.Imaging"], "PageNumber": 1, "FullTextFiltersWithWildCardSupport": [] }响应(部分):
{ "TypeData": [ { "FullName": "Avalonia.Media.Imaging.Bitmap", "Implements": [ "IBitmap", "IImage", "IDisposable", "IImageBrushSource" ], "Constructors": [ "(String fileName)", "(Stream stream)", "(PixelFormat format, AlphaFormat alphaFormat, IntPtr data, PixelSize size, Vector dpi, Int32 stride)" ], "Methods": [ "static Avalonia.Media.Imaging.Bitmap DecodeToWidth(System.IO.Stream stream, System.Int32 width, Avalonia.Media.Imaging.BitmapInterpolationMode? interpolationMode = null)", "static Avalonia.Media.Imaging.Bitmap DecodeToHeight(System.IO.Stream stream, System.Int32 height, Avalonia.Media.Imaging.BitmapInterpolationMode? interpolationMode = null)", "Avalonia.Media.Imaging.Bitmap CreateScaledBitmap(Avalonia.PixelSize destinationSize, Avalonia.Media.Imaging.BitmapInterpolationMode? interpolationMode = null)", "virtual System.Void Dispose()" ], "Properties": [ "virtual Avalonia.Vector Dpi { get; }", "virtual Avalonia.Size Size { get; }", "virtual Avalonia.PixelSize PixelSize { get; }" ] } ], "CurrentPage": 1, "AvailablePages": [1, 2] } -
应用特定筛选条件查找相关类型:
{ "ProjectFileAbsolutePath": "/home/user/Projects/MyApp/MyApp.csproj", "Namespaces": ["Avalonia.Platform"], "PageNumber": 1, "FullTextFiltersWithWildCardSupport": ["*Framebuffer*", "*Pixel*"] }响应:
{ "TypeData": [ { "FullName": "Avalonia.Platform.ILockedFramebuffer", "Implements": ["IDisposable"], "Methods": [ "abstract System.IntPtr get_Address()", "abstract Avalonia.PixelSize get_Size()", "abstract System.Int32 get_RowBytes()", "abstract Avalonia.Vector get_Dpi()", "abstract Avalonia.Platform.PixelFormat get_Format()" ], "Properties": [ "abstract System.IntPtr Address { get; }", "abstract Avalonia.PixelSize Size { get; }", "abstract System.Int32 RowBytes { get; }", "abstract Avalonia.Vector Dpi { get; }", "abstract Avalonia.Platform.PixelFormat Format { get; }" ] } ], "CurrentPage": 1, "AvailablePages": [1] }
NuGet 包示例
以下示例展示了 AI Agent 如何使用 NuGet 工具探索包信息:
- 搜索 NuGet 包:
{
"SearchQuery": "EntityFrameworkCore",
"IncludePrerelease": false,
"PageNumber": 1,
"FullTextFiltersWithWildCardSupport": []
}
响应:
{
"Packages": [
{
"Id": "Microsoft.EntityFrameworkCore",
"Version": "7.0.0",
"Description": "Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology.",
"Authors": "Microsoft",
"DownloadCount": 42000000,
"Published": "2022-11-08T00:00:00Z"
},
{
"Id": "Microsoft.EntityFrameworkCore.SqlServer",
"Version": "7.0.0",
"Description": "Microsoft SQL Server database provider for Entity Framework Core.",
"Authors": "Microsoft",
"DownloadCount": 38000000,
"Published": "2022-11-08T00:00:00Z"
}
],
"CurrentPage": 1,
"AvailablePages": [1, 2, 3, 4, 5]
}
- 使用筛选条件搜索:
{
"SearchQuery": "Json",
"IncludePrerelease": false,
"PageNumber": 1,
"FullTextFiltersWithWildCardSupport": ["Newtonsoft*"]
}
响应:
{
"Packages": [
{
"Id": "Newtonsoft.Json",
"Version": "13.0.3",
"Description": "Json.NET is a popular high-performance JSON framework for .NET",
"Authors": "James Newton-King",
"DownloadCount": 1250000000,
"Published": "2023-03-08T00:00:00Z"
},
{
"Id": "Newtonsoft.Json.Bson",
"Version": "1.0.2",
"Description": "Json.NET BSON adds support for reading and writing BSON",
"Authors": "James Newton-King",
"DownloadCount": 120000000,
"Published": "2020-01-01T00:00:00Z"
}
],
"CurrentPage": 1,
"AvailablePages": [1]
}
- 获取包版本信息:
{
"PackageId": "Newtonsoft.Json",
"IncludePrerelease": false,
"PageNumber": 1,
"FullTextFiltersWithWildCardSupport": []
}
响应:
{
"PackageId": "Newtonsoft.Json",
"Versions": [
{
"Id": "Newtonsoft.Json",
"Version": "13.0.3",
"Description": "Json.NET is a popular high-performance JSON framework for .NET",
"Authors": "James Newton-King",
"DownloadCount": 1250000000,
"Published": "2023-03-08T00:00:00Z",
"DependencyGroups": [
{
"TargetFramework": ".NETStandard2.0",
"Dependencies": []
},
{
"TargetFramework": ".NETFramework4.5",
"Dependencies": []
}
]
},
{
"Id": "Newtonsoft.Json",
"Version": "13.0.2",
"Description": "Json.NET is a popular high-performance JSON framework for .NET",
"Authors": "James Newton-King",
"DownloadCount": 980000000,
"Published": "2022-11-24T00:00:00Z",
"DependencyGroups": [
{
"TargetFramework": ".NETStandard2.0",
"Dependencies": []
},
{
"TargetFramework": ".NETFramework4.5",
"Dependencies": []
}
]
}
],
"CurrentPage": 1,
"AvailablePages": [1, 2, 3, 4, 5]
}
- 使用筛选条件获取特定包版本:
{
"PackageId": "Microsoft.EntityFrameworkCore",
"IncludePrerelease": false,
"PageNumber": 1,
"FullTextFiltersWithWildCardSupport": ["7.0.0"]
}
响应:
{
"PackageId": "Microsoft.EntityFrameworkCore",
"Versions": [
{
"Id": "Microsoft.EntityFrameworkCore",
"Version": "7.0.0",
"Description": "Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology.",
"Authors": "Microsoft",
"DownloadCount": 42000000,
"Published": "2022-11-08T00:00:00Z",
"DependencyGroups": [
{
"TargetFramework": "net6.0",
"Dependencies": [
{
"Id": "Microsoft.Extensions.Caching.Memory",
"VersionRange": "7.0.0"
},
{
"Id": "Microsoft.Extensions.DependencyInjection",
"VersionRange": "7.0.0"
},
{
"Id": "Microsoft.Extensions.Logging",
"VersionRange": "7.0.0"
}
]
}
]
}
],
"CurrentPage": 1,
"AvailablePages": [1]
}
许可证
本项目采用 Apache 2.0 许可证授权,详情请参阅 LICENSE 文件。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。