@lessie/mcp-server 0.1.2 → 0.1.3

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/auth.js +10 -1
  2. package/package.json +1 -1
package/dist/auth.js CHANGED
@@ -21,7 +21,16 @@ import { homedir } from "node:os";
21
21
  import { REMOTE_MCP_URL } from "./config.js";
22
22
  export const DEFAULT_CALLBACK_PORT = 19836;
23
23
  export const PORT_SCAN_RANGE = 10;
24
- const STORAGE_DIR = join(homedir(), ".lessie");
24
+ function getStorageDir() {
25
+ try {
26
+ const host = new URL(REMOTE_MCP_URL).hostname;
27
+ return join(homedir(), ".lessie", host);
28
+ }
29
+ catch {
30
+ return join(homedir(), ".lessie");
31
+ }
32
+ }
33
+ const STORAGE_DIR = getStorageDir();
25
34
  const STORAGE_FILE = join(STORAGE_DIR, "oauth.json");
26
35
  const CALLBACK_TIMEOUT_MS = 120_000;
27
36
  function tryListenHttp(port) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lessie/mcp-server",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {