mindpm 1.2.24 → 1.2.25
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 +49 -5
- package/dist/index.js +56 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,10 +60,11 @@ npm install
|
|
|
60
60
|
npm run build
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
### Configure
|
|
63
|
+
### Configure your MCP client
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
All clients use the same JSON format — just different config file locations. They all share the same `~/.mindpm/memory.db`, so you can switch tools mid-project without losing context.
|
|
66
66
|
|
|
67
|
+
**Claude Code** — `~/.claude/claude_desktop_config.json`
|
|
67
68
|
```json
|
|
68
69
|
{
|
|
69
70
|
"mcpServers": {
|
|
@@ -78,14 +79,18 @@ Add to your MCP config (`~/.claude/claude_desktop_config.json` or similar):
|
|
|
78
79
|
}
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
Or use the one-liner:
|
|
83
|
+
```bash
|
|
84
|
+
claude mcp add mindpm -e MINDPM_DB_PATH=~/.mindpm/memory.db -- npx -y mindpm
|
|
85
|
+
```
|
|
82
86
|
|
|
87
|
+
**Cursor** — `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` globally)
|
|
83
88
|
```json
|
|
84
89
|
{
|
|
85
90
|
"mcpServers": {
|
|
86
91
|
"mindpm": {
|
|
87
|
-
"command": "
|
|
88
|
-
"args": ["
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "mindpm"],
|
|
89
94
|
"env": {
|
|
90
95
|
"MINDPM_DB_PATH": "~/.mindpm/memory.db"
|
|
91
96
|
}
|
|
@@ -94,6 +99,45 @@ If running from source, use the built file directly:
|
|
|
94
99
|
}
|
|
95
100
|
```
|
|
96
101
|
|
|
102
|
+
**VS Code + Copilot** — `.vscode/mcp.json` in your project root
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"servers": {
|
|
106
|
+
"mindpm": {
|
|
107
|
+
"type": "stdio",
|
|
108
|
+
"command": "npx",
|
|
109
|
+
"args": ["-y", "mindpm"],
|
|
110
|
+
"env": {
|
|
111
|
+
"MINDPM_DB_PATH": "~/.mindpm/memory.db"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Cline** — Add via VS Code settings → Cline → MCP Servers, or edit `cline_mcp_settings.json`:
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"mindpm": {
|
|
123
|
+
"command": "npx",
|
|
124
|
+
"args": ["-y", "mindpm"],
|
|
125
|
+
"env": {
|
|
126
|
+
"MINDPM_DB_PATH": "~/.mindpm/memory.db"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Windsurf** — Settings → Cascade → MCP, using the same JSON structure as Cline above.
|
|
134
|
+
|
|
135
|
+
### Using mindpm with any LLM
|
|
136
|
+
|
|
137
|
+
On first run, mindpm writes `~/.mindpm/AGENT.md` — a ready-to-paste system prompt that tells your LLM how to use mindpm proactively. Paste its contents into your client's custom instructions or system prompt box.
|
|
138
|
+
|
|
139
|
+
You can also call the `get_agent_instructions` tool at any time to retrieve the instructions.
|
|
140
|
+
|
|
97
141
|
### Start Using
|
|
98
142
|
|
|
99
143
|
That's it. The LLM now has access to mindpm tools. Just start talking about your projects.
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { z } from "zod/v4";
|
|
|
9
9
|
|
|
10
10
|
// src/db/connection.ts
|
|
11
11
|
import Database from "better-sqlite3";
|
|
12
|
-
import { mkdirSync } from "fs";
|
|
12
|
+
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
13
13
|
import { dirname, resolve } from "path";
|
|
14
14
|
import { homedir } from "os";
|
|
15
15
|
|
|
@@ -212,6 +212,52 @@ function runMigrations(db2) {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
// src/tools/meta.ts
|
|
216
|
+
var AGENT_INSTRUCTIONS = `# mindpm \u2014 Agent Instructions
|
|
217
|
+
|
|
218
|
+
You have access to mindpm, a persistent project memory tool. Use it proactively to maintain context across conversations.
|
|
219
|
+
|
|
220
|
+
## Session lifecycle
|
|
221
|
+
|
|
222
|
+
**At the start of every conversation:**
|
|
223
|
+
Call \`start_session\` immediately. It returns your project context: last session summary, active tasks, blockers, and recent decisions. Always show the kanban_url to the user as a clickable link.
|
|
224
|
+
|
|
225
|
+
**During the conversation:**
|
|
226
|
+
- When work is identified \u2192 call \`create_task\`
|
|
227
|
+
- When a technical choice is made \u2192 call \`log_decision\` (include reasoning and alternatives)
|
|
228
|
+
- When important context emerges \u2192 call \`add_note\` or \`set_context\`
|
|
229
|
+
- When task status changes \u2192 call \`update_task\`
|
|
230
|
+
|
|
231
|
+
**At the end of the conversation:**
|
|
232
|
+
Call \`end_session\` with a summary of what was accomplished and clear next_steps for the following session.
|
|
233
|
+
|
|
234
|
+
## Principles
|
|
235
|
+
|
|
236
|
+
- Prefer \`get_next_tasks\` over \`list_tasks\` when the user asks what to work on next \u2014 it returns the highest priority unblocked tasks
|
|
237
|
+
- Log decisions even for small choices \u2014 future sessions benefit from knowing *why*
|
|
238
|
+
- Keep task titles short and actionable (imperative form: "Add rate limiting", not "Rate limiting")
|
|
239
|
+
- Use \`search\` when the user references something you don't have in current context
|
|
240
|
+
|
|
241
|
+
## Works across all MCP clients
|
|
242
|
+
|
|
243
|
+
mindpm stores everything in a local SQLite database (~/.mindpm/memory.db). Any MCP-compatible client (Claude Code, Cursor, Cline, Copilot, Gemini) connecting to the same mindpm instance shares the same memory. You can switch tools mid-project without losing context.
|
|
244
|
+
`;
|
|
245
|
+
function registerMetaTools(server2) {
|
|
246
|
+
server2.registerTool(
|
|
247
|
+
"get_agent_instructions",
|
|
248
|
+
{
|
|
249
|
+
title: "Get Agent Instructions",
|
|
250
|
+
description: "Returns the recommended instructions for using mindpm effectively. Call this once if you are unsure how to use mindpm, or share it with the user to paste into other LLM clients.",
|
|
251
|
+
inputSchema: {}
|
|
252
|
+
},
|
|
253
|
+
async () => {
|
|
254
|
+
return {
|
|
255
|
+
content: [{ type: "text", text: AGENT_INSTRUCTIONS }]
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
215
261
|
// src/db/connection.ts
|
|
216
262
|
var db = null;
|
|
217
263
|
function resolveDbPath() {
|
|
@@ -223,7 +269,14 @@ function resolveDbPath() {
|
|
|
223
269
|
}
|
|
224
270
|
function ensureDbDirectory() {
|
|
225
271
|
const dbPath = resolveDbPath();
|
|
226
|
-
|
|
272
|
+
const dir = dirname(dbPath);
|
|
273
|
+
mkdirSync(dir, { recursive: true });
|
|
274
|
+
const agentMdPath = resolve(dir, "AGENT.md");
|
|
275
|
+
if (!existsSync(agentMdPath)) {
|
|
276
|
+
writeFileSync(agentMdPath, AGENT_INSTRUCTIONS, "utf8");
|
|
277
|
+
process.stderr.write(`[mindpm] Created ${agentMdPath}
|
|
278
|
+
`);
|
|
279
|
+
}
|
|
227
280
|
}
|
|
228
281
|
function getDb() {
|
|
229
282
|
if (db) return db;
|
|
@@ -1528,6 +1581,7 @@ registerDecisionTools(server);
|
|
|
1528
1581
|
registerNoteTools(server);
|
|
1529
1582
|
registerSessionTools(server);
|
|
1530
1583
|
registerQueryTools(server);
|
|
1584
|
+
registerMetaTools(server);
|
|
1531
1585
|
var httpServer;
|
|
1532
1586
|
async function main() {
|
|
1533
1587
|
ensureDbDirectory();
|