telique-mcp 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { stdin } from "node:process";
|
|
3
3
|
const subcommand = process.argv[2];
|
|
4
|
-
|
|
4
|
+
// If run with "setup" arg, or directly in a terminal (not piped by an MCP client),
|
|
5
|
+
// launch the interactive setup flow.
|
|
6
|
+
const isInteractiveTerminal = subcommand !== "serve" && stdin.isTTY === true;
|
|
7
|
+
if (subcommand === "setup" || isInteractiveTerminal) {
|
|
5
8
|
const { runSetup } = await import("./setup.js");
|
|
6
9
|
await runSetup();
|
|
7
10
|
}
|
|
8
11
|
else {
|
|
12
|
+
// MCP server mode — stdin is piped JSON-RPC from the MCP client
|
|
9
13
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
10
14
|
const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
11
15
|
const { TeliqueClient } = await import("./client.js");
|
|
16
|
+
const { loadConfig } = await import("./config.js");
|
|
12
17
|
const { setAnonymousMode } = await import("./utils/formatting.js");
|
|
13
18
|
const { registerRoutelinkTools } = await import("./tools/routelink.js");
|
|
14
19
|
const { registerLrnTools } = await import("./tools/lrn.js");
|