WxMCPServer 是一个 webMethods 集成服务器(IS)包,它实现了 MCP 服务器,用于 IBM webMethods 混合集成(IWHI)。
它需要 webMethods 集成服务器 或 webMethods 微服务运行时 来托管。
WxMCPServer 允许您通过企业级集成平台将现有的 API(包括其现有的 API 策略)作为 MCP 工具 进行公开。
它利用了现有的 API 管理基础设施:

在当前解决方案方法中,MCP 工具目录 API 与其他业务 API 一起分组到一个 API 产品中。然后使用此 API 产品来检索该产品中所有 API 的元数据(包括 OpenAPI 规范)。
WxMCPServer 需要 IBM webMethods 集成服务器 或 IBM webMethods 微服务运行时 作为服务器(已测试 v11.1 版本)。
为了与 API 管理解决方案集成,必须实现 MCP 工具目录 API。
有如何在各种系统上实现此 API 的说明(以及预配置的资产)。
该方法通常对第三方 API 管理解决方案(“联邦 API 管理”)开放。
下图提供了架构概述:

如果您在本地运行,可以使用 webMethods Service Designer 和 webMethods 包注册表 加载包 WxMCPServer。

如果您在 IBM webMethods 混合集成(SaaS)中运行,可以将此 GitHub 存储库 作为外部 包 添加到您的 IBM webMethods 混合集成 项目。
如果您不运行本地 MCP 服务器,而是运行用于企业场景的共享服务器,则应将 WxMCPServer API 放在 API 网关前面的 WxMCPServer 实现。理想情况下,将其放入与 MCP 工具目录 API 相同的 API 产品中,以便所有 API 共享相同的凭据(“调用您能列出的,反之亦然”)。 以下是完整的企业架构:

有一个预配置的 存档 适用于 webMethods API 网关,实现了 WxMCPServer API 用于 webMethods API 网关。
您可以为 WxMCPServer 设置默认值,如果未发送相应的 HTTP 头,则使用这些默认值。
注意: MCP 客户端 HTTP 头 始终 优先于默认值。
| 变量名称 | 是否必需 | 默认值 | 描述 |
|---|---|---|---|
wxmcp.cache.manager.name | 否 | WxMCP_Cache_Manager_Default | 要使用的缓存管理器的名称。 |
wxmcp.auth.type | 是 | (无) | 认证类型:"OAUTH" 或 "API_KEY"。 |
wxmcp.tool.catalog.base.url | 是 | (无) | API 网关上的 MCP 工具目录 API 的基础 URL,例如,https://<myWebMethodsAPIGateway>/gateway/WxMCP-Tool-Catalog-wMAPIGW/1.1 |
wxmcp.api.key.headername | 条件 | (无) | 仅当 wxmcp.auth.type = "API_KEY" 时使用。指定 API 密钥头名称。 |
wxmcp.tool.header.prefix | 否 | header_ | 工具头属性的默认前缀。 |
wxmcp.tool.query.prefix | 否 | query_ | 工具查询参数属性的默认前缀。 |
wxmcp.tool.path.prefix | 否 | path_ | 工具路径参数属性的默认前缀。 |
wxmcp.tool.response.mode | 否 | both | 工具响应格式:text,structured 或 both。 |
wxmcp.response.code.mode | 否 | stdio | 响应模式:"stdio"(总是 HTTP 200)或 "http"(实际状态码)。 |
{
"mcpServers": {
"mcp-iwhi-apikey-demo": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://<Integration Server Host>:<Integration Server Port>/mcp",
"--header",
"auth_type:API_KEY",
"--header",
"api_key:<The API Key>",
"--header",
"tool_catalog_base_url:https://<webMethods API Gateway Host>:<webMethods API Gateway Port>/gateway/WxMCP-Tool-Catalog/1.1",
"--header",
"api_key_headername:<Your API Key header - i.e. x-Gateway-APIKey for webMethods>",
"--header",
"tool_header_prefix:header_",
"--header",
"tool_query_prefix:query_",
"--header",
"tool_path_prefix:path_",
"--header",
"tool_response_mode:structured",
"--header",
"response_code:http"
]
}
}
}
{
"mcpServers": {
"m cp-iwhi-oauth-demo": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://<Integration Server Host>:<Integration Server Port>/mcp",
"--header",
"auth_type:OAUTH",
"--header",
"tool_catalog_base_url:https://<webMethods API Gateway Host>:<webMethods API Gateway Port>/gateway/WxMCP-Tool-Catalog/1.1",
"--header",
"oauth_bearer_token:<The bearer token>",
"--header",
"tool_header_prefix:header_",
"--header",
"tool_query_prefix:query_",
"--header",
"tool_path_prefix:path_",
"--header",
"tool_response_mode:structured",
"--header",
"response_code:http"
]
}
}
}
uvx mcp-proxy
--headers api_key <Your API Key header - i.e. x-Gateway-APIKey for webMethods>
--headers tool_catalog_base_url https://<webMethods API Gateway Host>:<webMethods API Gateway Port>/gateway/WxMCP-Tool-Catalog/1.1
http://<Integration Server Host>:<Integration Server Port>/mcp --transport streamablehttp
{
"servers": {
"my-wxmcp-http-server": {
"url": "http://<Integration Server Host>:<Integration Server Port>/mcp",
"type": "http",
"headers": {
"auth_type": "API_KEY",
"tool_catalog_base_url": "https://<webMethods API Gateway Host>:<webMethods API Gateway Port>/gateway/WxMCP-Tool-Catalog/1.1",
"api_key": "<Your API Key header - i.e. x-Gateway-APIKey for webMethods>",
"Content-Type": "application/json",
"api_key_headername": "x-Gateway-APIKey"
}
}
},
"inputs": []
}
"Content-Type": "application/json" 发送和接收数据到 API。