@holin-work/holin-cli 1.3.5 → 1.3.6

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/bin/holin-cli.js +11 -3
  2. package/package.json +1 -1
package/bin/holin-cli.js CHANGED
@@ -218,10 +218,18 @@ function createProxyServer() {
218
218
 
219
219
  log(`[proxy] → ${req.method} ${req.url} body=${bodyPreview}`);
220
220
 
221
- // Block OAuth discovery probes — return 401 so platform knows auth is required
221
+ // OAuth discovery probes — return standard protected-resource metadata
222
+ // so the host knows this MCP server requires authentication even when connected.
223
+ // RFC 9728: /.well-known/oauth-protected-resource must return 200 + JSON describing the auth requirement.
224
+ // Returning 401 here causes some hosts to show "does not require authentication".
222
225
  if (req.url.startsWith("/.well-known/")) {
223
- const body = JSON.stringify({ error: "unauthorized" });
224
- res.writeHead(401, { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) });
226
+ const body = JSON.stringify({
227
+ resource: `http://${PROXY_HOST}:${PROXY_PORT}`,
228
+ authorization_servers: [],
229
+ bearer_methods_supported: ["header"],
230
+ resource_documentation: "https://holin.work/docs/api",
231
+ });
232
+ res.writeHead(200, { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) });
225
233
  res.end(body);
226
234
  return;
227
235
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holin-work/holin-cli",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "Holin CLI — Accio plugin authorization tool for ICBU batch listing",
5
5
  "type": "module",
6
6
  "bin": {