oh-memos-mcp 2.0.0 → 2.0.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/CHANGELOG.md +12 -0
- package/dist/server.js +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ This project follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [2.0.1] — 2026-08-02
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- MCP `serverInfo` was hardcoded in `server.ts` and reported
|
|
14
|
+
`{name: "memos-memory", version: "1.0.1"}` — a name matching neither the
|
|
15
|
+
package (`oh-memos-mcp`) nor the conventional server key (`oh-memos`), and a
|
|
16
|
+
version that 2.0.0 shipped stale. Clients display this during the handshake.
|
|
17
|
+
It is now read from `package.json` at startup, so it cannot drift again.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
9
21
|
## [2.0.0] — 2026-08-02
|
|
10
22
|
|
|
11
23
|
### ⚠️ Breaking — tool surface consolidated from 18 to 10
|
package/dist/server.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
6
9
|
import { MEMOS_DEFAULT_CUBE, MEMOS_ENABLE_DELETE, logger } from "./config.js";
|
|
7
10
|
import { waitForApiReady } from "./api-client.js";
|
|
8
11
|
import { ensureCubeRegistered } from "./cube-manager.js";
|
|
@@ -131,10 +134,13 @@ function tolerateStringArguments(transport) {
|
|
|
131
134
|
downstream(msg);
|
|
132
135
|
};
|
|
133
136
|
}
|
|
137
|
+
// serverInfo 从 package.json 读取,而非硬编码 —— 硬编码会在每次发版后
|
|
138
|
+
// 悄悄漂移(2.0.0 发布时这里仍报 1.0.1)。dist/server.js 的上一级即包根。
|
|
139
|
+
const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf8"));
|
|
134
140
|
export async function runServer() {
|
|
135
141
|
const server = new McpServer({
|
|
136
|
-
name:
|
|
137
|
-
version:
|
|
142
|
+
name: pkg.name,
|
|
143
|
+
version: pkg.version,
|
|
138
144
|
});
|
|
139
145
|
registerTools(server);
|
|
140
146
|
const transport = new StdioServerTransport();
|