stdio-main.mjs
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
1 day ago
| 1 | #!/usr/bin/env node |
| 2 | /** |
| 3 | * Knowtation MCP — stdio transport (default). See mcp/server.mjs for HTTP routing. |
| 4 | */ |
| 5 | import '../lib/load-env.mjs'; |
| 6 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; |
| 7 | import { loadConfig } from '../lib/config.mjs'; |
| 8 | import { createKnowtationMcpServer } from './create-server.mjs'; |
| 9 | import { startVaultResourceWatcher } from './resource-subscriptions.mjs'; |
| 10 | |
| 11 | const server = createKnowtationMcpServer(); |
| 12 | |
| 13 | async function main() { |
| 14 | const transport = new StdioServerTransport(); |
| 15 | await server.connect(transport); |
| 16 | try { |
| 17 | const config = loadConfig(); |
| 18 | startVaultResourceWatcher(server, config.vault_path); |
| 19 | } catch (_) { |
| 20 | /* invalid config: tools will fail until fixed */ |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | main().catch((err) => { |
| 25 | console.error(err.message || err); |
| 26 | process.exit(1); |
| 27 | }); |
File History
1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
1 day ago