telique-mcp 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/setup.js +56 -0
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -118,6 +118,30 @@ function detectMcpClients() {
118
118
  register: (token) => registerJsonConfig(claudeDesktopConfig, token),
119
119
  });
120
120
  }
121
+ // Codex CLI
122
+ if (commandExists("codex")) {
123
+ clients.push({
124
+ name: "Codex CLI",
125
+ register: (token) => registerCodex(token),
126
+ });
127
+ }
128
+ // ChatGPT Desktop (UI-only — detect but provide instructions)
129
+ if (isChatGptDesktopInstalled()) {
130
+ clients.push({
131
+ name: "ChatGPT Desktop (manual)",
132
+ register: (token) => {
133
+ console.log("\n ChatGPT Desktop requires manual setup:");
134
+ console.log(" 1. Open ChatGPT Desktop → Settings → Developer Mode");
135
+ console.log(" 2. Add a new MCP server with:");
136
+ console.log(` Command: npx`);
137
+ console.log(` Args: -y telique-mcp`);
138
+ if (token) {
139
+ console.log(` Env: TELIQUE_API_TOKEN=${token}`);
140
+ }
141
+ return true;
142
+ },
143
+ });
144
+ }
121
145
  return clients;
122
146
  }
123
147
  function registerClaudeCode(token) {
@@ -143,6 +167,38 @@ function registerClaudeCode(token) {
143
167
  return false;
144
168
  }
145
169
  }
170
+ function registerCodex(token) {
171
+ try {
172
+ // Remove existing entry first
173
+ try {
174
+ execFileSync("codex", ["mcp", "remove", "telique"], { stdio: "ignore" });
175
+ }
176
+ catch {
177
+ // ignore
178
+ }
179
+ const args = ["mcp", "add", "telique"];
180
+ if (token) {
181
+ args.push("--env", `TELIQUE_API_TOKEN=${token}`);
182
+ }
183
+ args.push("--", "npx", "-y", "telique-mcp");
184
+ execFileSync("codex", args, { stdio: "ignore" });
185
+ return true;
186
+ }
187
+ catch {
188
+ return false;
189
+ }
190
+ }
191
+ function isChatGptDesktopInstalled() {
192
+ const home = process.env.HOME || process.env.USERPROFILE || "";
193
+ switch (process.platform) {
194
+ case "darwin":
195
+ return existsSync(`${home}/Library/Application Support/com.openai.chat`);
196
+ case "win32":
197
+ return existsSync(`${process.env.LOCALAPPDATA}/Programs/ChatGPT`);
198
+ default:
199
+ return false;
200
+ }
201
+ }
146
202
  function registerJsonConfig(configPath, token) {
147
203
  try {
148
204
  let config = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telique-mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "MCP server for Telique telecom APIs (RouteLink, LRN, CNAM, LERG)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",