granite-mem 0.1.2 → 0.1.4
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 +44 -4
- package/dist/index.js +1181 -46
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ Granite is designed to be easy for agents to read and act on:
|
|
|
60
60
|
- notes are plain files
|
|
61
61
|
- metadata is explicit
|
|
62
62
|
- commands support `--json`
|
|
63
|
+
- Granite ships with an MCP server
|
|
63
64
|
- vault structure is predictable
|
|
64
65
|
- search, backlinks, and recommendations are available from the CLI
|
|
65
66
|
|
|
@@ -77,7 +78,7 @@ npm run build
|
|
|
77
78
|
npm link
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
Create
|
|
81
|
+
Create the default vault in `~/.granite` and start capturing:
|
|
81
82
|
|
|
82
83
|
```bash
|
|
83
84
|
mem init
|
|
@@ -85,7 +86,13 @@ mem add "Talked to Alice about local-first sync tradeoffs"
|
|
|
85
86
|
mem new "Local-first sync tradeoffs" --type permanent
|
|
86
87
|
mem list
|
|
87
88
|
mem search "sync"
|
|
88
|
-
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Start one long-running interface when you need it:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
mem serve # local web UI
|
|
95
|
+
mem mcp # MCP server for agent clients
|
|
89
96
|
```
|
|
90
97
|
|
|
91
98
|
`mem new` does more than create a file. It can immediately suggest related links, tags, and the next note to create, which is the core of Granite's value loop.
|
|
@@ -153,8 +160,9 @@ Granite keeps the source of truth boring and durable:
|
|
|
153
160
|
|
|
154
161
|
- notes are Markdown files
|
|
155
162
|
- metadata lives in YAML frontmatter
|
|
156
|
-
- vault
|
|
157
|
-
-
|
|
163
|
+
- the default vault lives in `~/.granite`
|
|
164
|
+
- vault configuration lives in `~/.granite/granite.yml`
|
|
165
|
+
- full-text search and link resolution are backed by a local SQLite index in `~/.granite/index.db`
|
|
158
166
|
- the index can be rebuilt from the files at any time
|
|
159
167
|
|
|
160
168
|
This keeps the system transparent, portable, and inspectable.
|
|
@@ -174,6 +182,37 @@ mem recommend sync-constraints --json
|
|
|
174
182
|
|
|
175
183
|
That makes Granite a useful substrate for local workflows, scripts, and agent memory.
|
|
176
184
|
|
|
185
|
+
## MCP Server
|
|
186
|
+
|
|
187
|
+
Granite ships with an MCP server so LLM clients can control the vault directly through tools, resources, and prompts.
|
|
188
|
+
|
|
189
|
+
Start it over stdio for local MCP clients:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
mem mcp --vault /path/to/vault
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Start it over Streamable HTTP:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
mem mcp --transport http --host 127.0.0.1 --port 3321
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The server exposes:
|
|
202
|
+
|
|
203
|
+
- tools for vault overview, list/get/search, create/update, backlinks, link suggestions, recommendations, and doctor
|
|
204
|
+
- resources for `granite.yml`, vault overview, note types, and individual notes via `granite://notes/{slug}`
|
|
205
|
+
- prompts for refining notes and reviewing links/next steps
|
|
206
|
+
|
|
207
|
+
Example stdio client configuration:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"command": "mem",
|
|
212
|
+
"args": ["mcp", "--vault", "/path/to/vault"]
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
177
216
|
## Commands
|
|
178
217
|
|
|
179
218
|
```bash
|
|
@@ -191,6 +230,7 @@ mem recommend <slug> [--json]
|
|
|
191
230
|
mem types
|
|
192
231
|
mem doctor
|
|
193
232
|
mem serve [-p <port>]
|
|
233
|
+
mem mcp [--vault <path>] [--transport <stdio|http>]
|
|
194
234
|
```
|
|
195
235
|
|
|
196
236
|
## Development
|