joplin-mcp-server 1.2.1 → 2.0.0
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 +140 -404
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +17 -2142
- package/dist/bin.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1874 -1902
- package/dist/index.js.map +1 -0
- package/package.json +74 -62
package/README.md
CHANGED
|
@@ -1,520 +1,256 @@
|
|
|
1
1
|
# Joplin MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A self-contained MCP (Model Context Protocol) server for [Joplin](https://joplinapp.org/). Bundles the Joplin Terminal CLI as a dependency — no desktop app, no global installs, no external processes to manage.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
-
Install via npx (no installation required):
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
|
-
npx joplin-mcp-server --
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Configuration
|
|
14
|
-
|
|
15
|
-
Create a `.env` file with the following variables:
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
JOPLIN_HOST=127.0.0.1
|
|
19
|
-
JOPLIN_PORT=41184
|
|
20
|
-
JOPLIN_TOKEN=your_joplin_token
|
|
8
|
+
npx joplin-mcp-server --token your_joplin_token
|
|
21
9
|
```
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
Tools > Options > Web Clipper
|
|
25
|
-
|
|
26
|
-
### WSL (Windows Subsystem for Linux) Setup
|
|
27
|
-
|
|
28
|
-
If you're running the MCP server in WSL and Joplin on Windows, you'll need to set up port forwarding because Joplin binds to 127.0.0.1 (localhost only) by default.
|
|
11
|
+
That's it. The server spawns its own Joplin Terminal instance (sidecar mode), syncs to your configured backend, and exposes your notes via MCP.
|
|
29
12
|
|
|
30
|
-
|
|
13
|
+
## Architecture
|
|
31
14
|
|
|
32
|
-
|
|
15
|
+
### Sidecar Mode (Default)
|
|
33
16
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```powershell
|
|
37
|
-
# Forward port 41184 to allow WSL access to Joplin
|
|
38
|
-
netsh interface portproxy add v4tov4 listenport=41184 listenaddress=0.0.0.0 connectport=41184 connectaddress=127.0.0.1
|
|
39
|
-
|
|
40
|
-
# Verify the port forward is active
|
|
41
|
-
netsh interface portproxy show all
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Configure your .env file in WSL**:
|
|
17
|
+
The server bundles `joplin` as an npm dependency and manages its own Joplin Terminal process. No Joplin desktop app needed — the sidecar handles everything: data storage, sync, and the REST API.
|
|
45
18
|
|
|
46
19
|
```bash
|
|
47
|
-
#
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
# Basic usage — sidecar starts automatically
|
|
21
|
+
npx joplin-mcp-server --token your_token
|
|
22
|
+
|
|
23
|
+
# With cloud sync
|
|
24
|
+
npx joplin-mcp-server --token your_token \
|
|
25
|
+
--sync-target joplin-cloud \
|
|
26
|
+
--sync-username user@example.com --sync-password pass
|
|
27
|
+
|
|
28
|
+
# With filesystem sync (e.g. OneDrive folder)
|
|
29
|
+
npx joplin-mcp-server --token your_token \
|
|
30
|
+
--sync-target filesystem \
|
|
31
|
+
--sync-path /mnt/c/Users/you/OneDrive/Joplin
|
|
51
32
|
```
|
|
52
33
|
|
|
53
|
-
|
|
34
|
+
The Joplin CLI is resolved in this order: `JOPLIN_CLI` env var > `node_modules/.bin/joplin` (bundled) > global install > `npx` fallback.
|
|
54
35
|
|
|
55
|
-
|
|
56
|
-
# From WSL
|
|
57
|
-
cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
|
|
58
|
-
# This gives the WSL bridge IP (e.g., 10.255.255.254)
|
|
36
|
+
Data is stored in `~/.config/joplin-mcp` by default (separate from any desktop Joplin install).
|
|
59
37
|
|
|
60
|
-
|
|
61
|
-
# Check in Windows: ipconfig (look for IPv4 Address)
|
|
62
|
-
```
|
|
38
|
+
### External Mode
|
|
63
39
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```powershell
|
|
67
|
-
netsh interface portproxy delete v4tov4 listenport=41184 listenaddress=0.0.0.0
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Note**: This port forwarding rule persists across reboots - you only need to set it up once!
|
|
71
|
-
|
|
72
|
-
#### Option 2: Configure Joplin to Listen on All Interfaces (Alternative)
|
|
73
|
-
|
|
74
|
-
If you prefer to configure Joplin directly instead of using port forwarding:
|
|
75
|
-
|
|
76
|
-
1. **Find your Joplin configuration file**:
|
|
77
|
-
- Windows: `C:\Users\YourUsername\.config\joplin-desktop\settings.json`
|
|
78
|
-
|
|
79
|
-
2. **Add this configuration to settings.json**:
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"clipperServer.host": "0.0.0.0"
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
3. **Restart Joplin** for the changes to take effect
|
|
88
|
-
|
|
89
|
-
4. **Set your .env file in WSL**:
|
|
90
|
-
```
|
|
91
|
-
JOPLIN_HOST=10.255.255.254 # WSL bridge IP from /etc/resolv.conf
|
|
92
|
-
JOPLIN_PORT=41184
|
|
93
|
-
JOPLIN_TOKEN=your_joplin_token
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Security Note**: This makes Joplin accessible on your entire local network. The API token is still required for all operations.
|
|
97
|
-
|
|
98
|
-
#### Troubleshooting WSL Connectivity
|
|
99
|
-
|
|
100
|
-
**Test connectivity from WSL**:
|
|
40
|
+
Connects to an existing Joplin instance instead of spawning a sidecar. Activated by setting `JOPLIN_HOST` or `JOPLIN_PORT`.
|
|
101
41
|
|
|
102
42
|
```bash
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
# Should return: JoplinClipperServer
|
|
106
|
-
|
|
107
|
-
# If using WSL bridge IP:
|
|
108
|
-
curl http://10.255.255.254:41184/ping
|
|
43
|
+
# Connect to Joplin desktop on another machine or Windows host
|
|
44
|
+
JOPLIN_HOST=192.168.0.40 JOPLIN_PORT=41184 npx joplin-mcp-server --token your_token
|
|
109
45
|
```
|
|
110
46
|
|
|
111
|
-
|
|
47
|
+
## Configuration
|
|
48
|
+
|
|
49
|
+
### Environment Variables
|
|
112
50
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
51
|
+
| Variable | Description | Default |
|
|
52
|
+
| ---------------------- | ------------------------------------------------------- | ---------------------- |
|
|
53
|
+
| `JOPLIN_TOKEN` | API token (required) | -- |
|
|
54
|
+
| `JOPLIN_HOST` | Connect to existing Joplin at this host (skips sidecar) | -- |
|
|
55
|
+
| `JOPLIN_PORT` | Connect to existing Joplin on this port (skips sidecar) | -- |
|
|
56
|
+
| `JOPLIN_CLI` | Path to joplin CLI binary (overrides auto-detection) | -- |
|
|
57
|
+
| `JOPLIN_PROFILE` | Joplin data directory for sidecar mode | `~/.config/joplin-mcp` |
|
|
58
|
+
| `JOPLIN_SYNC_TARGET` | Sync target type | `none` |
|
|
59
|
+
| `JOPLIN_SYNC_PATH` | Sync target URL/path | -- |
|
|
60
|
+
| `JOPLIN_SYNC_USERNAME` | Sync username/email | -- |
|
|
61
|
+
| `JOPLIN_SYNC_PASSWORD` | Sync password | -- |
|
|
62
|
+
| `LOG_LEVEL` | Log level: debug, info, warn, error | `info` |
|
|
121
63
|
|
|
122
|
-
|
|
64
|
+
### Command Line Options
|
|
123
65
|
|
|
124
66
|
```
|
|
125
67
|
OPTIONS:
|
|
126
|
-
--env-file <file>
|
|
127
|
-
--
|
|
128
|
-
--
|
|
129
|
-
--
|
|
130
|
-
--
|
|
131
|
-
--
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
# Using command line arguments
|
|
139
|
-
npx joplin-mcp-server --token your_joplin_token
|
|
140
|
-
|
|
141
|
-
# Using environment file
|
|
142
|
-
npx joplin-mcp-server --env-file /path/to/your/.env
|
|
143
|
-
|
|
144
|
-
# WSL: Connect to Windows host
|
|
145
|
-
npx joplin-mcp-server --host 192.168.0.40 --token your_token
|
|
146
|
-
|
|
147
|
-
# HTTP mode (for testing with MCP Inspector)
|
|
148
|
-
npx joplin-mcp-server --transport http --token your_token
|
|
68
|
+
--env-file <file> Load environment variables from file
|
|
69
|
+
--token <token> Joplin API token
|
|
70
|
+
--transport <type> Transport type: stdio (default) or http
|
|
71
|
+
--http-port <port> HTTP server port (default: 3000, only with --transport http)
|
|
72
|
+
--profile <dir> Joplin data directory (default: ~/.config/joplin-mcp)
|
|
73
|
+
--sync-target <type> Sync target: none, filesystem, webdav, nextcloud,
|
|
74
|
+
joplin-cloud, joplin-server, s3, dropbox, onedrive
|
|
75
|
+
--sync-path <url> URL or path for sync target
|
|
76
|
+
--sync-username <user> Username/email for sync
|
|
77
|
+
--sync-password <pass> Password for sync
|
|
78
|
+
--help, -h Show help message
|
|
149
79
|
```
|
|
150
80
|
|
|
151
|
-
###
|
|
81
|
+
### Sync Targets
|
|
152
82
|
|
|
153
|
-
|
|
83
|
+
| Target | Required Options |
|
|
84
|
+
| --------------- | ------------------------------------------------------------------------------------ |
|
|
85
|
+
| `none` | (default, no sync) |
|
|
86
|
+
| `filesystem` | `--sync-path /path/to/dir` |
|
|
87
|
+
| `webdav` | `--sync-path <url>` `--sync-username` `--sync-password` |
|
|
88
|
+
| `nextcloud` | `--sync-path <url>` `--sync-username` `--sync-password` |
|
|
89
|
+
| `joplin-cloud` | `--sync-username` `--sync-password` |
|
|
90
|
+
| `joplin-server` | `--sync-path <url>` `--sync-username` `--sync-password` |
|
|
91
|
+
| `s3` | `--sync-path <bucket>` `--sync-username <access-key>` `--sync-password <secret-key>` |
|
|
92
|
+
| `dropbox` | (OAuth flow) |
|
|
93
|
+
| `onedrive` | (OAuth flow) |
|
|
154
94
|
|
|
155
|
-
|
|
95
|
+
## MCP Client Configuration
|
|
156
96
|
|
|
157
|
-
|
|
97
|
+
### Claude Code
|
|
158
98
|
|
|
159
|
-
|
|
99
|
+
The repository includes a `.mcp.json` that works with Claude Code's env var expansion:
|
|
160
100
|
|
|
161
101
|
```json
|
|
162
102
|
{
|
|
163
103
|
"mcpServers": {
|
|
164
104
|
"joplin": {
|
|
165
|
-
"command": "
|
|
166
|
-
"args": ["
|
|
105
|
+
"command": "node",
|
|
106
|
+
"args": ["dist/bin.js"],
|
|
167
107
|
"env": {
|
|
168
|
-
"JOPLIN_TOKEN": "
|
|
169
|
-
"JOPLIN_PORT": "41184",
|
|
170
|
-
"JOPLIN_HOST": "127.0.0.1"
|
|
108
|
+
"JOPLIN_TOKEN": "${JOPLIN_TOKEN}"
|
|
171
109
|
}
|
|
172
110
|
}
|
|
173
111
|
}
|
|
174
112
|
}
|
|
175
113
|
```
|
|
176
114
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"mcpServers": {
|
|
182
|
-
"joplin": {
|
|
183
|
-
"command": "npx",
|
|
184
|
-
"args": ["joplin-mcp-server", "--token", "your_actual_token_here", "--port", "41184", "--host", "127.0.0.1"]
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
Restart Claude Desktop after updating the configuration.
|
|
191
|
-
|
|
192
|
-
#### Claude Code Configuration
|
|
193
|
-
|
|
194
|
-
Claude Code supports environment variable expansion in `.mcp.json`.
|
|
195
|
-
|
|
196
|
-
**1. Set environment variables in your shell** (add to `~/.bashrc` or `~/.zshrc`):
|
|
115
|
+
Set `JOPLIN_TOKEN` in your shell (add to `~/.bashrc` or `~/.zshrc`):
|
|
197
116
|
|
|
198
117
|
```bash
|
|
199
118
|
export JOPLIN_TOKEN="your_actual_token_here"
|
|
200
|
-
export JOPLIN_PORT="41184" # Optional, defaults to 41184
|
|
201
|
-
export JOPLIN_HOST="127.0.0.1" # Optional, defaults to 127.0.0.1
|
|
202
119
|
```
|
|
203
120
|
|
|
204
|
-
|
|
121
|
+
### Claude Desktop
|
|
205
122
|
|
|
206
|
-
|
|
123
|
+
Claude Desktop does **not** support `${VAR}` expansion. Provide values directly:
|
|
207
124
|
|
|
208
125
|
```json
|
|
209
126
|
{
|
|
210
127
|
"mcpServers": {
|
|
211
128
|
"joplin": {
|
|
212
129
|
"command": "npx",
|
|
213
|
-
"args": ["joplin-mcp-server"]
|
|
214
|
-
"env": {
|
|
215
|
-
"JOPLIN_TOKEN": "${JOPLIN_TOKEN}"
|
|
216
|
-
}
|
|
130
|
+
"args": ["joplin-mcp-server", "--token", "your_actual_token_here"]
|
|
217
131
|
}
|
|
218
132
|
}
|
|
219
133
|
}
|
|
220
134
|
```
|
|
221
135
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
#### Other MCP Clients (Cursor, etc.)
|
|
225
|
-
|
|
226
|
-
Most MCP clients support environment variable expansion (`${VAR}` syntax).
|
|
227
|
-
|
|
228
|
-
**With environment variables:**
|
|
136
|
+
### With Sync (Claude Desktop)
|
|
229
137
|
|
|
230
138
|
```json
|
|
231
139
|
{
|
|
232
140
|
"mcpServers": {
|
|
233
141
|
"joplin": {
|
|
234
142
|
"command": "npx",
|
|
235
|
-
"args": [
|
|
236
|
-
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
|
|
143
|
+
"args": [
|
|
144
|
+
"joplin-mcp-server",
|
|
145
|
+
"--token",
|
|
146
|
+
"your_token",
|
|
147
|
+
"--sync-target",
|
|
148
|
+
"filesystem",
|
|
149
|
+
"--sync-path",
|
|
150
|
+
"/path/to/sync/dir"
|
|
151
|
+
]
|
|
241
152
|
}
|
|
242
153
|
}
|
|
243
154
|
}
|
|
244
155
|
```
|
|
245
156
|
|
|
246
|
-
|
|
157
|
+
### External Mode
|
|
247
158
|
|
|
248
159
|
```json
|
|
249
160
|
{
|
|
250
161
|
"mcpServers": {
|
|
251
162
|
"joplin": {
|
|
252
163
|
"command": "npx",
|
|
253
|
-
"args": ["joplin-mcp-server",
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
**Using environment file:**
|
|
260
|
-
|
|
261
|
-
```json
|
|
262
|
-
{
|
|
263
|
-
"mcpServers": {
|
|
264
|
-
"joplin": {
|
|
265
|
-
"command": "npx",
|
|
266
|
-
"args": ["joplin-mcp-server", "--env-file", "/path/to/your/.env"]
|
|
164
|
+
"args": ["joplin-mcp-server"],
|
|
165
|
+
"env": {
|
|
166
|
+
"JOPLIN_TOKEN": "your_actual_token_here",
|
|
167
|
+
"JOPLIN_HOST": "192.168.0.40",
|
|
168
|
+
"JOPLIN_PORT": "41184"
|
|
169
|
+
}
|
|
267
170
|
}
|
|
268
171
|
}
|
|
269
172
|
}
|
|
270
173
|
```
|
|
271
174
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
The server logs all incoming commands and outgoing responses. Logs are stored in two places:
|
|
275
|
-
|
|
276
|
-
1. **Console output**: Basic information is displayed in the console
|
|
277
|
-
2. **Log files**: Detailed logs are saved in the `logs` directory with timestamps
|
|
278
|
-
|
|
279
|
-
You can adjust the log level by setting the `LOG_LEVEL` environment variable:
|
|
175
|
+
### Docker
|
|
280
176
|
|
|
281
177
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
Available log levels (from most to least verbose):
|
|
286
|
-
|
|
287
|
-
- `debug`: All messages including detailed command and response data
|
|
288
|
-
- `info`: Standard operational messages (default)
|
|
289
|
-
- `warn`: Warnings and errors only
|
|
290
|
-
- `error`: Only error messages
|
|
291
|
-
|
|
292
|
-
## Available Tools
|
|
293
|
-
|
|
294
|
-
### list_notebooks
|
|
295
|
-
|
|
296
|
-
Retrieves the complete notebook hierarchy from Joplin.
|
|
297
|
-
|
|
298
|
-
```
|
|
299
|
-
# Example output:
|
|
300
|
-
Notebook 1 (id: "abc123")
|
|
301
|
-
Subnotebook 1.1 (id: "def456")
|
|
302
|
-
Subnotebook 1.2 (id: "ghi789")
|
|
303
|
-
Notebook 2 (id: "jkl012")
|
|
178
|
+
docker build -t joplin-mcp .
|
|
179
|
+
docker run -e JOPLIN_TOKEN=your_token -p 3000:3000 joplin-mcp
|
|
304
180
|
```
|
|
305
181
|
|
|
306
|
-
|
|
182
|
+
## WSL Setup
|
|
307
183
|
|
|
308
|
-
|
|
184
|
+
Running in WSL? The sidecar architecture makes this straightforward — no Windows port forwarding needed.
|
|
309
185
|
|
|
310
|
-
|
|
186
|
+
### Filesystem Sync via OneDrive (Recommended)
|
|
311
187
|
|
|
312
|
-
|
|
188
|
+
Both your Windows Joplin desktop and the WSL sidecar sync to the same OneDrive folder. They see the same notes without needing to talk to each other directly.
|
|
313
189
|
|
|
190
|
+
```bash
|
|
191
|
+
# Point the sidecar at your OneDrive Joplin sync folder
|
|
192
|
+
npx joplin-mcp-server --token your_token \
|
|
193
|
+
--sync-target filesystem \
|
|
194
|
+
--sync-path /mnt/c/Users/YourName/OneDrive/Joplin
|
|
314
195
|
```
|
|
315
|
-
# Example usage:
|
|
316
|
-
search_notes query="project meeting"
|
|
317
|
-
|
|
318
|
-
# Example output:
|
|
319
|
-
Found 2 notes matching query: "project meeting"
|
|
320
|
-
NOTE: To read a notebook, use the notebook ID (not the note title)
|
|
321
|
-
|
|
322
|
-
- Note: "Weekly Project Meeting" (note_id: "abc123")
|
|
323
|
-
Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
324
|
-
Updated: 3/15/2025, 10:30:45 AM
|
|
325
|
-
Snippet: Notes from our weekly project meeting. Topics discussed: timeline, resources, next steps...
|
|
326
|
-
To read this notebook: read_notebook notebook_id="58a0a29f68bc4141b49c99f5d367638a"
|
|
327
|
-
|
|
328
|
-
- Note: "Project Kickoff Meeting" (note_id: "def456")
|
|
329
|
-
Notebook: "Projects" (notebook_id: "72b1c45d89ef3212a67b98f4e5d23a1b")
|
|
330
|
-
Updated: 3/10/2025, 2:15:30 PM
|
|
331
|
-
Snippet: Initial project meeting with stakeholders. Key decisions: project scope, team members...
|
|
332
|
-
To read this notebook: read_notebook notebook_id="72b1c45d89ef3212a67b98f4e5d23a1b"
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
> **Important**: Note the difference between note titles and IDs. When using the `read_notebook` command, you must use the notebook ID (a long alphanumeric string), not the notebook title.
|
|
336
|
-
|
|
337
|
-
### read_notebook
|
|
338
|
-
|
|
339
|
-
Reads the contents of a specific notebook.
|
|
340
|
-
|
|
341
|
-
**Parameters:**
|
|
342
|
-
|
|
343
|
-
- `notebook_id`: The ID of the notebook to read
|
|
344
|
-
|
|
345
|
-
```
|
|
346
|
-
# Example usage:
|
|
347
|
-
read_notebook notebook_id="58a0a29f68bc4141b49c99f5d367638a"
|
|
348
|
-
|
|
349
|
-
# Example output:
|
|
350
|
-
# Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
351
|
-
Contains 3 notes:
|
|
352
|
-
NOTE: This is showing the contents of notebook "Work", not a specific note.
|
|
353
|
-
|
|
354
|
-
- Note: "Weekly Project Meeting" (note_id: "def456")
|
|
355
|
-
Updated: 3/15/2025, 10:30:45 AM
|
|
356
|
-
|
|
357
|
-
- ✅ Note: "Call client" (note_id: "ghi789")
|
|
358
|
-
Updated: 3/14/2025, 3:45:12 PM
|
|
359
|
-
|
|
360
|
-
- ☐ Note: "Prepare presentation" (note_id: "jkl012")
|
|
361
|
-
Updated: 3/13/2025, 9:20:33 AM
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
> **Common Error**: If you try to use a note title (like "todo") instead of a notebook ID, you'll get an error. Always use the notebook ID (the long alphanumeric string) shown in the search results or notebook list.
|
|
365
196
|
|
|
366
|
-
|
|
197
|
+
In your Joplin desktop app, configure sync to the same OneDrive folder: **Tools > Options > Synchronisation > File system > /Users/YourName/OneDrive/Joplin**
|
|
367
198
|
|
|
368
|
-
|
|
199
|
+
### Cloud Sync
|
|
369
200
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
- `note_id`: The ID of the note to read
|
|
201
|
+
Alternatively, both instances can sync to Joplin Cloud or any other cloud backend:
|
|
373
202
|
|
|
203
|
+
```bash
|
|
204
|
+
npx joplin-mcp-server --token your_token \
|
|
205
|
+
--sync-target joplin-cloud \
|
|
206
|
+
--sync-username user@example.com --sync-password pass
|
|
374
207
|
```
|
|
375
|
-
# Example usage:
|
|
376
|
-
read_note note_id="def456"
|
|
377
|
-
|
|
378
|
-
# Example output:
|
|
379
|
-
# Note: "Weekly Project Meeting"
|
|
380
|
-
Note ID: def456
|
|
381
|
-
Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
382
|
-
Created: 3/15/2025, 10:00:12 AM
|
|
383
|
-
Updated: 3/15/2025, 10:30:45 AM
|
|
384
|
-
|
|
385
|
-
---
|
|
386
208
|
|
|
387
|
-
|
|
209
|
+
### External Mode (Port Forwarding)
|
|
388
210
|
|
|
389
|
-
|
|
390
|
-
1. Project status update
|
|
391
|
-
2. Timeline review
|
|
392
|
-
3. Resource allocation
|
|
393
|
-
4. Next steps
|
|
211
|
+
If you prefer to connect directly to Windows Joplin instead of running a sidecar:
|
|
394
212
|
|
|
395
|
-
|
|
396
|
-
- Project is on track for Q2 delivery
|
|
397
|
-
- Need to allocate additional resources to the UI team
|
|
398
|
-
- Next meeting scheduled for next Friday
|
|
213
|
+
**On Windows (PowerShell as Administrator):**
|
|
399
214
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
Related commands:
|
|
403
|
-
- To view the notebook containing this note: read_notebook notebook_id="58a0a29f68bc4141b49c99f5d367638a"
|
|
404
|
-
- To search for more notes: search_notes query="your search term"
|
|
215
|
+
```powershell
|
|
216
|
+
netsh interface portproxy add v4tov4 listenport=41184 listenaddress=0.0.0.0 connectport=41184 connectaddress=127.0.0.1
|
|
405
217
|
```
|
|
406
218
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
### read_multinote
|
|
410
|
-
|
|
411
|
-
Reads the full content of multiple notes at once.
|
|
412
|
-
|
|
413
|
-
**Parameters:**
|
|
414
|
-
|
|
415
|
-
- `note_ids`: An array of note IDs to read
|
|
219
|
+
**In WSL:**
|
|
416
220
|
|
|
221
|
+
```bash
|
|
222
|
+
JOPLIN_HOST=192.168.0.40 JOPLIN_PORT=41184 npx joplin-mcp-server --token your_token
|
|
417
223
|
```
|
|
418
|
-
# Example usage:
|
|
419
|
-
read_multinote note_ids=["def456", "ghi789", "jkl012"]
|
|
420
|
-
|
|
421
|
-
# Example output:
|
|
422
|
-
# Reading 3 notes
|
|
423
|
-
|
|
424
|
-
## Note 1 of 3 (ID: def456)
|
|
425
|
-
|
|
426
|
-
### Note: "Weekly Project Meeting"
|
|
427
|
-
Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
428
|
-
Created: 3/15/2025, 10:00:12 AM
|
|
429
|
-
Updated: 3/15/2025, 10:30:45 AM
|
|
430
|
-
|
|
431
|
-
---
|
|
432
|
-
|
|
433
|
-
# Weekly Project Meeting
|
|
434
|
-
|
|
435
|
-
## Agenda
|
|
436
|
-
1. Project status update
|
|
437
|
-
2. Timeline review
|
|
438
|
-
|
|
439
|
-
---
|
|
440
|
-
|
|
441
|
-
## Note 2 of 3 (ID: ghi789)
|
|
442
|
-
|
|
443
|
-
### Note: "Call client"
|
|
444
|
-
Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
445
|
-
Status: Completed
|
|
446
|
-
Created: 3/14/2025, 3:00:00 PM
|
|
447
|
-
Updated: 3/14/2025, 3:45:12 PM
|
|
448
|
-
|
|
449
|
-
---
|
|
450
|
-
|
|
451
|
-
Discussed project timeline and next steps.
|
|
452
|
-
Client is happy with progress.
|
|
453
224
|
|
|
454
|
-
|
|
225
|
+
Find your Windows IP with `ipconfig` on Windows or `cat /etc/resolv.conf | grep nameserver` from WSL.
|
|
455
226
|
|
|
456
|
-
##
|
|
457
|
-
|
|
458
|
-
### Note: "Prepare presentation"
|
|
459
|
-
Notebook: "Work" (notebook_id: "58a0a29f68bc4141b49c99f5d367638a")
|
|
460
|
-
Status: Not completed
|
|
461
|
-
Due: 3/20/2025, 9:00:00 AM
|
|
462
|
-
Created: 3/13/2025, 9:00:00 AM
|
|
463
|
-
Updated: 3/13/2025, 9:20:33 AM
|
|
464
|
-
|
|
465
|
-
---
|
|
466
|
-
|
|
467
|
-
# Presentation Outline
|
|
468
|
-
- Introduction
|
|
469
|
-
- Project overview
|
|
470
|
-
- Timeline
|
|
471
|
-
- Budget
|
|
472
|
-
- Next steps
|
|
473
|
-
|
|
474
|
-
---
|
|
475
|
-
|
|
476
|
-
# Summary
|
|
477
|
-
Total notes requested: 3
|
|
478
|
-
Successfully retrieved: 3
|
|
479
|
-
```
|
|
227
|
+
## Available Tools
|
|
480
228
|
|
|
481
|
-
|
|
229
|
+
| Tool | Description |
|
|
230
|
+
| ---------------- | ----------------------------------------------------- |
|
|
231
|
+
| `list_notebooks` | Retrieve the complete notebook hierarchy |
|
|
232
|
+
| `search_notes` | Search for notes by query string |
|
|
233
|
+
| `read_notebook` | Read contents of a specific notebook |
|
|
234
|
+
| `read_note` | Read full content of a specific note |
|
|
235
|
+
| `read_multinote` | Read multiple notes at once |
|
|
236
|
+
| `create_note` | Create a new note |
|
|
237
|
+
| `create_folder` | Create a new notebook |
|
|
238
|
+
| `edit_note` | Edit an existing note |
|
|
239
|
+
| `edit_folder` | Edit an existing notebook |
|
|
240
|
+
| `delete_note` | Delete a note (requires confirmation) |
|
|
241
|
+
| `delete_folder` | Delete a notebook (requires confirmation) |
|
|
242
|
+
| `sync` | Trigger a Joplin sync with the configured sync target |
|
|
482
243
|
|
|
483
244
|
## Development
|
|
484
245
|
|
|
485
|
-
### Local Development Setup
|
|
486
|
-
|
|
487
246
|
```bash
|
|
488
|
-
# Install dependencies
|
|
489
|
-
pnpm
|
|
490
|
-
|
|
491
|
-
#
|
|
492
|
-
pnpm
|
|
493
|
-
|
|
494
|
-
#
|
|
495
|
-
pnpm test
|
|
496
|
-
|
|
497
|
-
# Format code
|
|
498
|
-
pnpm format
|
|
499
|
-
|
|
500
|
-
# Run linter
|
|
501
|
-
pnpm lint
|
|
502
|
-
|
|
503
|
-
# Run validation (format + lint + test + build)
|
|
504
|
-
pnpm validate
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
### Testing Local Changes
|
|
508
|
-
|
|
509
|
-
```bash
|
|
510
|
-
# Link for local development
|
|
511
|
-
npm link
|
|
512
|
-
|
|
513
|
-
# Test the CLI
|
|
514
|
-
npx joplin-mcp-server --help
|
|
515
|
-
|
|
516
|
-
# Unlink when done
|
|
517
|
-
npm unlink -g joplin-mcp-server
|
|
247
|
+
pnpm install # Install dependencies
|
|
248
|
+
pnpm build # Build to dist/
|
|
249
|
+
pnpm test # Run tests
|
|
250
|
+
pnpm validate # Format + lint + typecheck + test + build
|
|
251
|
+
pnpm serve:dev # Dev mode with hot reload (stdio)
|
|
252
|
+
pnpm serve:dev:http # Dev mode with hot reload (HTTP)
|
|
253
|
+
pnpm inspect # Build and open MCP Inspector
|
|
518
254
|
```
|
|
519
255
|
|
|
520
256
|
## License
|
package/dist/bin.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { };
|