remnote-mcp-server 0.1.3 → 0.3.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/CHANGELOG.md +78 -0
- package/README.md +226 -224
- package/dist/cli.d.ts +14 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +41 -0
- package/dist/config.js.map +1 -0
- package/dist/http-server.d.ts +23 -0
- package/dist/http-server.js +197 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.js +48 -25
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +20 -0
- package/dist/logger.js +85 -0
- package/dist/logger.js.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +48 -50
- package/dist/tools/index.js.map +1 -1
- package/dist/websocket-server.d.ts +5 -1
- package/dist/websocket-server.js +53 -10
- package/dist/websocket-server.js.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
# RemNote MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
 
|
|
4
|
+

|
|
5
|
+
[](https://codecov.io/gh/robert7/remnote-mcp-server)
|
|
5
6
|
|
|
6
|
-
MCP server that bridges
|
|
7
|
-
|
|
7
|
+
MCP server that bridges AI agents (e.g. Claude Code) to [RemNote](https://remnote.com/) via the [RemNote MCP Bridge
|
|
8
|
+
plugin](https://github.com/robert7/remnote-mcp-bridge).
|
|
8
9
|
|
|
9
10
|
## Demo
|
|
10
11
|
|
|
11
12
|
See Claude Code in action with RemNote: **[View Demo →](docs/demo.md)**
|
|
12
13
|
|
|
14
|
+
## Two-Component Architecture
|
|
15
|
+
|
|
16
|
+
This system consists of **two separate components** that work together:
|
|
17
|
+
|
|
18
|
+
1. **[RemNote MCP Bridge](https://github.com/robert7/remnote-mcp-bridge)** - A RemNote plugin that runs in your browser
|
|
19
|
+
or RemNote desktop app and exposes RemNote API functionality via WebSocket
|
|
20
|
+
2. **RemNote MCP Server** (this repository) - A standalone server that connects your AI assistant to the bridge using
|
|
21
|
+
MCP protocol
|
|
22
|
+
|
|
23
|
+
**Both components are required** for AI integration with RemNote.
|
|
24
|
+
|
|
13
25
|
## What is This?
|
|
14
26
|
|
|
15
27
|
The RemNote MCP Server enables AI assistants like Claude Code to interact directly with your RemNote knowledge base
|
|
@@ -19,15 +31,35 @@ notes, and maintain your daily journal—all through conversational commands.
|
|
|
19
31
|
**Architecture:**
|
|
20
32
|
|
|
21
33
|
```text
|
|
22
|
-
AI
|
|
34
|
+
AI agents (HTTP) ↔ MCP HTTP Server :3001 ↔ WebSocket Server :3002 ↔ RemNote Plugin ↔ RemNote
|
|
23
35
|
```
|
|
24
36
|
|
|
25
37
|
The server acts as a bridge:
|
|
26
38
|
|
|
27
|
-
- Communicates with
|
|
28
|
-
-
|
|
39
|
+
- Communicates with AI agents via Streamable HTTP transport (MCP protocol)
|
|
40
|
+
- HTTP server (port 3001) manages MCP sessions for multiple concurrent agents
|
|
41
|
+
- WebSocket server (port 3002) connects to the RemNote browser plugin
|
|
29
42
|
- Translates MCP tool calls into RemNote API actions
|
|
30
43
|
|
|
44
|
+
**About Streamable HTTP Transport**
|
|
45
|
+
|
|
46
|
+
This MCP server uses [Streamable HTTP
|
|
47
|
+
transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#http-with-sse), a communication
|
|
48
|
+
mechanism for MCP that supports multiple concurrent clients.
|
|
49
|
+
|
|
50
|
+
**Key characteristics:**
|
|
51
|
+
|
|
52
|
+
- **Lifecycle management**: You must start the server independently (`npm start` or `npm run dev`). Claude Code connects
|
|
53
|
+
to the running server via HTTP.
|
|
54
|
+
- **Message protocol**: Communication uses JSON-RPC over HTTP POST for requests and Server-Sent Events (SSE) for
|
|
55
|
+
notifications.
|
|
56
|
+
- **Multi-client support**: Multiple AI agents can connect simultaneously, each with their own MCP session.
|
|
57
|
+
- **Session management**: Server tracks sessions via `mcp-session-id` headers and UUID-based request correlation.
|
|
58
|
+
|
|
59
|
+
This architecture enables multiple Claude Code windows to access RemNote concurrently while maintaining process
|
|
60
|
+
isolation and security boundaries. For technical details, see the [MCP
|
|
61
|
+
specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports).
|
|
62
|
+
|
|
31
63
|
## Features
|
|
32
64
|
|
|
33
65
|
- **Create Notes** - Create new notes with optional parent hierarchy and tags
|
|
@@ -37,41 +69,25 @@ The server acts as a bridge:
|
|
|
37
69
|
- **Journal Entries** - Append timestamped entries to daily documents
|
|
38
70
|
- **Connection Status** - Check server and plugin connection health
|
|
39
71
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
**This MCP server enforces a strict 1:1:1 relationship:** one AI agent ↔ one MCP server instance ↔ one RemNote plugin
|
|
43
|
-
connection.
|
|
72
|
+
## Multi-Agent Support
|
|
44
73
|
|
|
45
|
-
|
|
74
|
+
**Multiple AI agents can now connect simultaneously!** The server uses Streamable HTTP transport, allowing multiple
|
|
75
|
+
Claude Code sessions (or other MCP clients) to access the same RemNote knowledge base concurrently.
|
|
46
76
|
|
|
47
|
-
|
|
48
|
-
simultaneously. Three architectural constraints prevent this:
|
|
77
|
+
### How It Works
|
|
49
78
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
3. **Port binding conflict** - Multiple server instances attempting to use the default port 3002 will fail with
|
|
55
|
-
`EADDRINUSE`.
|
|
79
|
+
- One long-running server process on ports 3001 (HTTP) and 3002 (WebSocket)
|
|
80
|
+
- Multiple AI agents connect via HTTP and get independent MCP sessions
|
|
81
|
+
- All sessions share the same WebSocket bridge to RemNote
|
|
82
|
+
- Concurrent requests are handled via UUID-based correlation
|
|
56
83
|
|
|
57
|
-
###
|
|
84
|
+
### Limitations
|
|
58
85
|
|
|
59
|
-
|
|
60
|
-
- **No concurrent access** - Cannot have multiple AI assistants modifying your RemNote knowledge base simultaneously
|
|
61
|
-
- **Separate workspaces don't help** - Even with different ports, only one plugin instance can connect to RemNote at a
|
|
62
|
-
time
|
|
86
|
+
The WebSocket bridge still enforces a **single RemNote plugin connection**. This means:
|
|
63
87
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
each with its own MCP server instance on different ports.
|
|
68
|
-
|
|
69
|
-
### Future Plans
|
|
70
|
-
|
|
71
|
-
**HTTP transport migration planned** - The single-agent limitation is a temporary architectural constraint. A future
|
|
72
|
-
version will migrate from stdio transport to HTTP transport (SSE), which would allow multiple AI agents to connect
|
|
73
|
-
to the same MCP server instance simultaneously. This would remove constraint #1 above while maintaining the existing
|
|
74
|
-
WebSocket bridge to RemNote.
|
|
88
|
+
- Multiple AI agents can connect to the server
|
|
89
|
+
- But only one RemNote app instance can be connected at a time
|
|
90
|
+
- This is a RemNote plugin limitation, not an MCP server limitation
|
|
75
91
|
|
|
76
92
|
## Prerequisites
|
|
77
93
|
|
|
@@ -85,6 +101,8 @@ WebSocket bridge to RemNote.
|
|
|
85
101
|
|
|
86
102
|
**From npm (recommended for most users):**
|
|
87
103
|
|
|
104
|
+
See [MCP Server npm Package](https://www.npmjs.com/package/remnote-mcp-server).
|
|
105
|
+
|
|
88
106
|
```bash
|
|
89
107
|
# Install globally
|
|
90
108
|
npm install -g remnote-mcp-server
|
|
@@ -107,151 +125,176 @@ npm uninstall -g remnote-mcp-server
|
|
|
107
125
|
git clone https://github.com/robert7/remnote-mcp-server.git
|
|
108
126
|
cd remnote-mcp-server
|
|
109
127
|
npm install
|
|
110
|
-
|
|
128
|
+
```
|
|
111
129
|
|
|
112
|
-
|
|
113
|
-
npm link
|
|
130
|
+
### 2. Install RemNote MCP Bridge Plugin
|
|
114
131
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
Install the [RemNote MCP Bridge plugin](https://github.com/robert7/remnote-mcp-bridge) in your RemNote app:
|
|
133
|
+
|
|
134
|
+
1. Open RemNote
|
|
135
|
+
2. Navigate to plugin installation (see plugin repository for instructions)
|
|
136
|
+
|
|
137
|
+
### 3. Start the Server
|
|
138
|
+
|
|
139
|
+
**IMPORTANT:** You must start the server before using it with Claude Code.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Start with default settings
|
|
143
|
+
remnote-mcp-server
|
|
144
|
+
|
|
145
|
+
# With custom ports
|
|
146
|
+
remnote-mcp-server --ws-port 4002 --http-port 4001
|
|
147
|
+
|
|
148
|
+
# With verbose logging
|
|
149
|
+
remnote-mcp-server --verbose
|
|
150
|
+
|
|
151
|
+
# With file logging
|
|
152
|
+
remnote-mcp-server --log-file /tmp/remnote-mcp.log --log-level-file debug
|
|
153
|
+
|
|
154
|
+
# OR development mode (with hot reload)
|
|
155
|
+
npm run dev
|
|
156
|
+
# you can also pass CLI options after `--`, e.g.
|
|
157
|
+
npm run dev -- -h
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**CLI Options:**
|
|
161
|
+
|
|
162
|
+
Server Configuration:
|
|
163
|
+
- `--ws-port <number>` - WebSocket port (default: 3002, env: REMNOTE_WS_PORT)
|
|
164
|
+
- `--http-port <number>` - HTTP MCP port (default: 3001, env: REMNOTE_HTTP_PORT)
|
|
165
|
+
|
|
166
|
+
Logging Configuration:
|
|
167
|
+
- `--log-level <level>` - Console log level: debug, info, warn, error (default: info)
|
|
168
|
+
- `--log-level-file <level>` - File log level (default: same as --log-level)
|
|
169
|
+
- `--verbose` - Shorthand for --log-level debug
|
|
170
|
+
- `--log-file <path>` - Log to file (default: console only)
|
|
171
|
+
- `--request-log <path>` - Log all WebSocket requests to file (JSON Lines)
|
|
172
|
+
- `--response-log <path>` - Log all WebSocket responses to file (JSON Lines)
|
|
173
|
+
|
|
174
|
+
Information:
|
|
175
|
+
- `-h, --help` - Display help message
|
|
176
|
+
- `-v, --version` - Display version number
|
|
177
|
+
|
|
178
|
+
Expected output:
|
|
118
179
|
```
|
|
180
|
+
RemNote MCP Server v0.2.1 listening { wsPort: 3002, httpPort: 3001 }
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Keep this terminal running. The server must be running for Claude Code to connect.
|
|
119
184
|
|
|
120
|
-
|
|
121
|
-
executable, allowing Claude Code to launch `remnote-mcp-server` from anywhere without publishing to npm.
|
|
185
|
+
## Configuration of AI Agents
|
|
122
186
|
|
|
123
|
-
|
|
124
|
-
uses a different Node.js version or environment (e.g., different shell PATH), it won't find the command. Ensure your
|
|
125
|
-
shell configuration (`.bashrc`, `.zshrc`) properly exposes your Node.js environment.
|
|
187
|
+
### Claude Code CLI
|
|
126
188
|
|
|
127
|
-
|
|
189
|
+
Use the `claude mcp` CLI commands to add, test, and remove the MCP server.
|
|
128
190
|
|
|
129
|
-
|
|
191
|
+
**Add the server:**
|
|
130
192
|
|
|
131
193
|
```bash
|
|
132
|
-
#
|
|
133
|
-
|
|
194
|
+
# goto your project directory
|
|
195
|
+
cd /Users/username/Projects/sample-project
|
|
196
|
+
claude mcp add remnote --transport http http://localhost:3001/mcp
|
|
197
|
+
```
|
|
134
198
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
199
|
+
Example output:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
Added HTTP MCP server remnote with URL: http://localhost:3001/mcp to local config
|
|
203
|
+
File modified: /Users/username/.claude.json [project: /Users/username/Projects/sample-project]
|
|
138
204
|
```
|
|
139
205
|
|
|
140
|
-
|
|
206
|
+
**Verify connection:**
|
|
141
207
|
|
|
142
|
-
|
|
208
|
+
```bash
|
|
209
|
+
claude mcp list
|
|
210
|
+
```
|
|
143
211
|
|
|
144
|
-
|
|
145
|
-
the preferred communication mechanism for MCP. In stdio transport, Claude Code launches the server as a subprocess and
|
|
146
|
-
exchanges JSON-RPC messages via standard input/output streams.
|
|
212
|
+
Example output:
|
|
147
213
|
|
|
148
|
-
|
|
214
|
+
```text
|
|
215
|
+
remnote: http://localhost:3001/mcp (HTTP) - ✓ Connected
|
|
216
|
+
```
|
|
149
217
|
|
|
150
|
-
|
|
151
|
-
server is launched as a subprocess, not a standalone service.
|
|
152
|
-
- **Message protocol**: Communication uses newline-delimited JSON-RPC messages on stdin (client → server) and stdout
|
|
153
|
-
(server → client). No HTTP/REST endpoints are exposed.
|
|
154
|
-
- **Logging constraint**: stdout is reserved exclusively for MCP protocol messages. All logging must go to stderr, which
|
|
155
|
-
is why the codebase uses `console.error()` for logs.
|
|
218
|
+
As alternative you can use `/mcp` command in any Claude Code session to check the connection health.
|
|
156
219
|
|
|
157
|
-
|
|
158
|
-
boundaries. For technical details, see the [MCP
|
|
159
|
-
specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports).
|
|
220
|
+
**Using the server:**
|
|
160
221
|
|
|
161
|
-
|
|
222
|
+
Once configured, Claude Code automatically loads RemNote tools in your sessions. See the [Example Usage](#example-usage)
|
|
223
|
+
section below for conversational commands.
|
|
162
224
|
|
|
163
|
-
|
|
225
|
+
```bash
|
|
226
|
+
# In any Claude Code session
|
|
227
|
+
claude
|
|
164
228
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
229
|
+
prompt:
|
|
230
|
+
show remnote note titles related do AI assisted coding
|
|
231
|
+
...
|
|
232
|
+
remnote - remnote_search (MCP)(query: "AI assisted coding", limit: 20, includeContent: false)
|
|
233
|
+
...
|
|
234
|
+
Found 20 notes related to "AI assisted coding". The main results include:
|
|
169
235
|
|
|
170
|
-
|
|
236
|
+
Primary note:
|
|
237
|
+
- AI assisted coding (remId: qtVwh5XBQbJM2HfSp)
|
|
171
238
|
|
|
172
|
-
|
|
239
|
+
Related tools/platforms:
|
|
240
|
+
- Claude Code
|
|
241
|
+
- Gemini CLI
|
|
242
|
+
...
|
|
243
|
+
```
|
|
173
244
|
|
|
174
|
-
**
|
|
245
|
+
**Remove the server:**
|
|
175
246
|
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"env": {
|
|
186
|
-
"REMNOTE_WS_PORT": "3002"
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
247
|
+
```bash
|
|
248
|
+
claude mcp remove remnote
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Example output:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
✓ Removed MCP server "remnote"
|
|
255
|
+
Config: /Users/username/.claude.json
|
|
193
256
|
```
|
|
194
257
|
|
|
195
|
-
|
|
258
|
+
### Claude Code CLI (manual configuration)
|
|
259
|
+
|
|
260
|
+
If you prefer to manually configure the MCP server in Claude Code CLI instead of using `claude mcp add`, you can
|
|
261
|
+
directly edit your `~/.claude.json` file.
|
|
196
262
|
|
|
197
|
-
|
|
198
|
-
projects
|
|
199
|
-
- **Project-specific:** Use a specific project path to limit availability to that project
|
|
200
|
-
- **Multiple projects:** Add `mcpServers` configuration under each project path as needed
|
|
263
|
+
MCP servers are configured in `~/.claude.json` under the `mcpServers` key within project-specific sections.
|
|
201
264
|
|
|
202
|
-
**
|
|
265
|
+
**Add to your `~/.claude.json`:**
|
|
203
266
|
|
|
204
267
|
```json
|
|
205
268
|
{
|
|
206
269
|
"projects": {
|
|
207
270
|
"/Users/username": {
|
|
271
|
+
...
|
|
208
272
|
"mcpServers": {
|
|
209
273
|
"remnote": {
|
|
210
|
-
"type": "
|
|
211
|
-
"
|
|
212
|
-
"args": [],
|
|
213
|
-
"env": {
|
|
214
|
-
"REMNOTE_WS_PORT": "3002"
|
|
215
|
-
}
|
|
274
|
+
"type": "http",
|
|
275
|
+
"url": "http://localhost:3001/mcp"
|
|
216
276
|
}
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
"/Users/username/Projects/my-project": {
|
|
220
|
-
"mcpServers": {
|
|
221
|
-
"remnote": {
|
|
222
|
-
"type": "stdio",
|
|
223
|
-
"command": "remnote-mcp-server",
|
|
224
|
-
"args": [],
|
|
225
|
-
"env": {
|
|
226
|
-
"REMNOTE_WS_PORT": "3002"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
277
|
+
...
|
|
232
278
|
}
|
|
233
279
|
```
|
|
234
280
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
Restart Claude Code completely to load the MCP server configuration. The server will start automatically when Claude
|
|
238
|
-
Code launches.
|
|
281
|
+
Restart Claude Code completely to load the MCP server configuration. Claude Code will connect to the running server.
|
|
239
282
|
|
|
240
283
|
## Verification
|
|
241
284
|
|
|
242
285
|
### Check Server is Running
|
|
243
286
|
|
|
244
|
-
|
|
287
|
+
Verify both ports are listening:
|
|
245
288
|
|
|
246
289
|
```bash
|
|
247
|
-
# Check
|
|
248
|
-
|
|
290
|
+
# Check HTTP port (MCP)
|
|
291
|
+
lsof -i :3001
|
|
249
292
|
|
|
250
|
-
# Check WebSocket port
|
|
293
|
+
# Check WebSocket port (RemNote bridge)
|
|
251
294
|
lsof -i :3002
|
|
252
295
|
```
|
|
253
296
|
|
|
254
|
-
You should see the `
|
|
297
|
+
You should see the `node` process listening on both ports.
|
|
255
298
|
|
|
256
299
|
### Check RemNote Plugin Connection
|
|
257
300
|
|
|
@@ -272,12 +315,11 @@ Use remnote_status to check the connection
|
|
|
272
315
|
Expected response:
|
|
273
316
|
|
|
274
317
|
```json
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
318
|
+
⏺ remnote - remnote_status (MCP)
|
|
319
|
+
⎿ {
|
|
320
|
+
"connected": true,
|
|
321
|
+
"pluginVersion": "0.3.2"
|
|
322
|
+
}
|
|
281
323
|
```
|
|
282
324
|
|
|
283
325
|
### Test RemNote Integration
|
|
@@ -343,30 +385,24 @@ Check if RemNote is connected
|
|
|
343
385
|
|
|
344
386
|
### Environment Variables
|
|
345
387
|
|
|
388
|
+
- `REMNOTE_HTTP_PORT` - HTTP MCP server port (default: 3001)
|
|
346
389
|
- `REMNOTE_WS_PORT` - WebSocket server port (default: 3002)
|
|
347
390
|
|
|
348
|
-
**Example with custom
|
|
391
|
+
**Example with custom ports:**
|
|
349
392
|
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
"command": "remnote-mcp-server",
|
|
358
|
-
"args": [],
|
|
359
|
-
"env": {
|
|
360
|
-
"REMNOTE_WS_PORT": "3003"
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
393
|
+
```bash
|
|
394
|
+
# Set environment variables before starting
|
|
395
|
+
export REMNOTE_HTTP_PORT=3003
|
|
396
|
+
export REMNOTE_WS_PORT=3004
|
|
397
|
+
npm start
|
|
398
|
+
# you can pass CLI options after `--`, e.g.
|
|
399
|
+
npm start -- -h
|
|
367
400
|
```
|
|
368
401
|
|
|
369
|
-
|
|
402
|
+
Then update your `~/.claude.json` and RemNote plugin settings to use the new ports.
|
|
403
|
+
|
|
404
|
+
**Note:** If you change the WebSocket port, you must also update the WebSocket URL in the RemNote MCP Bridge plugin
|
|
405
|
+
settings.
|
|
370
406
|
|
|
371
407
|
### RemNote Plugin Settings
|
|
372
408
|
|
|
@@ -379,43 +415,35 @@ Configure in the plugin control panel:
|
|
|
379
415
|
|
|
380
416
|
### Server Not Starting
|
|
381
417
|
|
|
382
|
-
1. **
|
|
383
|
-
```bash
|
|
384
|
-
which remnote-mcp-server
|
|
385
|
-
```
|
|
386
|
-
Should return a path to the executable.
|
|
387
|
-
|
|
388
|
-
2. **Reinstall if needed:**
|
|
389
|
-
|
|
390
|
-
**For npm installation:**
|
|
418
|
+
1. **Verify the server is running:**
|
|
391
419
|
```bash
|
|
392
|
-
|
|
420
|
+
lsof -i :3001
|
|
421
|
+
lsof -i :3002
|
|
393
422
|
```
|
|
423
|
+
Both ports should show active listeners.
|
|
394
424
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
```bash
|
|
403
|
-
tail -f ~/.claude/debug/mcp-*.log
|
|
404
|
-
```
|
|
425
|
+
2. **Check server output:**
|
|
426
|
+
- You should see: `[HTTP Server] Listening on port 3001`
|
|
427
|
+
- And: `[WebSocket Server] Listening on port 3002`
|
|
428
|
+
3. **If server fails to start:**
|
|
429
|
+
- Check if ports are already in use (see "Port Already in Use" below)
|
|
430
|
+
- Verify installation: `which remnote-mcp-server`
|
|
431
|
+
- Check server logs for errors
|
|
405
432
|
|
|
406
|
-
### Port
|
|
433
|
+
### Port Already in Use
|
|
407
434
|
|
|
408
|
-
If you see "EADDRINUSE" error:
|
|
435
|
+
If you see "EADDRINUSE" error for port 3001 or 3002:
|
|
409
436
|
|
|
410
437
|
```bash
|
|
411
|
-
# Find what's using the
|
|
438
|
+
# Find what's using the ports
|
|
439
|
+
lsof -i :3001
|
|
412
440
|
lsof -i :3002
|
|
413
441
|
|
|
414
442
|
# Kill the process if needed
|
|
415
443
|
kill -9 <PID>
|
|
416
444
|
```
|
|
417
445
|
|
|
418
|
-
Alternatively, configure
|
|
446
|
+
Alternatively, configure different ports using environment variables (see Configuration section).
|
|
419
447
|
|
|
420
448
|
### Plugin Won't Connect
|
|
421
449
|
|
|
@@ -447,32 +475,34 @@ Alternatively, configure a different port in both `~/.claude.json` and the RemNo
|
|
|
447
475
|
|
|
448
476
|
### Configuration Not Working
|
|
449
477
|
|
|
450
|
-
**Common
|
|
478
|
+
**Common issues:**
|
|
479
|
+
|
|
480
|
+
❌ **Wrong transport type:**
|
|
481
|
+
```json
|
|
482
|
+
"type": "stdio" // OLD - doesn't work anymore
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
✅ **Correct transport type:**
|
|
486
|
+
```json
|
|
487
|
+
"type": "http" // NEW - required
|
|
488
|
+
```
|
|
451
489
|
|
|
452
|
-
❌ **
|
|
490
|
+
❌ **Using command instead of URL:**
|
|
453
491
|
```json
|
|
454
|
-
// File: ~/.claude/.mcp.json
|
|
455
492
|
{
|
|
456
|
-
"
|
|
493
|
+
"type": "stdio",
|
|
494
|
+
"command": "remnote-mcp-server" // OLD
|
|
457
495
|
}
|
|
458
496
|
```
|
|
459
497
|
|
|
460
|
-
✅ **Correct
|
|
498
|
+
✅ **Correct configuration:**
|
|
461
499
|
```json
|
|
462
|
-
// File: ~/.claude.json
|
|
463
500
|
{
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
"mcpServers": {
|
|
467
|
-
"remnote": { ... }
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
}
|
|
501
|
+
"type": "http",
|
|
502
|
+
"url": "http://127.0.0.1:3001/mcp" // NEW
|
|
471
503
|
}
|
|
472
504
|
```
|
|
473
505
|
|
|
474
|
-
The `enabledMcpjsonServers` setting in `~/.claude/settings.json` is also deprecated and no longer needed.
|
|
475
|
-
|
|
476
506
|
## Development
|
|
477
507
|
|
|
478
508
|
### Setup
|
|
@@ -507,37 +537,9 @@ npm run lint # ESLint only
|
|
|
507
537
|
npm run format # Format code
|
|
508
538
|
```
|
|
509
539
|
|
|
510
|
-
### Before Committing
|
|
511
|
-
|
|
512
|
-
Run `./code-quality.sh` to ensure all checks pass.
|
|
513
|
-
|
|
514
|
-
### Manual Testing
|
|
515
|
-
|
|
516
|
-
To test the server independently (without Claude Code):
|
|
517
|
-
|
|
518
|
-
```bash
|
|
519
|
-
# Stop Claude Code first to free port 3002
|
|
520
|
-
cd ~/Projects/_private/remnote-mcp-server
|
|
521
|
-
npm run dev
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
Expected output:
|
|
525
|
-
```
|
|
526
|
-
[WebSocket Server] Listening on port 3002
|
|
527
|
-
[MCP Server] Server started on stdio
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
When the RemNote plugin connects:
|
|
531
|
-
```
|
|
532
|
-
[WebSocket Server] Client connected
|
|
533
|
-
[RemNote Bridge] RemNote plugin connected
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
Press Ctrl+C to stop.
|
|
537
|
-
|
|
538
540
|
### Development Documentation
|
|
539
541
|
|
|
540
|
-
- **[
|
|
542
|
+
- **[docs/architecture.md](./docs/architecture.md)** - Architecture and design rationale
|
|
541
543
|
- **[AGENTS.md](./AGENTS.md)** - AI agent and developer guidance
|
|
542
544
|
- **[CHANGELOG.md](./CHANGELOG.md)** - Version history
|
|
543
545
|
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CliOptions {
|
|
2
|
+
wsPort?: number;
|
|
3
|
+
httpPort?: number;
|
|
4
|
+
logLevel?: string;
|
|
5
|
+
logLevelFile?: string;
|
|
6
|
+
verbose?: boolean;
|
|
7
|
+
logFile?: string;
|
|
8
|
+
requestLog?: string;
|
|
9
|
+
responseLog?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Parse CLI arguments and return typed options
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseCliArgs(): CliOptions;
|