@memly/mcp-server 0.2.0 → 0.2.2

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 +88 -34
  2. package/dist/index.js +41 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,49 @@
1
1
  # @memly/mcp-server
2
2
 
3
- > Persistent memory for any IDE that supports MCP.
3
+ > Persistent memory for IDEs that **don't support custom LLM providers**.
4
4
 
5
- ## Supported IDEs
5
+ ## Proxy vs MCP — which one should I use?
6
6
 
7
- | IDE | Config File |
8
- |---|---|
9
- | VS Code + Copilot | `.vscode/mcp.json` |
10
- | Cursor | Settings → MCP |
11
- | Claude Desktop | `claude_desktop_config.json` |
12
- | Windsurf | Settings MCP |
13
- | Zed | Settings |
7
+ Memly has two integration modes:
8
+
9
+ | Mode | How it works | Best for |
10
+ |------|-------------|----------|
11
+ | **Proxy** (transparent) | Point your IDE's base URL to `api.memly.site` — memory injected in 100% of requests, invisible | IDEs that support a custom OpenAI-compatible endpoint |
12
+ | **MCP server** (this package) | Memly runs as an MCP tool — `load_context` is called automatically at session start | IDEs locked to their own AI service |
13
+
14
+ ---
15
+
16
+ ## Which mode for my IDE?
17
+
18
+ ### ✅ Use the Proxy — supports custom endpoint
19
+
20
+ | IDE / Tool | Where to configure |
21
+ |-----------|-------------------|
22
+ | **Cursor** | Settings → Models → OpenAI Base URL |
23
+ | **Continue.dev** (VS Code / JetBrains extension) | `config.json` → `apiBase` |
24
+ | **Zed** | `settings.json` → `api_url` |
25
+ | **Aider** | `--openai-api-base` CLI flag |
26
+ | **Jan.ai** | Settings → Model → Engine URL |
27
+ | **LM Studio** | Server settings |
28
+ | **Open WebUI** | Admin → Connections |
29
+ | **Msty** | Settings → Custom provider |
30
+ | **Void** | Settings → Custom provider |
31
+
32
+ ### ❌ Use the MCP server — locked provider, no custom endpoint
33
+
34
+ | IDE / Tool | Reason |
35
+ |-----------|--------|
36
+ | **VS Code + GitHub Copilot** | Microsoft/GitHub auth — base URL not configurable |
37
+ | **JetBrains AI Assistant** | Locked to JetBrains AI Service subscription |
38
+ | **Windsurf (Codeium)** | Cascade uses Codeium's own models — no external endpoint |
39
+ | **Amazon Q / CodeWhisperer** | AWS-only pipeline |
40
+ | **Tabnine** | Proprietary closed service |
41
+ | **Replit AI** | Built into Replit, no external provider |
42
+ | **Gitpod AI** | Locked to their own service |
43
+ | **Sourcegraph Cody** | Locked on free tier |
44
+ | **Claude Desktop** | Chat app, not an IDE — MCP native |
45
+
46
+ ---
14
47
 
15
48
  ## Quick Start
16
49
 
@@ -18,9 +51,25 @@
18
51
 
