@cyanmycelium/mcp-broker 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mcp-broker.example/CONFIGURATION-EN.md +300 -44
- package/.mcp-broker.example/CONFIGURATION-FR.md +313 -44
- package/.mcp-broker.example/README.md +73 -2
- package/.mcp-broker.example/config.json +18 -9
- package/.mcp-broker.example/config.stdio-bridge.json +16 -0
- package/README.md +407 -27
- package/dist/bin.js +215 -20
- package/dist/bin.js.map +1 -1
- package/dist/chunk-BZUZYXVA.js +5955 -0
- package/dist/chunk-BZUZYXVA.js.map +1 -0
- package/dist/grammars/claude/en.json +12 -0
- package/dist/grammars/claude/fr.json +12 -0
- package/dist/grammars/default/en.json +40 -0
- package/dist/grammars/default/fr.json +40 -0
- package/dist/grammars/default/zh.json +40 -0
- package/dist/index.d.ts +991 -25
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/auth/index.ts +3 -1
- package/src/auth/provider.auth.ts +126 -8
- package/src/authorization/policy.engine.ts +11 -2
- package/src/authorization/policy.types.ts +25 -1
- package/src/bin.ts +325 -28
- package/src/broker/adapters/broker.adapter.diagnose.ts +45 -0
- package/src/broker/adapters/broker.adapter.guide.ts +108 -0
- package/src/broker/aggregate/aggregate.server.ts +82 -15
- package/src/broker/aggregate/provider.client.session.ts +85 -11
- package/src/broker/behaviors/broker.behavior.diagnose.ts +47 -0
- package/src/broker/behaviors/broker.behavior.guide.ts +79 -0
- package/src/broker/broker.context.ts +65 -0
- package/src/broker/broker.diagnostics.ts +495 -0
- package/src/broker/broker.guides.ts +1029 -0
- package/src/broker/broker.server.ts +23 -7
- package/src/broker/broker.slots.ts +36 -0
- package/src/broker/grammars/claude/en.json +12 -0
- package/src/broker/grammars/claude/fr.json +12 -0
- package/src/broker/grammars/default/en.json +40 -0
- package/src/broker/grammars/default/fr.json +40 -0
- package/src/broker/grammars/default/zh.json +40 -0
- package/src/config.ts +191 -4
- package/src/index.ts +38 -3
- package/src/remote.transports.ts +127 -10
- package/src/remote.upstream.ts +4 -1
- package/src/ws/ws.interfaces.ts +148 -3
- package/src/ws/ws.tunnel.builder.ts +63 -1
- package/src/ws/ws.tunnel.ts +1150 -173
- package/web/README.md +31 -4
- package/dist/chunk-FTDKH2C4.js +0 -3670
- package/dist/chunk-FTDKH2C4.js.map +0 -1
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": "The exact provider slot name. Case-sensitive. Use providers_list to discover valid values."
|
|
13
13
|
}
|
|
14
|
+
},
|
|
15
|
+
"broker_guide": {
|
|
16
|
+
"description": "Read the broker's own integration documentation. This is the authoritative source for how to wire anything to this broker, and it is more current than any README you may find in the repository. Call it with no argument first: the index tells you which of the five pages you actually need (publish-provider, connect-client, host-config, deploy, troubleshooting). If you are about to connect a provider, read publish-provider before writing code, the transport and the URL path are a matched pair and getting it wrong fails silently.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"topic": "The page to read: index, publish-provider, connect-client, host-config, deploy, or troubleshooting. Omit it to get the index, which is short and says which page to read next."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"broker_diagnose": {
|
|
22
|
+
"description": "Ask the broker what is wrong with itself. Returns the live state plus a list of detected problems, each with the symptom a caller sees, the evidence that proves it, and a fix you can apply without reading anything else. Call this before you start investigating by hand: it already correlates the transport kind with the pending-request count, which is what identifies the silent transport/path mismatch, and it checks the aggregate, the stdio bridge target, the origin allow-list and leaked sessions.",
|
|
23
|
+
"properties": {
|
|
24
|
+
"slot": "Narrow the report to one provider slot, case-sensitive. Omit it to diagnose the whole broker, which is what you want unless you already know which slot is misbehaving."
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
27
|
}
|
|
16
28
|
}
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": "Le nom exact de l'emplacement provider. Sensible à la casse. Utilise providers_list pour découvrir les valeurs valides."
|
|
13
13
|
}
|
|
14
|
+
},
|
|
15
|
+
"broker_guide": {
|
|
16
|
+
"description": "Lis la documentation d'intégration que le broker embarque. C'est la source qui fait autorité pour brancher quoi que ce soit sur ce broker, et elle est plus à jour que n'importe quel README du dépôt. Appelle-le d'abord sans argument : l'index te dit laquelle des cinq pages te concerne (publish-provider, connect-client, host-config, deploy, troubleshooting). Si tu t'apprêtes à connecter un provider, lis publish-provider avant d'écrire du code : le transport et le chemin URL forment une paire, et se tromper échoue silencieusement.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"topic": "La page à lire : index, publish-provider, connect-client, host-config, deploy ou troubleshooting. Omets-le pour obtenir l'index, qui est court et indique quelle page lire ensuite."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"broker_diagnose": {
|
|
22
|
+
"description": "Demande au broker ce qui ne va pas chez lui. Retourne l'état en direct plus la liste des problèmes détectés, chacun avec le symptôme vu par un appelant, les preuves qui l'établissent et un correctif applicable sans rien lire d'autre. Appelle-le avant d'enquêter à la main : il corrèle déjà le type de transport avec le nombre de requêtes en attente, ce qui identifie l'incompatibilité silencieuse transport/chemin, et il vérifie l'agrégat, la cible du pont stdio, la liste d'origines autorisées et les sessions fuyantes.",
|
|
23
|
+
"properties": {
|
|
24
|
+
"slot": "Restreint le rapport à un seul emplacement de provider, sensible à la casse. Omets-le pour diagnostiquer tout le broker, ce que tu veux tant que tu ne sais pas déjà quel emplacement pose problème."
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
27
|
}
|
|
16
28
|
}
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": "Exact provider name (case-sensitive)."
|
|
13
13
|
}
|
|
14
|
+
},
|
|
15
|
+
"broker_guide": {
|
|
16
|
+
"description": "Returns the broker's own integration documentation as Markdown: how to publish a provider, how to reach a slot as a client, how to configure an MCP host, how to deploy, and a symptom-to-fix troubleshooting page. Read this instead of looking for a README. Call with no argument for the index.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"topic": "Which page to return: index, publish-provider, connect-client, host-config, deploy, or troubleshooting. Omit for the index, which says which page to read next."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"broker_diagnose": {
|
|
22
|
+
"description": "Returns the broker's live state plus the problems it can detect about its own wiring, each with the symptom, the evidence, and a concrete fix. Call this first when something does not work: it correlates the counters for you and names the cause.",
|
|
23
|
+
"properties": {
|
|
24
|
+
"slot": "Narrow the report to one provider slot (case-sensitive). Omit to diagnose the whole broker."
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
27
|
},
|
|
16
28
|
"resources": {
|
|
@@ -21,12 +33,40 @@
|
|
|
21
33
|
"broker://providers": {
|
|
22
34
|
"name": "Broker providers",
|
|
23
35
|
"description": "List of every provider slot known to the broker, including disconnected ones."
|
|
36
|
+
},
|
|
37
|
+
"broker://guide/index": {
|
|
38
|
+
"name": "Guide index",
|
|
39
|
+
"description": "What the broker is, the transport/path pairing rule that costs the most time to get wrong, and which guide page to read next."
|
|
40
|
+
},
|
|
41
|
+
"broker://guide/publish-provider": {
|
|
42
|
+
"name": "Guide: publish a provider",
|
|
43
|
+
"description": "Put an MCP server into a slot: the transport/path pairing rule, the wire formats, the aggregate opt-in, the connect/register/release lifecycle, and the browser limits."
|
|
44
|
+
},
|
|
45
|
+
"broker://guide/connect-client": {
|
|
46
|
+
"name": "Guide: connect a client",
|
|
47
|
+
"description": "Reach a slot as a client: the four client transports, the reserved _broker and _all slots, the origin check, authorization, and every error code you can receive."
|
|
48
|
+
},
|
|
49
|
+
"broker://guide/host-config": {
|
|
50
|
+
"name": "Guide: MCP host configuration",
|
|
51
|
+
"description": "Wire Claude Desktop or another stdio MCP host: why the bridge must target _all, the config recipe, the one-broker-per-port rule, and the anonymous-principal caveat."
|
|
52
|
+
},
|
|
53
|
+
"broker://guide/deploy": {
|
|
54
|
+
"name": "Guide: deploy the broker",
|
|
55
|
+
"description": "Embed the broker as a library or run it as a process: startup ordering, topologies, the config file, static files, TLS, and shutdown."
|
|
56
|
+
},
|
|
57
|
+
"broker://guide/troubleshooting": {
|
|
58
|
+
"name": "Guide: troubleshooting",
|
|
59
|
+
"description": "Symptom to cause to fix, starting with the silent failures that produce no log line anywhere: hung clients, wedged slots, stale tool lists, blocked origins."
|
|
24
60
|
}
|
|
25
61
|
},
|
|
26
62
|
"templates": {
|
|
27
63
|
"broker://providers/{name}": {
|
|
28
64
|
"name": "Broker provider",
|
|
29
65
|
"description": "Snapshot of one specific provider slot, addressed by its name."
|
|
66
|
+
},
|
|
67
|
+
"broker://guide/{topic}": {
|
|
68
|
+
"name": "Broker guide page",
|
|
69
|
+
"description": "One page of the broker's integration documentation, addressed by topic: index, publish-provider, connect-client, host-config, deploy, or troubleshooting."
|
|
30
70
|
}
|
|
31
71
|
}
|
|
32
72
|
}
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": "Nom exact du provider (sensible à la casse)."
|
|
13
13
|
}
|
|
14
|
+
},
|
|
15
|
+
"broker_guide": {
|
|
16
|
+
"description": "Retourne la documentation d'intégration du broker au format Markdown : comment publier un provider, comment atteindre un emplacement en tant que client, comment configurer un hôte MCP, comment déployer, et une page de dépannage symptôme vers correctif. À lire plutôt que de chercher un README. Sans argument, retourne l'index.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"topic": "Page à retourner : index, publish-provider, connect-client, host-config, deploy ou troubleshooting. Omettre pour obtenir l'index, qui indique quelle page lire ensuite."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"broker_diagnose": {
|
|
22
|
+
"description": "Retourne l'état en direct du broker ainsi que les problèmes qu'il sait détecter dans son propre câblage, chacun avec le symptôme, les preuves et un correctif concret. À appeler en premier quand quelque chose ne fonctionne pas : il corrèle les compteurs à ta place et nomme la cause.",
|
|
23
|
+
"properties": {
|
|
24
|
+
"slot": "Restreint le rapport à un seul emplacement de provider (sensible à la casse). Omettre pour diagnostiquer tout le broker."
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
27
|
},
|
|
16
28
|
"resources": {
|
|
@@ -21,12 +33,40 @@
|
|
|
21
33
|
"broker://providers": {
|
|
22
34
|
"name": "Providers du broker",
|
|
23
35
|
"description": "Liste de tous les emplacements de providers connus du broker, y compris les déconnectés."
|
|
36
|
+
},
|
|
37
|
+
"broker://guide/index": {
|
|
38
|
+
"name": "Index du guide",
|
|
39
|
+
"description": "Ce qu'est le broker, la règle d'appariement transport/chemin qui coûte le plus cher quand on la rate, et quelle page du guide lire ensuite."
|
|
40
|
+
},
|
|
41
|
+
"broker://guide/publish-provider": {
|
|
42
|
+
"name": "Guide : publier un provider",
|
|
43
|
+
"description": "Placer un serveur MCP dans un emplacement : la règle d'appariement transport/chemin, les formats de trame, l'inscription à l'agrégat, le cycle de vie connexion/enregistrement/libération et les limites du navigateur."
|
|
44
|
+
},
|
|
45
|
+
"broker://guide/connect-client": {
|
|
46
|
+
"name": "Guide : connecter un client",
|
|
47
|
+
"description": "Atteindre un emplacement en tant que client : les quatre transports client, les emplacements réservés _broker et _all, le contrôle d'origine, l'autorisation et tous les codes d'erreur possibles."
|
|
48
|
+
},
|
|
49
|
+
"broker://guide/host-config": {
|
|
50
|
+
"name": "Guide : configuration d'un hôte MCP",
|
|
51
|
+
"description": "Câbler Claude Desktop ou un autre hôte MCP stdio : pourquoi le pont doit viser _all, la recette de configuration, la règle d'un seul broker par port et la question du principal anonyme."
|
|
52
|
+
},
|
|
53
|
+
"broker://guide/deploy": {
|
|
54
|
+
"name": "Guide : déployer le broker",
|
|
55
|
+
"description": "Intégrer le broker comme bibliothèque ou le lancer comme processus : ordre de démarrage, topologies, fichier de configuration, fichiers statiques, TLS et arrêt propre."
|
|
56
|
+
},
|
|
57
|
+
"broker://guide/troubleshooting": {
|
|
58
|
+
"name": "Guide : dépannage",
|
|
59
|
+
"description": "Symptôme, cause, correctif, en commençant par les pannes silencieuses qui ne produisent aucune ligne de log : clients bloqués, emplacements coincés, listes d'outils périmées, origines refusées."
|
|
24
60
|
}
|
|
25
61
|
},
|
|
26
62
|
"templates": {
|
|
27
63
|
"broker://providers/{name}": {
|
|
28
64
|
"name": "Provider du broker",
|
|
29
65
|
"description": "Snapshot d'un emplacement de provider spécifique, identifié par son nom."
|
|
66
|
+
},
|
|
67
|
+
"broker://guide/{topic}": {
|
|
68
|
+
"name": "Page du guide du broker",
|
|
69
|
+
"description": "Une page de la documentation d'intégration du broker, identifiée par son sujet : index, publish-provider, connect-client, host-config, deploy ou troubleshooting."
|
|
30
70
|
}
|
|
31
71
|
}
|
|
32
72
|
}
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": "provider 的精确名称(区分大小写)。"
|
|
13
13
|
}
|
|
14
|
+
},
|
|
15
|
+
"broker_guide": {
|
|
16
|
+
"description": "以 Markdown 返回 broker 自带的集成文档:如何把 MCP 服务器发布到槽位、如何以客户端身份连接槽位、如何配置 MCP 宿主、如何部署,以及一份从症状到修复的排错页面。请读这里,不要去找 README。不带参数时返回索引。",
|
|
17
|
+
"properties": {
|
|
18
|
+
"topic": "要返回的页面:index、publish-provider、connect-client、host-config、deploy 或 troubleshooting。省略则返回索引,索引会说明接下来该读哪一页。"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"broker_diagnose": {
|
|
22
|
+
"description": "返回 broker 的实时状态,以及它能在自身接线中检测到的问题,每一项都带有症状、证据和可直接执行的修复方法。出问题时先调用它:它会替你关联各项计数并指出原因。",
|
|
23
|
+
"properties": {
|
|
24
|
+
"slot": "把报告限定到某一个 provider 槽位(区分大小写)。省略则诊断整个 broker。"
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
27
|
},
|
|
16
28
|
"resources": {
|
|
@@ -21,12 +33,40 @@
|
|
|
21
33
|
"broker://providers": {
|
|
22
34
|
"name": "Broker Providers",
|
|
23
35
|
"description": "Broker 已知的所有 provider 槽位列表,包括未连接的。"
|
|
36
|
+
},
|
|
37
|
+
"broker://guide/index": {
|
|
38
|
+
"name": "指南索引",
|
|
39
|
+
"description": "broker 是什么、最容易搞错且代价最高的传输与路径配对规则,以及接下来该读哪一页指南。"
|
|
40
|
+
},
|
|
41
|
+
"broker://guide/publish-provider": {
|
|
42
|
+
"name": "指南:发布 provider",
|
|
43
|
+
"description": "把一个 MCP 服务器放进槽位:传输与路径的配对规则、帧格式、加入聚合槽位的方式、连接/注册/释放的生命周期,以及浏览器端的限制。"
|
|
44
|
+
},
|
|
45
|
+
"broker://guide/connect-client": {
|
|
46
|
+
"name": "指南:连接客户端",
|
|
47
|
+
"description": "以客户端身份连接槽位:四种客户端传输、保留槽位 _broker 与 _all、来源(Origin)校验、授权,以及可能收到的全部错误码。"
|
|
48
|
+
},
|
|
49
|
+
"broker://guide/host-config": {
|
|
50
|
+
"name": "指南:MCP 宿主配置",
|
|
51
|
+
"description": "配置 Claude Desktop 或其他 stdio MCP 宿主:为什么桥接必须指向 _all、配置范例、一个端口只能有一个 broker 的规则,以及匿名主体带来的隐患。"
|
|
52
|
+
},
|
|
53
|
+
"broker://guide/deploy": {
|
|
54
|
+
"name": "指南:部署 broker",
|
|
55
|
+
"description": "把 broker 作为库嵌入或作为进程运行:启动顺序、拓扑结构、配置文件、静态文件、TLS 和关闭流程。"
|
|
56
|
+
},
|
|
57
|
+
"broker://guide/troubleshooting": {
|
|
58
|
+
"name": "指南:排错",
|
|
59
|
+
"description": "症状、原因、修复,从那些不产生任何日志的静默故障开始:客户端挂起、槽位被占死、工具列表过期、来源被拒。"
|
|
24
60
|
}
|
|
25
61
|
},
|
|
26
62
|
"templates": {
|
|
27
63
|
"broker://providers/{name}": {
|
|
28
64
|
"name": "Broker Provider",
|
|
29
65
|
"description": "指定名称的 provider 槽位快照。"
|
|
66
|
+
},
|
|
67
|
+
"broker://guide/{topic}": {
|
|
68
|
+
"name": "Broker 指南页面",
|
|
69
|
+
"description": "broker 集成文档中的一页,按主题寻址:index、publish-provider、connect-client、host-config、deploy 或 troubleshooting。"
|
|
30
70
|
}
|
|
31
71
|
}
|
|
32
72
|
}
|