granite-mem 0.1.3 → 0.1.5

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 +72 -33
  2. package/dist/index.js +1743 -42
  3. package/package.json +8 -4
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
 
@@ -80,42 +81,48 @@ npm link
80
81
  Create the default vault in `~/.granite` and start capturing:
81
82
 
82
83
  ```bash
83
- mem init
84
- mem add "Talked to Alice about local-first sync tradeoffs"
85
- mem new "Local-first sync tradeoffs" --type permanent
86
- mem list
87
- mem search "sync"
88
- mem serve
84
+ granite init
85
+ granite add "Talked to Alice about local-first sync tradeoffs"
86
+ granite new "Local-first sync tradeoffs" --type permanent
87
+ granite list
88
+ granite search "sync"
89
89
  ```
90
90
 
91
- `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.
91
+ Start one long-running interface when you need it:
92
+
93
+ ```bash
94
+ granite serve # local web UI
95
+ granite mcp # MCP server for agent clients
96
+ ```
97
+
98
+ `granite 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.
92
99
 
93
100
  ## Example Workflow
94
101
 
95
102
  Capture something quickly:
96
103
 
97
104
  ```bash
98
- mem add "Users want fewer note types, but stronger defaults."
105
+ granite add "Users want fewer note types, but stronger defaults."
99
106
  ```
100
107
 
101
108
  Turn it into a durable note:
102
109
 
103
110
  ```bash
104
- mem new "Strong defaults beat infinite flexibility" --type permanent
111
+ granite new "Strong defaults beat infinite flexibility" --type permanent
105
112
  ```
106
113
 
107
114
  Find connections:
108
115
 
109
116
  ```bash
110
- mem suggest-links strong-defaults-beat-infinite-flexibility
111
- mem recommend strong-defaults-beat-infinite-flexibility
112
- mem backlinks strong-defaults-beat-infinite-flexibility
117
+ granite suggest-links strong-defaults-beat-infinite-flexibility
118
+ granite recommend strong-defaults-beat-infinite-flexibility
119
+ granite backlinks strong-defaults-beat-infinite-flexibility
113
120
  ```
114
121
 
115
122
  Open the local UI:
116
123
 
117
124
  ```bash
118
- mem serve
125
+ granite serve
119
126
  ```
120
127
 
121
128
  Then browse notes, search the vault, inspect backlinks, and explore the graph locally.
@@ -165,33 +172,65 @@ This keeps the system transparent, portable, and inspectable.
165
172
  Many commands support JSON output:
166
173
 
167
174
  ```bash
168
- mem new "Sync constraints" --type permanent --json
169
- mem list --json
170
- mem show sync-constraints --json
171
- mem search "constraints" --json
172
- mem backlinks sync-constraints --json
173
- mem recommend sync-constraints --json
175
+ granite new "Sync constraints" --type permanent --json
176
+ granite list --json
177
+ granite show sync-constraints --json
178
+ granite search "constraints" --json
179
+ granite backlinks sync-constraints --json
180
+ granite recommend sync-constraints --json
174
181
  ```
175
182
 
176
183
  That makes Granite a useful substrate for local workflows, scripts, and agent memory.
177
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
+ granite mcp --vault /path/to/vault
193
+ ```
194
+
195
+ Start it over Streamable HTTP:
196
+
197
+ ```bash
198
+ granite 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": "granite",
212
+ "args": ["mcp", "--vault", "/path/to/vault"]
213
+ }
214
+ ```
215
+
178
216
  ## Commands
179
217
 
180
218
  ```bash
181
- mem init
182
- mem new <title> [--type <type>] [--json]
183
- mem add [text] [--json]
184
- mem list [--type <type>] [--json]
185
- mem edit <slug>
186
- mem open <slug>
187
- mem show <slug> [--json] [--body]
188
- mem search <query> [--json]
189
- mem backlinks <slug> [--json]
190
- mem suggest-links <slug> [--json]
191
- mem recommend <slug> [--json]
192
- mem types
193
- mem doctor
194
- mem serve [-p <port>]
219
+ granite init
220
+ granite new <title> [--type <type>] [--json]
221
+ granite add [text] [--json]
222
+ granite list [--type <type>] [--json]
223
+ granite edit <slug>
224
+ granite open <slug>
225
+ granite show <slug> [--json] [--body]
226
+ granite search <query> [--json]
227
+ granite backlinks <slug> [--json]
228
+ granite suggest-links <slug> [--json]
229
+ granite recommend <slug> [--json]
230
+ granite types
231
+ granite doctor
232
+ granite serve [-p <port>]
233
+ granite mcp [--vault <path>] [--transport <stdio|http>]
195
234
  ```
196
235
 
197
236
  ## Development