@voltagent/server-core 1.0.34 → 1.0.35

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/index.js CHANGED
@@ -4511,7 +4511,7 @@ function printServerStartup(port, options = {}) {
4511
4511
  }
4512
4512
  groupMap.get(groupLabel)?.push(endpoint);
4513
4513
  });
4514
- const methodOrder = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
4514
+ const methodOrder = ["STDIO", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
4515
4515
  groupMap.forEach((endpoints, groupLabel) => {
4516
4516
  console.log();
4517
4517
  console.log(
@@ -4529,12 +4529,14 @@ function printServerStartup(port, options = {}) {
4529
4529
  methodOrder.forEach((method) => {
4530
4530
  if (methodGroups[method]) {
4531
4531
  methodGroups[method].forEach((endpoint) => {
4532
- const pathText = `${colors.white}${endpoint.path}${colors.reset}`;
4533
- const nameText = endpoint.name ? `${colors.dim} (${endpoint.name})${colors.reset}` : "";
4532
+ const isMcpStdio = groupLabel === "MCP Transport" && method === "STDIO";
4533
+ const displayPath = isMcpStdio ? 'uses stdin/stdout. Example client: { type: "stdio", command: "node", args: ["dist/index.js"] }' : endpoint.path;
4534
+ const pathText = `${colors.white}${displayPath}${colors.reset}`;
4535
+ const nameText = endpoint.name && !isMcpStdio ? `${colors.dim} (${endpoint.name})${colors.reset}` : "";
4534
4536
  console.log(
4535
4537
  `${colors.dim} ${method.padEnd(6)} ${colors.reset}${pathText}${nameText}`
4536
4538
  );
4537
- if (endpoint.description) {
4539
+ if (endpoint.description && !isMcpStdio) {
4538
4540
  console.log(`${colors.dim} ${endpoint.description}${colors.reset}`);
4539
4541
  }
4540
4542
  });
@@ -5409,9 +5411,59 @@ var BaseServerProvider = class {
5409
5411
  });
5410
5412
  }, "addRoutes");
5411
5413
  const mcpRegistry = this.deps.mcp?.registry;
5412
- const registeredMcpServers = mcpRegistry && typeof mcpRegistry.list === "function" ? mcpRegistry.list() : [];
5414
+ const registeredMcpServers = mcpRegistry && typeof mcpRegistry.listMetadata === "function" ? mcpRegistry.listMetadata() : [];
5413
5415
  if (registeredMcpServers.length > 0) {
5414
5416
  addRoutes(MCP_ROUTES, "MCP Endpoints");
5417
+ registeredMcpServers.forEach((server) => {
5418
+ const protocols = server.protocols ?? {};
5419
+ const httpEnabled = protocols.http ?? true;
5420
+ const sseEnabled = protocols.sse ?? true;
5421
+ const stdioEnabled = protocols.stdio ?? true;
5422
+ const { httpPath, ssePath, messagePath } = buildMcpRoutePaths(server.id);
5423
+ if (httpEnabled) {
5424
+ const key = `POST ${httpPath}`;
5425
+ if (!seen.has(key)) {
5426
+ seen.add(key);
5427
+ endpoints.push({
5428
+ method: "POST",
5429
+ path: httpPath,
5430
+ group: "MCP Transport"
5431
+ });
5432
+ }
5433
+ }
5434
+ if (stdioEnabled) {
5435
+ const stdioPath = `stdio://${server.id}`;
5436
+ const stdioKey = `STDIO ${stdioPath}`;
5437
+ if (!seen.has(stdioKey)) {
5438
+ seen.add(stdioKey);
5439
+ endpoints.push({
5440
+ method: "STDIO",
5441
+ path: stdioPath,
5442
+ group: "MCP Transport"
5443
+ });
5444
+ }
5445
+ }
5446
+ if (sseEnabled) {
5447
+ const sseKey = `GET ${ssePath}`;
5448
+ if (!seen.has(sseKey)) {
5449
+ seen.add(sseKey);
5450
+ endpoints.push({
5451
+ method: "GET",
5452
+ path: ssePath,
5453
+ group: "MCP Transport"
5454
+ });
5455
+ }
5456
+ const messageKey = `POST ${messagePath}`;
5457
+ if (!seen.has(messageKey)) {
5458
+ seen.add(messageKey);
5459
+ endpoints.push({
5460
+ method: "POST",
5461
+ path: messagePath,
5462
+ group: "MCP Transport"
5463
+ });
5464
+ }
5465
+ }
5466
+ });
5415
5467
  }
5416
5468
  const a2aRegistry = this.deps.a2a?.registry;
5417
5469
  const registeredA2AServers = a2aRegistry && typeof a2aRegistry.list === "function" ? a2aRegistry.list() : [];