@zibby/mcp-cli 0.2.0 → 0.2.1
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/index.js +5 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -517,14 +517,17 @@ server.tool(
|
|
|
517
517
|
const APPS_API_BASE = `${API_BASE}/apps`;
|
|
518
518
|
|
|
519
519
|
async function callAppsAPI(path, opts = {}) {
|
|
520
|
+
// /catalog and /catalog/{appType} are public — let unauthenticated
|
|
521
|
+
// calls through (server enforces auth on the rest). Auth-required
|
|
522
|
+
// endpoints return 401 from the backend and we surface that to the
|
|
523
|
+
// tool caller; no need to gate here.
|
|
520
524
|
const token = getSessionToken();
|
|
521
|
-
if (!token) return { error: 'not logged in', status: 401 };
|
|
522
525
|
const url = `${APPS_API_BASE}${path}`;
|
|
523
526
|
const init = {
|
|
524
527
|
method: opts.method || 'GET',
|
|
525
528
|
headers: {
|
|
526
529
|
'Content-Type': 'application/json',
|
|
527
|
-
Authorization: `Bearer ${token}
|
|
530
|
+
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
|
528
531
|
...(opts.headers || {}),
|
|
529
532
|
},
|
|
530
533
|
};
|
package/package.json
CHANGED