Azure / Azure/data-api-builder
Refactor MCP to allow post-startup hydration of config file
未关闭
@RubenCerna2079 已经在做这个了。
开始于 2025年12月10日。
mcp-server
- 主要语言
- C#
- 星标
- 1.5k
- 派生
- 372
- 平均合并
- 3 天 22 小时
- 30 天内合并 PR
- 9
描述
Currently DAB is not able to run MCP if it is started without a config file which is added later on. In order to fix this issue, the way the MCP service is added needs to be changed.
The files that need to be changed are:
Startup.cs: All places where the MCP services are only added if the MCP property is enabled need to always be started, no matter if it is enabled or disabled (This will also help with allowing it to be hot-reloadable). In the section that sets the MCP endpoint it needs to be changed so that it always uses the default endpoint, similarly to how it is done in GraphQL. Lastly, in thePerformOnConfigChangeAsyncfunction the Dependency Injection for MCP services need to be manually triggered, which will then populate all its services only when the config file is set, similar to how it is done for REST and GraphQL.PathRewriteMiddleware.cs: In theInvokeAsyncfunction we need to change the path the user uses if it is different from the default, similarly to how we do it with GraphQL.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。