@remind_ai/remind-mcp 0.1.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.
Files changed (3) hide show
  1. package/README.md +60 -0
  2. package/dist/server.js +51 -0
  3. package/package.json +29 -0
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @remind_ai/remind-mcp
2
+
3
+ An [MCP](https://modelcontextprotocol.io) server that gives any AI client
4
+ [REMind](https://www.npmjs.com/package/@remind_ai/remind)'s brain-inspired memory — with the
5
+ **MemGuard** security layer — as ready-to-call tools.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `remember(agentId, user, assistant)` | Store an exchange in long-term memory (firewalled). |
12
+ | `recall(agentId, query)` | Retrieve a fused memory context for a query. |
13
+ | `consolidate(agentId)` | Run the sleep cycle — episodes → durable beliefs. |
14
+ | `forget(agentId)` | Decay stale memories. |
15
+
16
+ ## Use it (Claude Desktop / VS Code / Cursor)
17
+
18
+ Add to your MCP config (e.g. `claude_desktop_config.json` or `.vscode/mcp.json`):
19
+
20
+ ```json
21
+ {
22
+ "mcpServers": {
23
+ "remind": {
24
+ "command": "npx",
25
+ "args": ["-y", "@remind_ai/remind-mcp"],
26
+ "env": {
27
+ "AZURE_OPENAI_ENDPOINT": "https://<resource>.openai.azure.com/",
28
+ "AZURE_OPENAI_API_KEY": "...",
29
+ "AZURE_OPENAI_CHAT_DEPLOYMENT": "...",
30
+ "AZURE_OPENAI_EMBED_DEPLOYMENT": "...",
31
+ "AZURE_SEARCH_ENDPOINT": "https://<service>.search.windows.net",
32
+ "AZURE_SEARCH_API_KEY": "...",
33
+ "COSMOS_GREMLIN_ENDPOINT": "wss://<account>.gremlin.cosmos.azure.com:443/",
34
+ "COSMOS_GREMLIN_KEY": "...",
35
+ "COSMOS_MONGO_URI": "mongodb+srv://<user>:<password>@<cluster>/",
36
+ "SYNC": "1"
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ The agent can now call `remember` / `recall` / `consolidate` / `forget` on its own.
44
+
45
+ ## Local development
46
+
47
+ ```bash
48
+ npm install
49
+ cp .env.example .env # fill in Azure creds
50
+ npm start # runs the server on stdio
51
+ ```
52
+
53
+ ## Publish
54
+
55
+ ```bash
56
+ npm publish --access public
57
+ ```
58
+
59
+ Built on the published [`@remind_ai/remind`](https://www.npmjs.com/package/@remind_ai/remind) SDK —
60
+ one brain, many doorways.
package/dist/server.js ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ // REMind MCP server — exposes brain-inspired agent memory (with MemGuard) over the
3
+ // Model Context Protocol. Any MCP client (Claude Desktop, VS Code, Cursor, …) can use
4
+ // REMind as its memory via the tools below. Communicates over stdio.
5
+ import 'dotenv/config';
6
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
7
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
8
+ import { createMemory } from '@remind_ai/remind';
9
+ import { z } from 'zod';
10
+ const mem = createMemory();
11
+ const server = new McpServer({ name: 'remind', version: '0.1.0' });
12
+ server.registerTool('remember', {
13
+ title: 'Remember',
14
+ description: 'Store a user/assistant exchange in long-term memory (firewalled by MemGuard).',
15
+ inputSchema: { agentId: z.string(), user: z.string(), assistant: z.string().default('') },
16
+ }, async ({ agentId, user, assistant }) => {
17
+ await mem.addToMemory({ agentId, messages: { user, assistant }, source: 'mcp' });
18
+ return { content: [{ type: 'text', text: 'stored' }] };
19
+ });
20
+ server.registerTool('recall', {
21
+ title: 'Recall',
22
+ description: 'Retrieve a fused memory context relevant to a query.',
23
+ inputSchema: { agentId: z.string(), query: z.string() },
24
+ }, async ({ agentId, query }) => {
25
+ const { context } = await mem.fetchMemory(agentId, query);
26
+ return { content: [{ type: 'text', text: context || '(no relevant memory)' }] };
27
+ });
28
+ server.registerTool('consolidate', {
29
+ title: 'Consolidate (sleep cycle)',
30
+ description: 'Consolidate episodic memories into durable beliefs; returns a short report.',
31
+ inputSchema: { agentId: z.string() },
32
+ }, async ({ agentId }) => {
33
+ const r = await mem.sleep(agentId);
34
+ return {
35
+ content: [
36
+ { type: 'text', text: `promoted ${r.promoted.length}, merged ${r.merged}, blocked ${r.blocked.length}` },
37
+ ],
38
+ };
39
+ });
40
+ server.registerTool('forget', {
41
+ title: 'Forget (decay)',
42
+ description: 'Run a decay pass over stale memories for an agent.',
43
+ inputSchema: { agentId: z.string() },
44
+ }, async ({ agentId }) => {
45
+ await mem.forget(agentId);
46
+ return { content: [{ type: 'text', text: 'decay complete' }] };
47
+ });
48
+ const transport = new StdioServerTransport();
49
+ await server.connect(transport);
50
+ // stdout is the protocol channel — log to stderr only.
51
+ console.error('REMind MCP server running on stdio');
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@remind_ai/remind-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server exposing REMind brain-inspired agent memory (with the MemGuard security layer) as Model Context Protocol tools.",
5
+ "type": "module",
6
+ "bin": { "remind-mcp": "dist/server.js" },
7
+ "files": ["dist"],
8
+ "publishConfig": { "access": "public" },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "prepublishOnly": "npm run build",
12
+ "typecheck": "tsc --noEmit",
13
+ "start": "tsx src/server.ts"
14
+ },
15
+ "keywords": ["mcp", "model-context-protocol", "memory", "ai", "agent", "remind", "memguard"],
16
+ "license": "MIT",
17
+ "engines": { "node": ">=20" },
18
+ "dependencies": {
19
+ "@modelcontextprotocol/sdk": "^1.11.0",
20
+ "@remind_ai/remind": "^0.1.0",
21
+ "dotenv": "^16.4.5",
22
+ "zod": "^3.23.8"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^22.7.0",
26
+ "tsx": "^4.19.0",
27
+ "typescript": "^5.6.0"
28
+ }
29
+ }