Skip to main content
Glama

esb-protocol-mcp

一个给 Agent 用的 ESB 协议测试 MCP Server。

它把企业服务总线(ESB)日常调试里最重复的几件事——认协议、校验 JDBC 连接串、拼 MQ 配置、看报文结构、生成测试用例——封装成 MCP 工具,让编码助手直接调用。

设计原则:全部离线。 不连数据库、不发消息、不抓网页、不执行用户代码。只做解析、校验、归纳和生成。因此可以放心地挂在 Agent 工作流里。

为什么做这个

做 ESB / 数据集成时,一个接口联调往往要反复回答几个问题:

  • 这个数据源的 JDBC URL 写对了吗?有没有把 encrypt=false 这种隐患带进生产?

  • Kafka / RabbitMQ / MQTT 的端口、Topic、QoS 默认值是什么?

  • 对面发来的一段报文到底是 JSON、XML 还是 SOAP?字段层级长什么样?

  • 这个协议的最小测试用例该怎么写?

这些问题不需要联网,也不该每次都靠人肉记忆。交给 Agent 更合适。

Related MCP server: REA

工具一览

工具

输入

输出

list_protocols

filter?

支持的 9 种协议及其默认端口、说明

validate_jdbc_url

url

驱动、主机、端口、库名 + 安全告警

build_mq_config

type, host, port?, topic?, queue?, username?, qos?

归一化配置 + 默认值 + 告警

inspect_payload

payload

格式识别(JSON/XML/SOAP/文本)、字段路径、根元素

generate_test_case

protocol, scenario?

测试步骤、样例请求、断言清单

支持协议:HTTP / HTTPS、TCP Socket、WebSocket、SOAP、Kafka、RabbitMQ、MQTT、AMQP 1.0、JDBC。

快速开始

要求 Node.js 18 及以上。

git clone https://github.com/wangweifei-504/esb-protocol-mcp.git
cd esb-protocol-mcp
npm install
npm run build
npm test

启动服务(stdio 传输):

npm start

在 Agent 客户端里配置

以 Claude Desktop / Cursor / Qoder 为例,在配置文件中加入:

{
  "mcpServers": {
    "esb-protocol": {
      "command": "node",
      "args": ["/absolute/path/to/esb-protocol-mcp/dist/index.js"]
    }
  }
}

Windows 用户把 command 改成 node.exe 的完整路径,args 用绝对路径。

完整示例见 examples/claude-desktop.json。

用法举例

向 Agent 提问:

帮我看一下这个连接串:jdbc:sqlserver://10.0.0.5:1433;databaseName=esb;encrypt=false

Agent 调用 validate_jdbc_url,得到:

{
  "valid": true,
  "driver": "sqlserver",
  "host": "10.0.0.5",
  "port": 1433,
  "database": "esb",
  "warnings": ["encrypt=false disables TLS verification."],
  "errors": []
}

再比如:

给我一份 Kafka 重连场景的测试用例骨架

Agent 调用 generate_test_case({ "protocol": "kafka", "scenario": "reconnect" }),得到步骤、样例请求和断言清单。

安全说明

  • 所有工具都是纯函数式解析,不建立任何网络连接。

  • 工具不接收也不返回密钥;MQ 工具只生成配置骨架,提示在运行时通过环境变量注入凭据。

  • inspect_payload 检测到 DOCTYPE 会提示关闭 DTD 处理,避免 XXE 风险。

  • 本项目不包含任何真实业务数据、患者信息或生产环境配置。

路线图

  • 发布 npm 包,支持 npx esb-protocol-mcp

  • 增加 validate_camel_route:校验 Camel XML 路由的基本结构

  • 增加 diff_config:对比两份 ESB 配置的字段差异

  • 增加 SSE / Streamable HTTP 传输方式

  • 中文本地化工具描述

相关项目

  • ESBTest — 多协议接口测试工具(Spring Boot + Vue),本项目的协议清单来源。

贡献

欢迎提 Issue 和 PR。详见 CONTRIBUTING.md。

许可证

MIT © 2026 wangweifei-504

Available Tools

5 tools
build_mq_configB

Normalise an MQ connection description (kafka/rabbitmq/mqtt/amqp10) into a config object with sensible port defaults and warnings. OFFLINE - no connection is made.

Inputs: host (required), type (required), qos, port, +4 more.

generate_test_caseA

Generate a test-case skeleton (steps, sample request, assertions) for one ESB protocol and an optional scenario name.

Inputs: protocol (required), scenario.

inspect_payloadA

Detect and summarise a JSON, XML, SOAP or plain-text payload. Returns field paths for JSON and root element for XML. Does not fetch URLs or evaluate content.

Inputs: payload (required).

list_protocolsA

List protocols supported by the ESB test tool (HTTP, TCP, WebSocket, SOAP, Kafka, RabbitMQ, MQTT, AMQP 1.0, JDBC). Optional filter matches id, name or category.

Inputs: filter.

validate_jdbc_urlA

Parse a JDBC URL for MySQL, PostgreSQL, Oracle or SQL Server. Returns host, port, database and security warnings. OFFLINE - never connects to the database.

Inputs: url (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct operation: listing protocols, validating a JDBC URL, normalising an MQ config, inspecting a payload, and generating a test case. There is no meaningful overlap, and the descriptions explicitly bound scope (e.g. 'OFFLINE - no connection is made', 'Does not fetch URLs or evaluate content').

    Naming Consistency5/5

    All names follow a strict verb_noun snake_case pattern: list_protocols, validate_jdbc_url, build_mq_config, inspect_payload, generate_test_case. The convention is uniform and self-describing.

    Tool Count4/5

    Five focused utilities is within a reasonable range and each earns its place, but the surface feels slightly thin for a protocol toolkit spanning nine protocols — a couple more offline helpers (e.g. generic endpoint/URL validation) would round it out.

    Completeness4/5

    Core offline workflows are covered: discovery, JDBC URL parsing, MQ config building, payload inspection, and test-case generation across all listed protocols. However, config-building exists only for MQ and JDBC, leaving HTTP/SOAP/WebSocket endpoint spec helpers as a gap agents must work around manually.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to inspect and reverse engineer native binaries, JavaScript/Electron applications, .NET assemblies, websites, and runtime behavior, returning evidence-backed findings that can be explained, implemented, or tested.
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets agents inspect native binaries, JavaScript/Electron applications, .NET assemblies, websites, and runtime behavior, returning evidence-backed findings and limitations for understanding and reimplementing features.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to inspect and reverse-engineer native binaries, JavaScript and Electron apps, .NET assemblies, websites, and runtime behavior without source code, returning evidence-backed findings and limitations.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients to inspect installed software packages and saved browser traffic through read-only local parsers, producing structured evidence about application structure, dependencies, endpoints, and observed authentication schemes.
      1
      Apache 2.0