@memly/mcp-server 0.2.1 → 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 +85 -41
  2. package/dist/index.js +40 -0
  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,19 +51,25 @@
18
51
 
19
52
  Go to [memly.site/dashboard/api-keys](https://memly.site/dashboard/api-keys)
20
53
 
21
- ### 2. Auto-setup (one command)
54
+ ### 2. Configure your IDE's MCP server
22
55
 
23
- Run this in your project root auto-detects your IDE and writes the instruction file:
56
+ **VS Code / GitHub Copilot**create `.vscode/mcp.json` in your project:
24
57
 
25
- ```bash
26
- npx @memly/mcp-server init
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
+ }
27
70
  ```
28
71
 
29
- This creates the right file for your IDE so Memly loads context automatically on every conversation. Run once, forget forever.
30
-
31
- ### 3. Configure your IDE's MCP server
32
-
33
- **VS Code / Copilot** — create `.vscode/mcp.json`:
72
+ **JetBrains** (IntelliJ, WebStorm, PyCharm…) create `.idea/mcp.json`:
34
73
 
35
74
  ```json
36
75
  {
@@ -46,8 +85,9 @@ This creates the right file for your IDE so Memly loads context automatically on
46
85
  }
47
86
  ```
48
87
 
49
- **Cursor** — Settings → MCP → Add Server:
50
- - Command: `npx -y @memly/mcp-server`
88
+ **Windsurf** — Settings → Cascade → MCP Servers → Add:
89
+ - Command: `npx`
90
+ - Args: `-y @memly/mcp-server`
51
91
  - Env: `MEMLY_API_KEY=memly_your_key_here`
52
92
 
53
93
  **Claude Desktop** — edit `claude_desktop_config.json`:
@@ -66,38 +106,42 @@ This creates the right file for your IDE so Memly loads context automatically on
66
106
  }
67
107
  ```
68
108
 
69
- ### Automatic Context (Zero Friction)
109
+ ### 3. Run auto-setup once per project
70
110
 
71
- 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:
72
112
 
73
- ```markdown
74
- # Memly Integration
75
- At the start of every session, you MUST:
76
- 1. Call `memly.search_memories({ query: "current active task", limit: 5 })`
77
- 2. Use this context to understand the project state.
78
- 3. When you make major decisions, call `memly.save_memory`.
113
+ ```bash
114
+ npx @memly/mcp-server init
79
115
  ```
80
116
 
81
- ### Tools
117
+ Auto-detects VS Code, Cursor, Windsurf, Claude Desktop. Run once, never think about it again.
118
+
119
+ ---
82
120
 
83
- | Tool | Description |
84
- |---|---|
85
- | `search_memories` | Semantic search across your stored memories |
86
- | `remember` | Store a new memory (fact, decision, pattern) |
87
- | `forget` | Delete a specific memory by ID |
88
- | `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
+ ---
89
131
 
90
132
  ## Environment Variables
91
133
 
92
134
  | Variable | Required | Default | Description |
93
- |---|---|---|---|
94
- | `MEMLY_API_KEY` | ✅ | — | Your Memly API key |
95
- | `MEMLY_API_URL` | — | `https://api.memly.site` | API base URL |
96
- | `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
+ ---
97
141
 
98
- ## Self-Hosted (VPS)
142
+ ## Self-Hosted
99
143
 
100
- Run alongside your Memly proxy for zero-latency:
144
+ Run alongside your Memly proxy on your VPS for zero-latency:
101
145
 
102
146
  ```bash
103
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: "✅",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memly/mcp-server",
3
- "version": "0.2.1",
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",