forked from NateBJones-Projects/OB1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.ts
More file actions
21 lines (18 loc) · 833 Bytes
/
Copy pathserver.ts
File metadata and controls
21 lines (18 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ✅ Module-scope McpServer singleton — constructed exactly ONCE per cold-start.
//
// Each tool module exports a `register(server)` function called once at module
// load. Adding a new extension means: drop a new file in `tools/`, add one
// import, add one `register()` call. No per-request reconstruction.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { register as registerOpenBrain } from "./tools/open-brain.ts";
import { register as registerHousehold } from "./tools/household.ts";
import { register as registerMeal } from "./tools/meal.ts";
import { register as registerCrm } from "./tools/crm.ts";
export const server = new McpServer({
name: "open-brain-unified",
version: "2.0.0",
});
registerOpenBrain(server);
registerHousehold(server);
registerMeal(server);
registerCrm(server);