19
52
  Go to [memly.site/dashboard/api-keys](https://memly.site/dashboard/api-keys)
20
53
 
21
- ### 2. Configure your IDE
54
+ ### 2. Configure your IDE's MCP server
55
+
56
+ **VS Code / GitHub Copilot** — create `.vscode/mcp.json` in your project:
57
+
58
+ ```json
59
+ {
60
+ "servers": {
61
+ "memly": {
62
+ "command": "npx",
63
+ "args": ["-y", "@memly/mcp-server"],
64
+ "env": {
65
+ "MEMLY_API_KEY": "memly_your_key_here"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
22
71
 
23
- **VS Code / Copilot** — create `.vscode/mcp.json`:
72
+ **JetBrains** (IntelliJ, WebStorm, PyCharm…) — create `.idea/mcp.json`:
24
73
 
25
74
  ```json
26
75
  {
@@ -36,8 +85,9 @@ Go to [memly.site/dashboard/api-keys](https://memly.site/dashboard/api-keys)
36
85
  }
37
86
  ```
38
87
 
39
- **Cursor** — Settings → MCP → Add Server:
40
- - Command: `npx -y @memly/mcp-server`
88
+ **Windsurf** — Settings → Cascade → MCP Servers → Add:
89
+ - Command: `npx`
90
+ - Args: `-y @memly/mcp-server`
41
91
  - Env: `MEMLY_API_KEY=memly_your_key_here`
42
92
 
43
93
  **Claude Desktop** — edit `claude_desktop_config.json`:
@@ -56,38 +106,42 @@ Go to [memly.site/dashboard/api-keys](https://memly.site/dashboard/api-keys)
56
106
  }
57
107
  ```
58
108
 
59
- ### Automatic Context (Zero Friction)
109
+ ### 3. Run auto-setup once per project
60
110
 
61
- To make your AI agent proactively load context at the start of every session, add this to your `.cursorrules`, `.windsurfrules`, or `GEMINI.md`:
111
+ Writes the instruction file for your IDE so `load_context` runs automatically at every session start:
62
112
 
63
- ```markdown
64
- # Memly Integration
65
- At the start of every session, you MUST:
66
- 1. Call `memly.search_memories({ query: "current active task", limit: 5 })`
67
- 2. Use this context to understand the project state.
68
- 3. When you make major decisions, call `memly.save_memory`.
113
+ ```bash
114
+ npx @memly/mcp-server init
69
115
  ```
70
116
 
71
- ### Tools
117
+ Auto-detects VS Code, Cursor, Windsurf, Claude Desktop. Run once, never think about it again.
118
+
119
+ ---
72
120
 
73
- | Tool | Description |
74
- |---|---|
75
- | `search_memories` | Semantic search across your stored memories |
76
- | `remember` | Store a new memory (fact, decision, pattern) |
77
- | `forget` | Delete a specific memory by ID |
78
- | `list_projects` | List all projects with memory stats |
121
+ ## Tools
122
+
123
+ | Tool | When the AI calls it |
124
+ |------|---------------------|
125
+ | `load_context` | **Automatically at session start** loads memories from previous sessions |
126
+ | `search_memories` | When you ask about something specific not loaded by `load_context` |
127
+ | `remember` | When you make a decision, solve a problem, or say "remember this" |
128
+ | `list_projects` | When you ask to list or switch projects |
129
+
130
+ ---
79
131
 
80
132
  ## Environment Variables
81
133
 
82
134
  | Variable | Required | Default | Description |
83
- |---|---|---|---|
84
- | `MEMLY_API_KEY` | ✅ | — | Your Memly API key |
85
- | `MEMLY_API_URL` | — | `https://api.memly.site` | API base URL |
86
- | `MEMLY_PORT` | — | `3800` | HTTP transport port |
135
+ |----------|----------|---------|-------------|
136
+ | `MEMLY_API_KEY` | ✅ | — | Your Memly API key (`memly_...`) |
137
+ | `MEMLY_API_URL` | — | `https://api.memly.site` | Override for self-hosted deployments |
138
+ | `MEMLY_PORT` | — | `3800` | HTTP transport port (`--http` mode only) |
139
+
140
+ ---
87
141
 
88
- ## Self-Hosted (VPS)
142
+ ## Self-Hosted
89
143
 
90
- Run alongside your Memly proxy for zero-latency:
144
+ Run alongside your Memly proxy on your VPS for zero-latency:
91
145
 
92
146
  ```bash
93
147
  MEMLY_API_KEY=memly_... bun run packages/mcp-server/src/index.ts --http
package/dist/index.js CHANGED
@@ -20299,6 +20299,43 @@ ${MEMLY_INSTRUCTION_BLOCK}
20299
20299
  `);
20300
20300
  return { ide: "Windsurf", file: filePath, status: "created" };
20301
20301
  }
20302
+ function writeJetBrains(projectRoot) {
20303
+ const ideaDir = join(projectRoot, ".idea");
20304
+ if (!existsSync(ideaDir))
20305
+ return null;
20306
+ const filePath = join(ideaDir, "mcp.json");
20307
+ const MARKER = '"memly"';
20308
+ if (existsSync(filePath)) {
20309
+ const existing = readFileSync(filePath, "utf-8");
20310
+ if (existing.includes(MARKER)) {
20311
+ return { ide: "JetBrains", file: filePath, status: "skipped" };
20312
+ }
20313
+ try {
20314
+ const config2 = JSON.parse(existing);
20315
+ config2.servers = config2.servers ?? {};
20316
+ config2.servers["memly"] = {
20317
+ command: "npx",
20318
+ args: ["-y", "@memly/mcp-server"],
20319
+ env: { MEMLY_API_KEY: "<your-memly-api-key>" }
20320
+ };
20321
+ writeFileSync(filePath, JSON.stringify(config2, null, 2));
20322
+ return { ide: "JetBrains", file: filePath, status: "updated" };
20323
+ } catch {
20324
+ return null;
20325
+ }
20326
+ }
20327
+ mkdirSync(ideaDir, { recursive: true });
20328
+ writeFileSync(filePath, JSON.stringify({
20329
+ servers: {
20330
+ memly: {
20331
+ command: "npx",
20332
+ args: ["-y", "@memly/mcp-server"],
20333
+ env: { MEMLY_API_KEY: "<your-memly-api-key>" }
20334
+ }
20335
+ }
20336
+ }, null, 2));
20337
+ return { ide: "JetBrains", file: filePath, status: "created" };
20338
+ }
20302
20339
  function writeClaudeDesktop() {
20303
20340
  const os = platform();
20304
20341
  let configPath;
@@ -20347,6 +20384,9 @@ function runInit() {
20347
20384
  const claudeResult = writeClaudeDesktop();
20348
20385
  if (claudeResult)
20349
20386
  results.push(claudeResult);
20387
+ const jetbrainsResult = writeJetBrains(projectRoot);
20388
+ if (jetbrainsResult)
20389
+ results.push(jetbrainsResult);
20350
20390
  const icons = {
20351
20391
  created: "✅",
20352
20392
  updated: "✅",
@@ -20371,7 +20411,7 @@ function runInit() {
20371
20411
 
20372
20412
  // src/index.ts
20373
20413
  var apiKey = process.env.MEMLY_API_KEY;
20374
- if (process.argv.includes("--init")) {
20414
+ if (process.argv.includes("--init") || process.argv.includes("init")) {
20375
20415
  runInit();
20376
20416
  process.exit(0);
20377
20417
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memly/mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Memly MCP Server — persistent memory for any IDE",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",