@softtechai/quickmcp 1.1.2 → 1.1.5

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.
@@ -0,0 +1,5 @@
1
+ # QuickMCP package defaults (used when no local .env is provided)
2
+ AUTH_DEFAULT_USERNAME=guest
3
+ AUTH_ADMIN_USERS=[{"username":"admin","password":"admin123"}]
4
+ AUTH_ACCESS_TOKEN_TTL_SEC=1800
5
+ AUTH_REFRESH_TOKEN_TTL_SEC=2592000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softtechai/quickmcp",
3
- "version": "1.1.2",
3
+ "version": "1.1.5",
4
4
  "description": "An application to generate MCP servers from various data sources and test them",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -21,6 +21,7 @@
21
21
  "files": [
22
22
  "dist",
23
23
  "quickmcp-direct-stdio.js",
24
+ ".env.onprem.defaults",
24
25
  "src/web/public",
25
26
  "README.md",
26
27
  "LICENSE"
@@ -12,10 +12,28 @@ try {
12
12
  }
13
13
 
14
14
  if (dotenv) {
15
- // Load .env from script directory first (works with Claude Desktop custom CWD),
16
- // then fallback to process CWD.
17
- dotenv.config({ path: path.join(__dirname, '.env') });
18
- dotenv.config();
15
+ // `dotenv` does not override existing process.env values.
16
+ // Priority:
17
+ // 1) Explicit path (DOTENV_CONFIG_PATH / QUICKMCP_ENV_FILE)
18
+ // 2) If running via npx: only package defaults
19
+ // 3) Otherwise (local/dev): local .env, package .env, then package defaults
20
+ const explicitEnvPath = process.env.DOTENV_CONFIG_PATH || process.env.QUICKMCP_ENV_FILE;
21
+ const normalizedDir = String(__dirname || '').split(path.sep).join('/');
22
+ const isNpxRuntime = normalizedDir.includes('/.npm/_npx/');
23
+
24
+ if (explicitEnvPath) {
25
+ dotenv.config({ path: explicitEnvPath });
26
+ }
27
+
28
+ if (isNpxRuntime) {
29
+ dotenv.config({ path: path.join(__dirname, '.env.onprem.defaults') });
30
+ //dotenv.config({ path: path.join(__dirname, '.env.defaults') }); // backward-compat fallback
31
+ } else {
32
+ dotenv.config({ path: path.join(process.cwd(), '.env') });
33
+ dotenv.config({ path: path.join(__dirname, '.env') });
34
+ //dotenv.config({ path: path.join(__dirname, '.env.onprem.defaults') });
35
+ //dotenv.config({ path: path.join(__dirname, '.env.defaults') }); // backward-compat fallback
36
+ }
19
37
  }
20
38
 
21
39
  let logger;
@@ -262,7 +280,12 @@ function safeStartWebServer(port) {
262
280
  process.prependOnceListener('uncaughtException', handler);
263
281
  try {
264
282
  logger.error(`[QuickMCP] Starting Web UI at http://localhost:${port || process.env.PORT || 3000}`);
265
- require('./dist/server/server.js');
283
+ const webModule = require('./dist/server/server.js');
284
+ if (webModule && typeof webModule.startServer === 'function') {
285
+ webModule.startServer();
286
+ } else {
287
+ throw new Error('dist/server/server.js does not export startServer()');
288
+ }
266
289
  } catch (e) {
267
290
  // Synchronous load error
268
291
  process.removeListener('uncaughtException', handler);