@tsed/platform-mcp 8.38.0-beta.3 → 8.38.0-beta.5
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.
|
@@ -8,14 +8,7 @@ function collectTokens(type, configured = []) {
|
|
|
8
8
|
.forEach((provider) => tokens.add(provider.token));
|
|
9
9
|
return [...tokens];
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
* Injectable MCP server instance configured with registered tools, resources, and prompts.
|
|
13
|
-
*
|
|
14
|
-
* @module platform/mcp
|
|
15
|
-
* @since 8.17.0
|
|
16
|
-
*/
|
|
17
|
-
export const MCP_SERVER = injectable(McpServer)
|
|
18
|
-
.factory(() => {
|
|
11
|
+
export function createMcpServer() {
|
|
19
12
|
const settings = constant("mcp", {}) || {};
|
|
20
13
|
const name = settings.name || constant("name") || "tsed-mcp";
|
|
21
14
|
const version = settings.version || constant("version") || "0.0.0";
|
|
@@ -53,5 +46,11 @@ export const MCP_SERVER = injectable(McpServer)
|
|
|
53
46
|
server.registerPrompt(name || String(token), opts, handler);
|
|
54
47
|
});
|
|
55
48
|
return server;
|
|
56
|
-
}
|
|
57
|
-
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Injectable MCP server instance configured with registered tools, resources, and prompts.
|
|
52
|
+
*
|
|
53
|
+
* @module platform/mcp
|
|
54
|
+
* @since 8.17.0
|
|
55
|
+
*/
|
|
56
|
+
export const MCP_SERVER = injectable(McpServer).factory(createMcpServer).token();
|