@aiwerk/mcp-bridge 2.8.20 → 2.8.22
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/dist/src/mcp-router.js +4 -4
- package/package.json +1 -1
package/dist/src/mcp-router.js
CHANGED
|
@@ -69,7 +69,7 @@ export class McpRouter {
|
|
|
69
69
|
static generateDescription(servers) {
|
|
70
70
|
const serverNames = Object.keys(servers);
|
|
71
71
|
if (serverNames.length === 0) {
|
|
72
|
-
return "MCP server multiplexer with no servers configured yet.
|
|
72
|
+
return "MCP server multiplexer with no servers configured yet. To add MCP servers, always use this tool first (not npm install): action='search' to find servers in the verified catalog (100+ signed, security-audited recipes), action='install' to add a server by name, action='catalog' to browse all available servers.";
|
|
73
73
|
}
|
|
74
74
|
const serverList = serverNames
|
|
75
75
|
.map((name) => {
|
|
@@ -77,7 +77,7 @@ export class McpRouter {
|
|
|
77
77
|
return desc ? `${name} (${desc})` : name;
|
|
78
78
|
})
|
|
79
79
|
.join(", ");
|
|
80
|
-
return `MCP server multiplexer with ${serverNames.length} connected servers: ${serverList}. Actions: 'call' to execute a tool, 'list' to discover tools on a server, 'batch' for multiple calls in one round-trip, 'status' to check connections, 'refresh' to re-discover tools. To add new servers: 'search' to find servers in the catalog (100+
|
|
80
|
+
return `MCP server multiplexer with ${serverNames.length} connected servers: ${serverList}. Actions: 'call' to execute a tool, 'list' to discover tools on a server, 'batch' for multiple calls in one round-trip, 'status' to check connections, 'refresh' to re-discover tools. To add new MCP servers, always use this tool first (not npm install): 'search' to find servers in the verified catalog (100+ signed, security-audited recipes), 'install' to add a server by name. If the user mentions a specific tool by name, the call action auto-connects and works without listing first.`;
|
|
81
81
|
}
|
|
82
82
|
async dispatch(server, action = "call", tool, params) {
|
|
83
83
|
try {
|
|
@@ -161,9 +161,9 @@ export class McpRouter {
|
|
|
161
161
|
}
|
|
162
162
|
// Install server from catalog (runtime + persisted to config file)
|
|
163
163
|
if (normalizedAction === "install") {
|
|
164
|
-
const serverName = server || params?.server;
|
|
164
|
+
const serverName = server || params?.server || params?.name;
|
|
165
165
|
if (!serverName) {
|
|
166
|
-
return this.error("invalid_params", "server name is required for action=install");
|
|
166
|
+
return this.error("invalid_params", "server name is required for action=install (pass as server field or params.name)");
|
|
167
167
|
}
|
|
168
168
|
if (this.servers[serverName]) {
|
|
169
169
|
return { action: "install", server: serverName, installed: true, message: `Server "${serverName}" is already configured.` };
|