mcpscraper-memory 1.18.0 → 1.19.0
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 +21 -1
- package/dist/bin/mcp-stdio-server.js +122 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ All notable changes to MCP Memory are documented here. The format is based on [K
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.19.0] - 2026-08-27
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added authenticated MCP Scraper artifact resolution for Gmail file and image attachments, with owner binding, filename and MIME preservation, a 25 MiB ceiling, and SHA-256 verification before private storage.
|
|
12
|
+
- Added generated `file_asset_save` and `file_asset_get` contracts to the hosted and standalone Memory server alongside the existing image tools.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Gmail attachment replay now uses stable source references so the same provider part deduplicates even when an upstream aggregate artifact receives a new ID.
|
|
17
|
+
- Pinned the corrected database package and omitted source maps from the public npm artifact.
|
|
18
|
+
- Hosted builds now fail unless the generated Vercel function contains and can import the exact released database and tools dependencies.
|
|
19
|
+
|
|
20
|
+
## [1.18.1] - 2026-08-13
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Build the standalone stdio CLI automatically before packing and publishing so the npm artifact contains its declared executable and source map.
|
|
25
|
+
|
|
7
26
|
## [1.18.0] - 2026-08-13
|
|
8
27
|
|
|
9
28
|
### Added
|
|
@@ -166,7 +185,8 @@ All notable changes to MCP Memory are documented here. The format is based on [K
|
|
|
166
185
|
- The hosted service now consumes `mcpscraper-memory-db` 1.5 and `mcpscraper-memory-tools` 1.6, aligning direct OAuth and stdio clients with the current 14-vault Smart RAG contract, including bounded multi-query retrieval, graph expansion, and Jina reranking metadata.
|
|
167
186
|
- Server guidance now documents the Skills vault and the exact hybrid retrieval workflow exposed by `memory-search`.
|
|
168
187
|
|
|
169
|
-
[Unreleased]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.18.
|
|
188
|
+
[Unreleased]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.18.1...HEAD
|
|
189
|
+
[1.18.1]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.18.0...v1.18.1
|
|
170
190
|
[1.18.0]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.17.2...v1.18.0
|
|
171
191
|
[1.17.2]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.17.1...v1.17.2
|
|
172
192
|
[1.17.1]: https://github.com/VilovietaSEO/mcp-memory/compare/v1.17.0...v1.17.1
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// bin/mcp-stdio-server.ts
|
|
4
|
+
import { readFileSync } from "fs";
|
|
5
|
+
import { homedir } from "os";
|
|
6
|
+
import { join } from "path";
|
|
7
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
|
+
import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
|
|
11
|
+
// src/version.ts
|
|
12
|
+
var PACKAGE_VERSION = "1.19.0";
|
|
13
|
+
|
|
14
|
+
// bin/mcp-stdio-server.ts
|
|
15
|
+
var wantsHelp = process.argv.includes("--help") || process.argv.includes("-h");
|
|
16
|
+
var forceStdio = process.argv.includes("--stdio") || process.env.MCP_MEMORY_FORCE_STDIO === "1";
|
|
17
|
+
var interactiveTerminal = Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
18
|
+
function readApiKeyFile() {
|
|
19
|
+
const explicitPath = process.env.MCP_MEMORY_KEY_PATH?.trim();
|
|
20
|
+
const paths = [explicitPath, join(homedir(), ".mcp-memory-key")].filter(Boolean);
|
|
21
|
+
for (const path of paths) {
|
|
22
|
+
try {
|
|
23
|
+
const value = readFileSync(path, "utf8").trim();
|
|
24
|
+
if (value) return value;
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
var apiKey = (process.env.MCP_MEMORY_API_KEY ?? process.env.MCP_MEMORY_KEY ?? readApiKeyFile())?.trim();
|
|
31
|
+
function renderHelp() {
|
|
32
|
+
const status = apiKey ? "configured" : "NOT configured";
|
|
33
|
+
return [
|
|
34
|
+
`mcp-memory v${PACKAGE_VERSION} \u2014 local stdio bridge to memory.mcpscraper.dev`,
|
|
35
|
+
"",
|
|
36
|
+
`API key: ${status}`,
|
|
37
|
+
"",
|
|
38
|
+
"This package is a thin proxy: every tool call is forwarded over HTTPS to",
|
|
39
|
+
"your hosted mcp-memory account, the same one used by the OAuth remote",
|
|
40
|
+
"connector. Nothing runs or is stored locally.",
|
|
41
|
+
"",
|
|
42
|
+
"Setup:",
|
|
43
|
+
" 1. Get your key from memory.mcpscraper.dev (or the mobile automations link).",
|
|
44
|
+
" 2. Set it: export MCP_MEMORY_API_KEY=mk_...",
|
|
45
|
+
" (or write it to ~/.mcp-memory-key)",
|
|
46
|
+
" 3. Add to your MCP client config:",
|
|
47
|
+
' { "command": "npx", "args": ["-y", "mcpscraper-memory"],',
|
|
48
|
+
' "env": { "MCP_MEMORY_API_KEY": "mk_..." } }',
|
|
49
|
+
"",
|
|
50
|
+
"Flags: --stdio (skip this screen and run directly), --help",
|
|
51
|
+
""
|
|
52
|
+
].join("\n");
|
|
53
|
+
}
|
|
54
|
+
if (!forceStdio && (interactiveTerminal || wantsHelp)) {
|
|
55
|
+
process.stdout.write(renderHelp());
|
|
56
|
+
process.exit(0);
|
|
57
|
+
}
|
|
58
|
+
if (!apiKey) {
|
|
59
|
+
process.stderr.write("MCP_MEMORY_API_KEY env var or ~/.mcp-memory-key is required\n");
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
var baseUrl = (process.env.MCP_MEMORY_BASE_URL?.trim() || "https://memory.mcpscraper.dev").replace(/\/$/, "");
|
|
63
|
+
var remoteUrl = `${baseUrl}/mcp`;
|
|
64
|
+
var rpcId = 0;
|
|
65
|
+
function parseRpcBody(text) {
|
|
66
|
+
const dataLine = text.split("\n").find((line) => line.startsWith("data:"));
|
|
67
|
+
const payload = dataLine ? dataLine.slice(5).trim() : text;
|
|
68
|
+
return JSON.parse(payload);
|
|
69
|
+
}
|
|
70
|
+
async function rpc(method, params) {
|
|
71
|
+
const res = await fetch(remoteUrl, {
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers: {
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
Accept: "application/json, text/event-stream",
|
|
76
|
+
Authorization: `Bearer ${apiKey}`
|
|
77
|
+
},
|
|
78
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: ++rpcId, method, params })
|
|
79
|
+
});
|
|
80
|
+
const text = await res.text();
|
|
81
|
+
if (!res.ok) {
|
|
82
|
+
throw new Error(`mcp-memory HTTP ${res.status}: ${text.slice(0, 500)}`);
|
|
83
|
+
}
|
|
84
|
+
const body = parseRpcBody(text);
|
|
85
|
+
if (body.error) throw new Error(body.error.message ?? "remote mcp-memory error");
|
|
86
|
+
return body.result;
|
|
87
|
+
}
|
|
88
|
+
async function main() {
|
|
89
|
+
let remoteInfo = {};
|
|
90
|
+
try {
|
|
91
|
+
remoteInfo = await rpc("initialize", {
|
|
92
|
+
protocolVersion: "2025-06-18",
|
|
93
|
+
capabilities: {},
|
|
94
|
+
clientInfo: { name: "mcp-memory-stdio-proxy", version: PACKAGE_VERSION }
|
|
95
|
+
});
|
|
96
|
+
} catch (err) {
|
|
97
|
+
process.stderr.write(`Failed to reach ${remoteUrl}: ${err instanceof Error ? err.message : String(err)}
|
|
98
|
+
`);
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
const server = new Server(
|
|
102
|
+
{ name: "mcp-memory", version: PACKAGE_VERSION },
|
|
103
|
+
{ capabilities: { tools: {} }, instructions: remoteInfo.instructions }
|
|
104
|
+
);
|
|
105
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
106
|
+
const result = await rpc("tools/list");
|
|
107
|
+
return { tools: result.tools };
|
|
108
|
+
});
|
|
109
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
110
|
+
return await rpc("tools/call", {
|
|
111
|
+
name: request.params.name,
|
|
112
|
+
arguments: request.params.arguments
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
const transport = new StdioServerTransport();
|
|
116
|
+
await server.connect(transport);
|
|
117
|
+
}
|
|
118
|
+
main().catch((err) => {
|
|
119
|
+
process.stderr.write(`${err instanceof Error ? err.message : String(err)}
|
|
120
|
+
`);
|
|
121
|
+
process.exit(1);
|
|
122
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpscraper-memory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "mcp-memory — a hosted, multi-tenant, access-controlled per-user Obsidian/Neon memory exposed AS an MCP server, with a scheduled optimization layer. Its own standalone MCP product.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "mastra dev",
|
|
25
|
-
"build": "mastra build",
|
|
25
|
+
"build": "mastra build && node scripts/verify-mastra-build.mjs",
|
|
26
26
|
"build:cli": "tsup",
|
|
27
|
+
"prepack": "npm run build:cli",
|
|
27
28
|
"test": "node --import tsx --test tests/*.test.mjs src/mastra/mcp/tools/*.test.ts",
|
|
28
29
|
"typecheck": "tsc --noEmit"
|
|
29
30
|
},
|
|
@@ -33,8 +34,8 @@
|
|
|
33
34
|
"@mastra/mcp": "latest",
|
|
34
35
|
"@mastra/pg": "latest",
|
|
35
36
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
36
|
-
"mcpscraper-memory-db": "1.
|
|
37
|
-
"mcpscraper-memory-tools": "1.
|
|
37
|
+
"mcpscraper-memory-db": "1.15.1",
|
|
38
|
+
"mcpscraper-memory-tools": "1.16.0",
|
|
38
39
|
"zod": "^3.25.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|