kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 59 lines 1.8 kB view raw
1import { stdin as input } from "node:process"; 2import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; 3import { runInstall } from "./install/index.js"; 4import { createMcpServer } from "./server.js"; 5 6const SERVE_ALIASES = new Set(["serve", "server", "stdio", "run"]); 7 8export async function runCli(): Promise<void> { 9 const argv = process.argv.slice(2); 10 if (argv[0] === "-h" || argv[0] === "--help" || argv[0] === "help") { 11 printMainHelp(); 12 return; 13 } 14 if (argv[0] === "install" || argv[0] === "setup") { 15 await runInstall(argv.slice(1)); 16 return; 17 } 18 if (argv[0] !== undefined) { 19 if (SERVE_ALIASES.has(argv[0])) { 20 await startMcpServer(); 21 return; 22 } 23 console.error(`Unknown command: ${argv[0]}`); 24 printMainHelp(); 25 process.exitCode = 1; 26 return; 27 } 28 if (input.isTTY) { 29 await runInstall([]); 30 return; 31 } 32 await startMcpServer(); 33} 34 35async function startMcpServer(): Promise<void> { 36 const server = createMcpServer(); 37 const transport = new StdioServerTransport(); 38 await server.connect(transport); 39} 40 41function printMainHelp(): void { 42 console.log(`kaneo-mcp — Kaneo MCP server (stdio transport) 43 44Usage: 45 npx @kaneo/mcp Interactive installer (terminal only; no global install) 46 kaneo-mcp Same: installer in a TTY; MCP server when stdin is piped 47 kaneo-mcp install Register in Cursor / Claude / a custom path (explicit) 48 kaneo-mcp serve Run the MCP server (use from a terminal to test stdio) 49 kaneo-mcp help 50 51Options: 52 -h, --help Show this help 53 54MCP clients (Cursor, etc.) run this process with a pipe, so they get the server. 55In a normal terminal, the default is the interactive installer. 56 57See also: kaneo-mcp install --help 58`); 59}