server.mjs
20 lines 577 B
Raw
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge Human 13 hours ago
1 #!/usr/bin/env node
2 /**
3 * Knowtation MCP entry: stdio (default) or Streamable HTTP when MCP_TRANSPORT=http
4 * (or KNOWTATION_MCP_TRANSPORT=http). Run: node mcp/server.mjs | knowtation mcp
5 */
6
7 import '../lib/load-env.mjs';
8
9 const useHttp =
10 process.env.MCP_TRANSPORT === 'http' || process.env.KNOWTATION_MCP_TRANSPORT === 'http';
11
12 if (useHttp) {
13 const { startKnowtationMcpHttp } = await import('./http-server.mjs');
14 startKnowtationMcpHttp().catch((err) => {
15 console.error(err.message || err);
16 process.exit(1);
17 });
18 } else {
19 await import('./stdio-main.mjs');
20 }
File History 1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge Human 13 hours ago