Files
servers/src/everything/stdio.ts
Cliff Hall c3093739ca Let Everything's STDIO server use SDK's automatic log level handling (#2706)
- bump TS SDK to 1.18.0
* In src/everything/stdio.ts
  - remove logging related imports
  - remove custom log-level handling, now handled automatically by the SDK
* In src/everything/everything.ts
  - remove console.log of sessionId
2025-09-11 17:31:49 -07:00

28 lines
671 B
JavaScript

#!/usr/bin/env node
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { createServer } from "./everything.js";
console.error('Starting default (STDIO) server...');
async function main() {
const transport = new StdioServerTransport();
const {server, cleanup, startNotificationIntervals} = createServer();
await server.connect(transport);
startNotificationIntervals();
// Cleanup on exit
process.on("SIGINT", async () => {
await cleanup();
await server.close();
process.exit(0);
});
}
main().catch((error) => {
console.error("Server error:", error);
process.exit(1);
});