mindkeg-mcp 0.1.1 → 0.3.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/README.md +51 -21
- package/dist/cli/index.js +1109 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/index-CZwu1Tzr.d.ts +334 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +430 -5
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.ts +2 -229
- package/dist/models/index.js +33 -0
- package/dist/models/index.js.map +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +428 -3
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.d.ts +10 -1
- package/dist/services/index.js +365 -2
- package/dist/services/index.js.map +1 -1
- package/dist/storage/storage-adapter.d.ts +96 -2
- package/package.json +1 -1
- package/templates/AGENTS.md +46 -12
package/README.md
CHANGED
|
@@ -35,13 +35,38 @@ Unlike traditional RAG systems that chunk large documents, Mind Keg stores **pre
|
|
|
35
35
|
|
|
36
36
|
## Quick Start
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### One-command setup
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx mindkeg-mcp init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This auto-detects your agent (Claude Code, Cursor, Windsurf), writes the MCP config, copies agent instructions, and runs a health check. That's it — open your agent and start coding.
|
|
45
|
+
|
|
46
|
+
**Options:**
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx mindkeg-mcp init --agent cursor # Target a specific agent
|
|
50
|
+
npx mindkeg-mcp init --no-instructions # Skip copying AGENTS.md
|
|
51
|
+
npx mindkeg-mcp init --no-health-check # Skip the health check
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`init` is idempotent — safe to run multiple times. It merges with existing configs and never overwrites.
|
|
55
|
+
|
|
56
|
+
### Manual setup
|
|
57
|
+
|
|
58
|
+
If you prefer to configure manually, or need HTTP mode:
|
|
59
|
+
|
|
60
|
+
<details>
|
|
61
|
+
<summary>Click to expand manual setup instructions</summary>
|
|
62
|
+
|
|
63
|
+
#### Install
|
|
39
64
|
|
|
40
65
|
```bash
|
|
41
66
|
npm install -g mindkeg-mcp
|
|
42
67
|
```
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
#### Create an API key
|
|
45
70
|
|
|
46
71
|
```bash
|
|
47
72
|
mindkeg api-key create --name "My Laptop"
|
|
@@ -49,13 +74,11 @@ mindkeg api-key create --name "My Laptop"
|
|
|
49
74
|
# mk_abc123...
|
|
50
75
|
```
|
|
51
76
|
|
|
52
|
-
|
|
77
|
+
#### Connect your AI agent
|
|
53
78
|
|
|
54
79
|
Mind Keg works with any MCP-compatible AI coding agent. Choose your setup:
|
|
55
80
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Add to `~/.claude.json` or your project's MCP settings:
|
|
81
|
+
**Claude Code** — Add to `~/.claude.json` or your project's `.claude/mcp.json`:
|
|
59
82
|
|
|
60
83
|
```json
|
|
61
84
|
{
|
|
@@ -71,9 +94,7 @@ Add to `~/.claude.json` or your project's MCP settings:
|
|
|
71
94
|
}
|
|
72
95
|
```
|
|
73
96
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Add to your Cursor MCP settings (`.cursor/mcp.json` or global settings):
|
|
97
|
+
**Cursor** — Add to `.cursor/mcp.json` or global settings:
|
|
77
98
|
|
|
78
99
|
```json
|
|
79
100
|
{
|
|
@@ -89,9 +110,7 @@ Add to your Cursor MCP settings (`.cursor/mcp.json` or global settings):
|
|
|
89
110
|
}
|
|
90
111
|
```
|
|
91
112
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Add to your Windsurf MCP configuration (`~/.codeium/windsurf/mcp_config.json`):
|
|
113
|
+
**Windsurf** — Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
95
114
|
|
|
96
115
|
```json
|
|
97
116
|
{
|
|
@@ -107,9 +126,7 @@ Add to your Windsurf MCP configuration (`~/.codeium/windsurf/mcp_config.json`):
|
|
|
107
126
|
}
|
|
108
127
|
```
|
|
109
128
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
For agents that connect via HTTP instead of stdio:
|
|
129
|
+
**HTTP mode (any MCP client):**
|
|
113
130
|
|
|
114
131
|
```bash
|
|
115
132
|
MINDKEG_API_KEY=mk_your_key mindkeg serve --http
|
|
@@ -130,11 +147,9 @@ MINDKEG_API_KEY=mk_your_key mindkeg serve --http
|
|
|
130
147
|
}
|
|
131
148
|
```
|
|
132
149
|
|
|
133
|
-
|
|
150
|
+
**Other MCP-compatible agents** — Mind Keg works with any agent that supports the [Model Context Protocol](https://modelcontextprotocol.io) — including Codex CLI, Gemini CLI, GitHub Copilot, and more. Use the stdio config above adapted to your agent's MCP settings format.
|
|
134
151
|
|
|
135
|
-
Mind Keg
|
|
136
|
-
|
|
137
|
-
### Add Mind Keg instructions to your repository
|
|
152
|
+
#### Add Mind Keg instructions to your repository
|
|
138
153
|
|
|
139
154
|
Copy `templates/AGENTS.md` to the root of any repository where you want agents to use Mind Keg.
|
|
140
155
|
|
|
@@ -142,10 +157,13 @@ Copy `templates/AGENTS.md` to the root of any repository where you want agents t
|
|
|
142
157
|
|
|
143
158
|
> **Claude Code only**: Claude Code doesn't auto-load `AGENTS.md` natively. Add `@AGENTS.md` to your `CLAUDE.md` to bridge it.
|
|
144
159
|
|
|
160
|
+
</details>
|
|
161
|
+
|
|
145
162
|
## MCP Tools
|
|
146
163
|
|
|
147
164
|
| Tool | Description |
|
|
148
165
|
|----------------------|------------------------------------------------------|
|
|
166
|
+
| `get_context` | Prime an agent session with all relevant learnings — ranked, scoped, and budget-controlled |
|
|
149
167
|
| `store_learning` | Store a new atomic learning (repo, workspace, or global scope) |
|
|
150
168
|
| `search_learnings` | Semantic/keyword search for relevant learnings |
|
|
151
169
|
| `update_learning` | Update content, category, or tags |
|
|
@@ -158,6 +176,14 @@ Copy `templates/AGENTS.md` to the root of any repository where you want agents t
|
|
|
158
176
|
## CLI Commands
|
|
159
177
|
|
|
160
178
|
```bash
|
|
179
|
+
# Quick setup (auto-detects agent, writes config, copies instructions)
|
|
180
|
+
mindkeg init
|
|
181
|
+
mindkeg init --agent cursor
|
|
182
|
+
|
|
183
|
+
# Database statistics
|
|
184
|
+
mindkeg stats
|
|
185
|
+
mindkeg stats --json
|
|
186
|
+
|
|
161
187
|
# Start in stdio mode (for local agent connections)
|
|
162
188
|
mindkeg serve --stdio
|
|
163
189
|
|
|
@@ -173,6 +199,10 @@ mindkeg api-key revoke <prefix>
|
|
|
173
199
|
# Database
|
|
174
200
|
mindkeg migrate
|
|
175
201
|
|
|
202
|
+
# Near-duplicate detection (backfill existing learnings)
|
|
203
|
+
mindkeg dedup-scan
|
|
204
|
+
mindkeg dedup-scan --dry-run
|
|
205
|
+
|
|
176
206
|
# Backup and restore
|
|
177
207
|
mindkeg export --output backup.json
|
|
178
208
|
mindkeg import backup.json --regenerate-embeddings
|
|
@@ -295,14 +325,14 @@ Mind Keg works fully offline by default. FastEmbed provides free, local semantic
|
|
|
295
325
|
|
|
296
326
|
```
|
|
297
327
|
CLI (Commander.js)
|
|
298
|
-
└── serve / api-key / migrate / export / import
|
|
328
|
+
└── init / stats / serve / api-key / migrate / export / import / dedup-scan
|
|
299
329
|
|
|
300
330
|
src/
|
|
301
331
|
index.ts Entry point, stdio + HTTP transports
|
|
302
332
|
server.ts MCP server + tool registration
|
|
303
333
|
config.ts Config loading (env vars → defaults)
|
|
304
334
|
auth/ API key generation + validation middleware
|
|
305
|
-
tools/ One file per MCP tool (
|
|
335
|
+
tools/ One file per MCP tool (9 tools)
|
|
306
336
|
services/ LearningService + EmbeddingService
|
|
307
337
|
storage/ StorageAdapter interface + SQLite impl
|
|
308
338
|
models/ Zod schemas + TypeScript types
|