Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit 918ffc6

Browse files
committed
fix: recreate createMCPServer functio
1 parent 999a49b commit 918ffc6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

packages/mcp-use/src/server/mcp-server.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,3 +550,15 @@ export class McpServer {
550550
}
551551

552552
export type McpServerInstance = Omit<McpServer, keyof Express> & Express
553+
554+
/**
555+
* Create a new MCP server instance
556+
*/
557+
export function createMCPServer(name: string, config: Partial<ServerConfig> = {}): McpServerInstance {
558+
const instance = new McpServer({
559+
name,
560+
version: config.version || '1.0.0',
561+
description: config.description,
562+
})
563+
return instance as unknown as McpServerInstance
564+
}

0 commit comments

Comments
 (0)