@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.
- package/README.md +85 -41
- package/dist/index.js +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
1
|
# @memly/mcp-server
|
|
2
2
|
|
|
3
|
-
> Persistent memory for
|
|
3
|
+
> Persistent memory for IDEs that **don't support custom LLM providers**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Proxy vs MCP — which one should I use?
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
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.
|
|
54
|
+
### 2. Configure your IDE's MCP server
|
|
22
55
|
|
|
23
|
-
|
|
56
|
+
**VS Code / GitHub Copilot** — create `.vscode/mcp.json` in your project:
|
|
24
57
|
|
|
25
|
-
```
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
50
|
-
- Command: `npx
|
|
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
|
-
###
|
|
109
|
+
### 3. Run auto-setup once per project
|
|
70
110
|
|
|
71
|
-
|
|
111
|
+
Writes the instruction file for your IDE so `load_context` runs automatically at every session start:
|
|
72
112
|
|
|
73
|
-
```
|
|
74
|
-
|
|
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
|
-
|
|
117
|
+
Auto-detects VS Code, Cursor, Windsurf, Claude Desktop. Run once, never think about it again.
|
|
118
|
+
|
|
119
|
+
---
|
|
82
120
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
|
86
|
-
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
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` |
|
|
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
|
|
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: "✅",
|