@pairsystems/goodmem-mcp 0.1.0 → 0.1.1

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 ADDED
@@ -0,0 +1,236 @@
1
+ # @pairsystems/goodmem-mcp
2
+
3
+ [GoodMem](https://docs.goodmem.ai) MCP server — gives AI agents direct access to GoodMem memory infrastructure via the [Model Context Protocol](https://modelcontextprotocol.io).
4
+
5
+ 41 tools across 10 namespaces: embedders, LLMs, rerankers, spaces, memories, retrieval, OCR, users, API keys, and system administration.
6
+
7
+ ## Prerequisites
8
+
9
+ - A running [GoodMem](https://github.com/PAIR-Systems-Inc/goodmem) server
10
+ - Node.js 18+
11
+
12
+ ## Installation
13
+
14
+ ### Claude Desktop
15
+
16
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "goodmem": {
22
+ "command": "npx",
23
+ "args": ["-y", "@pairsystems/goodmem-mcp"],
24
+ "env": {
25
+ "GOODMEM_BASE_URL": "https://your-server.example.com",
26
+ "GOODMEM_API_KEY": "gm_..."
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ ### Claude Code
34
+
35
+ ```bash
36
+ claude mcp add goodmem -- env GOODMEM_BASE_URL=https://your-server.example.com env GOODMEM_API_KEY=gm_... npx -y @pairsystems/goodmem-mcp
37
+ ```
38
+
39
+ Or add to `.claude/mcp.json` in your project:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "goodmem": {
45
+ "command": "npx",
46
+ "args": ["-y", "@pairsystems/goodmem-mcp"],
47
+ "env": {
48
+ "GOODMEM_BASE_URL": "https://your-server.example.com",
49
+ "GOODMEM_API_KEY": "gm_..."
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ### VS Code / Cursor / Other MCP clients
57
+
58
+ Use the same `npx -y @pairsystems/goodmem-mcp` command pattern with `GOODMEM_BASE_URL` and `GOODMEM_API_KEY` set in the environment.
59
+
60
+ ### Global install
61
+
62
+ ```bash
63
+ npm install -g @pairsystems/goodmem-mcp
64
+ goodmem-mcp
65
+ ```
66
+
67
+ ## Runtime configuration
68
+
69
+ If you can't set environment variables before launch, call `goodmem_configure` from chat:
70
+
71
+ ```
72
+ Configure GoodMem with base URL https://my-server.com and API key gm_abc123
73
+ ```
74
+
75
+ Credentials set this way persist for the session and override environment variables.
76
+
77
+ ## Quick start
78
+
79
+ Once connected, ask your AI assistant to:
80
+
81
+ ```
82
+ Create a text-embedding-3-large embedder called "My Embedder" with credentials <sk-...>
83
+ Create a space called "Research" using that embedder
84
+ Store this text as a memory: "GoodMem is a memory infrastructure platform for AI agents"
85
+ Search my Research space for "memory infrastructure"
86
+ ```
87
+
88
+ The MCP server auto-infers provider, endpoint, dimensions, and other fields from the model name — you only need `display_name`, `model_identifier`, and credentials for the embedding provider.
89
+
90
+ ## Available tools
91
+
92
+ ### `goodmem_configure`
93
+ Set server credentials at runtime. Call this if `GOODMEM_BASE_URL` / `GOODMEM_API_KEY` are not set as environment variables.
94
+
95
+ | Parameter | Type | Required | Description |
96
+ |-----------|------|----------|-------------|
97
+ | `base_url` | string | yes | GoodMem server URL |
98
+ | `api_key` | string | yes | GoodMem API key (`gm_...`) |
99
+
100
+ ### `goodmem_lookup_model`
101
+ Inspect the built-in model registry. Shows what fields will be auto-inferred for a given model identifier.
102
+
103
+ | Parameter | Type | Required | Description |
104
+ |-----------|------|----------|-------------|
105
+ | `model_identifier` | string | yes | Model name to look up |
106
+ | `type` | string | no | `embedder`, `llm`, or `reranker` |
107
+
108
+ ---
109
+
110
+ ### Embedders
111
+
112
+ | Tool | Description |
113
+ |------|-------------|
114
+ | `goodmem_embedders_create` | Register an embedding model |
115
+ | `goodmem_embedders_list` | List registered embedders |
116
+ | `goodmem_embedders_get` | Get embedder by ID |
117
+ | `goodmem_embedders_update` | Update embedder configuration |
118
+ | `goodmem_embedders_delete` | Delete an embedder |
119
+
120
+ **Create parameters**: `display_name` (required), `model_identifier` (required), `credentials` (required for SaaS providers), `provider_type`, `endpoint_url`, `dimensionality` — last three auto-inferred from `model_identifier` for 29 known models.
121
+
122
+ ### LLMs
123
+
124
+ | Tool | Description |
125
+ |------|-------------|
126
+ | `goodmem_llms_create` | Register an LLM configuration |
127
+ | `goodmem_llms_list` | List registered LLMs |
128
+ | `goodmem_llms_get` | Get LLM by ID |
129
+ | `goodmem_llms_update` | Update LLM configuration |
130
+ | `goodmem_llms_delete` | Delete an LLM |
131
+
132
+ **Create parameters**: `display_name` (required), `model_identifier` (required), `credentials` (required for SaaS providers) — `provider_type`, `endpoint_url`, `max_context_length` auto-inferred for 34 known models.
133
+
134
+ ### Rerankers
135
+
136
+ | Tool | Description |
137
+ |------|-------------|
138
+ | `goodmem_rerankers_create` | Register a reranker model |
139
+ | `goodmem_rerankers_list` | List registered rerankers |
140
+ | `goodmem_rerankers_get` | Get reranker by ID |
141
+ | `goodmem_rerankers_update` | Update reranker configuration |
142
+ | `goodmem_rerankers_delete` | Delete a reranker |
143
+
144
+ **Create parameters**: `display_name` (required), `model_identifier` (required), `credentials` (required for SaaS providers) — `provider_type` and `endpoint_url` auto-inferred for 16 known models.
145
+
146
+ ### Spaces
147
+
148
+ Memory spaces are containers that associate a set of memories with an embedder.
149
+
150
+ | Tool | Description |
151
+ |------|-------------|
152
+ | `goodmem_spaces_create` | Create a memory space |
153
+ | `goodmem_spaces_list` | List spaces |
154
+ | `goodmem_spaces_get` | Get space by ID |
155
+ | `goodmem_spaces_update` | Update space configuration |
156
+ | `goodmem_spaces_delete` | Delete a space |
157
+
158
+ ### Memories
159
+
160
+ | Tool | Description |
161
+ |------|-------------|
162
+ | `goodmem_memories_create` | Store a memory (text, base64, or file reference) |
163
+ | `goodmem_memories_list` | List memories in a space |
164
+ | `goodmem_memories_get` | Get memory by ID |
165
+ | `goodmem_memories_update` | Update memory metadata |
166
+ | `goodmem_memories_delete` | Delete a memory |
167
+ | `goodmem_memories_retrieve` | **Semantic search** — query memories by meaning |
168
+ | `goodmem_memories_batch_create` | Create multiple memories in one request |
169
+ | `goodmem_memories_batch_get` | Get multiple memories by IDs |
170
+ | `goodmem_memories_batch_delete` | Delete multiple memories by IDs |
171
+
172
+ **`goodmem_memories_retrieve` key parameters**: `space_keys` (required), `query` (required), `llm_id` (optional, for RAG), `reranker_id` (optional), `max_results`, `relevance_threshold`.
173
+
174
+ ### OCR
175
+
176
+ | Tool | Description |
177
+ |------|-------------|
178
+ | `goodmem_ocr_document` | Extract text from a document |
179
+
180
+ ### Users
181
+
182
+ | Tool | Description |
183
+ |------|-------------|
184
+ | `goodmem_users_me` | Get current authenticated user |
185
+ | `goodmem_users_get` | Get user by ID or email |
186
+
187
+ ### API Keys
188
+
189
+ | Tool | Description |
190
+ |------|-------------|
191
+ | `goodmem_apikeys_create` | Create an API key |
192
+ | `goodmem_apikeys_list` | List API keys |
193
+ | `goodmem_apikeys_update` | Update an API key |
194
+ | `goodmem_apikeys_delete` | Delete an API key |
195
+
196
+ ### System
197
+
198
+ | Tool | Description |
199
+ |------|-------------|
200
+ | `goodmem_system_info` | Get server version and configuration |
201
+ | `goodmem_system_init` | Initialize the server (first-time setup) |
202
+
203
+ ### Admin
204
+
205
+ | Tool | Description |
206
+ |------|-------------|
207
+ | `goodmem_admin_drain` | Drain the server |
208
+ | `goodmem_admin_background_jobs_purge` | Purge completed background jobs |
209
+ | `goodmem_admin_license_reload` | Reload the server license |
210
+
211
+ ---
212
+
213
+ ## Auto-inference
214
+
215
+ When creating embedders, LLMs, or rerankers, provide `model_identifier` and the server fills in `provider_type`, `endpoint_url`, dimensions, and other fields automatically from the built-in registry of 79 models.
216
+
217
+ **Example**: calling `goodmem_embedders_create` with `model_identifier: "text-embedding-3-large"` auto-fills:
218
+ - `provider_type` → `"OPENAI"`
219
+ - `endpoint_url` → `"https://api.openai.com/v1"`
220
+ - `dimensionality` → `1536`
221
+ - `distribution_type` → `"DENSE"`
222
+
223
+ User-provided values always override inferred defaults. Use `goodmem_lookup_model` to inspect what will be inferred before creating a resource.
224
+
225
+ ## Credential validation
226
+
227
+ SaaS providers require API credentials. If you call a create tool for a known SaaS endpoint (OpenAI, Cohere, Voyage, Jina, Anthropic via OpenAI-compatible API, Google, Mistral) without providing `credentials`, the server returns a clear error before the request is sent — no wasted round trips.
228
+
229
+ For self-hosted or local providers (vLLM, TEI, Ollama, custom endpoints), credentials are optional.
230
+
231
+ ## Links
232
+
233
+ - [GoodMem Documentation](https://docs.goodmem.ai)
234
+ - [GoodMem on GitHub](https://github.com/PAIR-Systems-Inc/goodmem)
235
+ - [Python SDK on PyPI](https://pypi.org/project/goodmem/)
236
+ - [Claude Code Plugin](https://github.com/PAIR-Systems-Inc/goodmem-claude-code-plugin)