@synth-coder/memhub 0.1.4 → 0.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.
- package/README.md +2 -2
- package/README.zh-CN.md +1 -1
- package/package.json +1 -1
- package/src/server/mcp-server.ts +3 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Example MCP client config:
|
|
|
72
72
|
"command": "npx",
|
|
73
73
|
"args": ["-y", "@synth-coder/memhub"],
|
|
74
74
|
"env": {
|
|
75
|
-
"MEMHUB_STORAGE_PATH": "/absolute/path/to
|
|
75
|
+
"MEMHUB_STORAGE_PATH": "/absolute/path/to/.memhub",
|
|
76
76
|
"MEMHUB_LOG_LEVEL": "info"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -97,7 +97,7 @@ Example MCP client config:
|
|
|
97
97
|
|
|
98
98
|
## Environment Variables
|
|
99
99
|
|
|
100
|
-
- `MEMHUB_STORAGE_PATH` (default:
|
|
100
|
+
- `MEMHUB_STORAGE_PATH` (default: `~/.memhub`)
|
|
101
101
|
- `MEMHUB_LOG_LEVEL` (default: `info`, options: `debug|info|warn|error`)
|
|
102
102
|
|
|
103
103
|
---
|
package/README.zh-CN.md
CHANGED
package/package.json
CHANGED
package/src/server/mcp-server.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { readFileSync } from 'fs';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
|
+
import { homedir } from 'os';
|
|
10
11
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
11
12
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
12
13
|
import {
|
|
@@ -37,7 +38,8 @@ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as Packag
|
|
|
37
38
|
* Create McpServer instance using SDK
|
|
38
39
|
*/
|
|
39
40
|
export function createMcpServer(): Server {
|
|
40
|
-
const
|
|
41
|
+
const defaultStoragePath = join(homedir(), '.memhub');
|
|
42
|
+
const storagePath = process.env.MEMHUB_STORAGE_PATH || defaultStoragePath;
|
|
41
43
|
const memoryService = new MemoryService({ storagePath });
|
|
42
44
|
|
|
43
45
|
// Create server using SDK
|