MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / createServer

Function createServer

src/server/factory.ts:23–42  ·  view source on GitHub ↗
(options: ServerOptions, registerHandlers?: RegisterHandlers)

Source from the content-addressed store, hash-verified

21 * Optionally registers handlers via the provided callback.
22 */
23export function createServer(options: ServerOptions, registerHandlers?: RegisterHandlers): Server {
24 const server = new Server(
25 {
26 name: options.name,
27 version: options.version
28 },
29 {
30 capabilities: {
31 tools: {},
32 resources: {}
33 }
34 }
35 );
36
37 if (registerHandlers) {
38 registerHandlers(server);
39 }
40
41 return server;
42}

Callers 2

createSessionServerFunction · 0.70
ensureMcpRuntimeLoadedFunction · 0.50

Calls 1

registerHandlersFunction · 0.85

Tested by

no test coverage detected