remnote-mcp-server 0.3.1 → 0.4.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 CHANGED
@@ -7,6 +7,42 @@ Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.0] - 2026-02-14
11
+
12
+ ### Added
13
+
14
+ - Host binding configuration for HTTP and WebSocket servers
15
+ - `--http-host` CLI option to control HTTP server binding address
16
+ - `REMNOTE_HTTP_HOST` environment variable for HTTP server binding
17
+ - Support for binding HTTP server to `0.0.0.0` for remote access (Docker, VPS deployments)
18
+ - Host validation in CLI with support for localhost, 127.0.0.1, 0.0.0.0, and valid IPv4 addresses
19
+
20
+ ### Changed
21
+
22
+ - HTTP server can now bind to configurable host address (default: 127.0.0.1)
23
+ - Improved logging to show bound host addresses on startup
24
+ - Updated all tests to pass host parameters to server constructors
25
+
26
+ ### Security
27
+
28
+ - WebSocket server host binding enforced to localhost (127.0.0.1) only - cannot be overridden
29
+ - Ensures RemNote plugin connection is never exposed remotely
30
+
31
+ ### Documentation
32
+
33
+ - Streamlined README.md, created `docs/guides/` with focused guides
34
+ - Created dedicated configuration guides for each AI client (Claude Code, Accomplish, Claude Cowork)
35
+ - Fixed curl examples to include required `Accept: application/json, text/event-stream` header
36
+ - Corrected ngrok documentation: clarified 0.0.0.0 is for Docker/VPS, not needed for ngrok
37
+ - Enhanced demo documentation with multi-client examples (Claude Code, Accomplish, Claude Cowork)
38
+
39
+ ### Internal
40
+
41
+ - Fixed intermittent test failures on GitHub Actions caused by race condition between HTTP server start and connection
42
+ readiness
43
+ - Fixed intermittent logger test failures on GitHub Actions caused by missing directory creation before file logger
44
+ instantiation
45
+
10
46
  ## [0.3.1] - 2026-02-12
11
47
 
12
48
  ### Fixed
@@ -150,7 +186,6 @@ Versioning](https://semver.org/spec/v2.0.0.html).
150
186
  - Files field in package.json to explicitly control published files
151
187
  - prepublishOnly script to ensure build before publishing
152
188
  - Additional keywords for improved npm discoverability
153
- - Coauthorship policy documented in CLAUDE.md
154
189
  - Publishing documentation in docs/publishing.md for maintainers
155
190
 
156
191
  ### Fixed
package/README.md CHANGED
@@ -7,28 +7,31 @@
7
7
  MCP server that bridges AI agents (e.g. Claude Code) to [RemNote](https://remnote.com/) via the [RemNote MCP Bridge
8
8
  plugin](https://github.com/robert7/remnote-mcp-bridge).
9
9
 
10
+ > This is a working **proof-of-concept/experimental solution**. It "works on my machine" — you're invited to test
11
+ > it and [report any bugs or issues](https://github.com/robert7/remnote-mcp-server/issues).
12
+
13
+ ## What is This?
14
+
15
+ The RemNote MCP Server enables AI assistants like Claude Code to interact directly with your RemNote knowledge base
16
+ through the Model Context Protocol (MCP). Create notes, search your knowledge base, update existing notes, and maintain
17
+ your daily journal—all through conversational commands.
18
+
10
19
  ## Demo
11
20
 
12
- See Claude Code in action with RemNote: **[View Demo →](docs/demo.md)**
21
+ See AI agent examples in action with RemNote: **[View Demo →](docs/demo.md)**
13
22
 
14
- ## Two-Component Architecture
23
+ ### Two-Component Architecture
15
24
 
16
25
  This system consists of **two separate components** that work together:
17
26
 
18
27
  1. **[RemNote MCP Bridge](https://github.com/robert7/remnote-mcp-bridge)** - A RemNote plugin that runs in your browser
19
28
  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
29
+ 2. **RemNote MCP Server** (this project) - A standalone server that connects your AI assistant to the bridge using MCP
30
+ protocol
22
31
 
23
32
  **Both components are required** for AI integration with RemNote.
24
33
 
25
- ## What is This?
26
-
27
- The RemNote MCP Server enables AI assistants like Claude Code to interact directly with your RemNote knowledge base
28
- through the Model Context Protocol (MCP). This allows you to create notes, search your knowledge base, update existing
29
- notes, and maintain your daily journal—all through conversational commands.
30
-
31
- **Architecture:**
34
+ ### How It Works
32
35
 
33
36
  ```text
34
37
  AI agents (HTTP) ↔ MCP HTTP Server :3001 ↔ WebSocket Server :3002 ↔ RemNote Plugin ↔ RemNote
@@ -36,29 +39,17 @@ AI agents (HTTP) ↔ MCP HTTP Server :3001 ↔ WebSocket Server :3002 ↔ RemNot
36
39
 
37
40
  The server acts as a bridge:
38
41
 
39
- - Communicates with AI agents via Streamable HTTP transport (MCP protocol)
42
+ - Communicates with AI agents via Streamable HTTP transport (MCP protocol) - supports both local and remote access
40
43
  - HTTP server (port 3001) manages MCP sessions for multiple concurrent agents
41
44
  - WebSocket server (port 3002) connects to the RemNote browser plugin
42
45
  - Translates MCP tool calls into RemNote API actions
43
46
 
44
- **About Streamable HTTP Transport**
47
+ **Multi-Agent Support:** Multiple AI agents can connect simultaneously to the same RemNote knowledge base. Each agent
48
+ gets its own MCP session while sharing the WebSocket bridge.
45
49
 
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).
50
+ **Remote Access:** By default, the server binds to localhost (127.0.0.1) for local AI agents. Cloud-based services like
51
+ Claude Cowork require remote access—use tunneling tools like ngrok to expose the HTTP endpoint securely. The WebSocket
52
+ connection always stays local for security. See [Remote Access Guide](docs/guides/remote-access.md) for setup.
62
53
 
63
54
  ## Features
64
55
 
@@ -69,493 +60,174 @@ specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/tr
69
60
  - **Journal Entries** - Append timestamped entries to daily documents
70
61
  - **Connection Status** - Check server and plugin connection health
71
62
 
72
- ## Multi-Agent Support
73
-
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.
76
-
77
- ### How It Works
78
-
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
83
-
84
- ### Limitations
85
-
86
- The WebSocket bridge still enforces a **single RemNote plugin connection**. This means:
87
-
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
63
+ ## Quick Start
91
64
 
92
- ## Prerequisites
93
-
94
- - **Node.js** >= 18.0.0
95
- - **RemNote app** with [RemNote MCP Bridge plugin](https://github.com/robert7/remnote-mcp-bridge) installed
96
- - **Claude Code CLI** installed and configured
97
-
98
- ## Installation
99
-
100
- ### 1. Install the MCP Server
101
-
102
- **From npm (recommended for most users):**
103
-
104
- See [MCP Server npm Package](https://www.npmjs.com/package/remnote-mcp-server).
65
+ ### 1. Install the Server
105
66
 
106
67
  ```bash
107
- # Install globally
108
68
  npm install -g remnote-mcp-server
109
-
110
- # Verify installation
111
- which remnote-mcp-server
112
- # Should output: /path/to/node/bin/remnote-mcp-server
113
- ```
114
-
115
- **Uninstalling:**
116
-
117
- ```bash
118
- # Remove global installation
119
- npm uninstall -g remnote-mcp-server
120
69
  ```
121
70
 
122
- **From source (for development):**
71
+ ### 2. Install the RemNote Plugin
123
72
 
124
- ```bash
125
- git clone https://github.com/robert7/remnote-mcp-server.git
126
- cd remnote-mcp-server
127
- npm install
128
- ```
129
-
130
- ### 2. Install RemNote MCP Bridge Plugin
131
-
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)
73
+ Install the [RemNote MCP Bridge plugin](https://github.com/robert7/remnote-mcp-bridge) in your RemNote app. Currently
74
+ available from GitHub; registration in the RemNote marketplace is pending approval. Configure the plugin to connect
75
+ to `ws://127.0.0.1:3002`.
136
76
 
137
77
  ### 3. Start the Server
138
78
 
139
- **IMPORTANT:** You must start the server before using it with Claude Code.
140
-
141
79
  ```bash
142
- # Start with default settings
143
80
  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
81
  ```
159
82
 
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
83
  Expected output:
179
- ```
180
- RemNote MCP Server v0.2.1 listening { wsPort: 3002, httpPort: 3001 }
181
- ```
182
-
183
- **Note on Logging:**
184
- - Development environment (with `npm install`): Pretty-formatted colored logs
185
- - Global installation (via `npm link`): JSON logs to stderr (pino-pretty not included)
186
- - Both modes are fully functional - formatting is the only difference
187
-
188
- Keep this terminal running. The server must be running for Claude Code to connect.
189
-
190
- ## Configuration of AI Agents
191
-
192
- ### Claude Code CLI
193
-
194
- Use the `claude mcp` CLI commands to add, test, and remove the MCP server.
195
-
196
- **Add the server:**
197
-
198
- ```bash
199
- # goto your project directory
200
- cd /Users/username/Projects/sample-project
201
- claude mcp add remnote --transport http http://localhost:3001/mcp
202
- ```
203
-
204
- Example output:
205
84
 
206
85
  ```text
207
- Added HTTP MCP server remnote with URL: http://localhost:3001/mcp to local config
208
- File modified: /Users/username/.claude.json [project: /Users/username/Projects/sample-project]
209
- ```
210
-
211
- **Verify connection:**
212
-
213
- ```bash
214
- claude mcp list
215
- ```
216
-
217
- Example output:
218
-
219
- ```text
220
- remnote: http://localhost:3001/mcp (HTTP) - ✓ Connected
221
- ```
222
-
223
- As alternative you can use `/mcp` command in any Claude Code session to check the connection health.
224
-
225
- **Using the server:**
226
-
227
- Once configured, Claude Code automatically loads RemNote tools in your sessions. See the [Example Usage](#example-usage)
228
- section below for conversational commands.
229
-
230
- ```bash
231
- # In any Claude Code session
232
- claude
233
-
234
- prompt:
235
- show remnote note titles related do AI assisted coding
236
- ...
237
- remnote - remnote_search (MCP)(query: "AI assisted coding", limit: 20, includeContent: false)
238
- ...
239
- Found 20 notes related to "AI assisted coding". The main results include:
240
-
241
- Primary note:
242
- - AI assisted coding (remId: qtVwh5XBQbJM2HfSp)
243
-
244
- Related tools/platforms:
245
- - Claude Code
246
- - Gemini CLI
247
- ...
248
- ```
249
-
250
- **Remove the server:**
251
-
252
- ```bash
253
- claude mcp remove remnote
254
- ```
255
-
256
- Example output:
257
-
258
- ```text
259
- ✓ Removed MCP server "remnote"
260
- Config: /Users/username/.claude.json
261
- ```
262
-
263
- ### Claude Code CLI (manual configuration)
264
-
265
- If you prefer to manually configure the MCP server in Claude Code CLI instead of using `claude mcp add`, you can
266
- directly edit your `~/.claude.json` file.
267
-
268
- MCP servers are configured in `~/.claude.json` under the `mcpServers` key within project-specific sections.
269
-
270
- **Add to your `~/.claude.json`:**
271
-
272
- ```json
273
- {
274
- "projects": {
275
- "/Users/username": {
276
- ...
277
- "mcpServers": {
278
- "remnote": {
279
- "type": "http",
280
- "url": "http://localhost:3001/mcp"
281
- }
282
- ...
283
- }
86
+ RemNote MCP Server v0.2.1 listening { wsPort: 3002, httpPort: 3001 }
284
87
  ```
285
88
 
286
- Restart Claude Code completely to load the MCP server configuration. Claude Code will connect to the running server.
89
+ Keep this terminal running.
287
90
 
288
- ## Verification
91
+ ### 4. Configure Your AI Client
289
92
 
290
- ### Check Server is Running
93
+ - [Configuration Guide](docs/guides/configuration.md) - Overview and generic setup
94
+ - [Claude Code CLI](docs/guides/configuration-claude-code-CLI.md) - Detailed Claude Code CLI configuration
95
+ - [Accomplish](docs/guides/configuration-accomplish.md) - Accomplish (Openwork) configuration
96
+ - [Claude Cowork](docs/guides/configuration-claude-cowork.md) - Cloud-based (requires remote access setup)
291
97
 
292
- Verify both ports are listening:
98
+ ## Documentation
293
99
 
294
- ```bash
295
- # Check HTTP port (MCP)
296
- lsof -i :3001
297
-
298
- # Check WebSocket port (RemNote bridge)
299
- lsof -i :3002
300
- ```
301
-
302
- You should see the `node` process listening on both ports.
303
-
304
- ### Check RemNote Plugin Connection
100
+ ### Getting Started
305
101
 
306
- Open RemNote with the MCP Bridge plugin installed. The plugin control panel should show:
102
+ - **[Installation Guide](docs/guides/installation.md)** - Complete installation instructions
103
+ - **[Configuration Guide](docs/guides/configuration.md)** - Configure Claude Code CLI, Accomplish, and other clients
104
+ - **[Demo & Screenshots](docs/demo.md)** - See the server in action with different AI clients
307
105
 
308
- - **Status:** "Connected" (green)
309
- - **Server:** ws://127.0.0.1:3002
310
- - Connection timestamp
106
+ ### Usage
311
107
 
312
- ### Test in Claude Code
108
+ - **[CLI Options Reference](docs/guides/cli-options.md)** - Command-line options and environment variables
109
+ - **[MCP Tools Reference](docs/guides/tools-reference.md)** - Detailed reference for all 6 RemNote tools
110
+ - **[Remote Access Setup](docs/guides/remote-access.md)** - Expose server for Claude Cowork (ngrok, etc.)
313
111
 
314
- In any Claude Code session, try:
112
+ ### Help & Advanced
315
113
 
316
- ```
317
- Use remnote_status to check the connection
318
- ```
114
+ - **[Troubleshooting](docs/guides/troubleshooting.md)** - Common issues and solutions
115
+ - **[Architecture](docs/architecture.md)** - Design rationale and technical architecture
319
116
 
320
- Expected response:
117
+ ### Development
321
118
 
322
- ```json
323
- remnote - remnote_status (MCP)
324
- ⎿ {
325
- "connected": true,
326
- "pluginVersion": "0.3.2"
327
- }
328
- ```
119
+ - **[Development Setup](docs/guides/development-setup.md)** - Contributing guide for developers
120
+ - **[Publishing Guide](docs/npm-publishing.md)** - npm publishing process (maintainers only)
329
121
 
330
- ### Test RemNote Integration
122
+ ## Available MCP Tools
331
123
 
332
- Try creating a note:
124
+ | Tool | Description |
125
+ |---------------------------|------------------------------------------------|
126
+ | `remnote_create_note` | Create new notes with optional parent and tags |
127
+ | `remnote_search` | Search knowledge base with full-text search |
128
+ | `remnote_read_note` | Read note by ID with configurable depth |
129
+ | `remnote_update_note` | Update title, append content, or modify tags |
130
+ | `remnote_append_journal` | Append to today's daily document |
131
+ | `remnote_status` | Check connection status and statistics |
333
132
 
334
- ```
335
- Create a RemNote note titled "MCP Test" with content "Testing the bridge"
336
- ```
133
+ See the [Tools Reference](docs/guides/tools-reference.md) for detailed usage and examples.
337
134
 
338
- This should use the `remnote_create_note` tool and create a new note in your RemNote knowledge base.
135
+ ## Supported AI Clients
339
136
 
340
- ## Available Tools
341
-
342
- | Tool | Description | Parameters |
343
- |------|-------------|------------|
344
- | `remnote_create_note` | Create a new note with optional parent and tags | `title`, `content`, `parentId`, `tags` |
345
- | `remnote_search` | Search knowledge base | `query`, `limit`, `includeContent` |
346
- | `remnote_read_note` | Read note by RemNote ID | `remId`, `depth` |
347
- | `remnote_update_note` | Update title, append content, or modify tags | `remId`, `title`, `appendContent`, `addTags`, `removeTags` |
348
- | `remnote_append_journal` | Append to today's daily document | `content`, `timestamp` |
349
- | `remnote_status` | Check connection status and statistics | _(no parameters)_ |
137
+ - **[Claude Code CLI](https://claude.com/claude-code)** - Local terminal-based agent
138
+ - **[Claude Cowork](https://claude.com/blog/cowork-research-preview)** - Cloud-based workspace (requires [remote
139
+ access](docs/guides/remote-access.md))
140
+ - **[Accomplish](https://github.com/accomplish-ai/accomplish)** - Task-based MCP client (formerly Openwork)
141
+ - **Any MCP client** supporting Streamable HTTP transport
350
142
 
351
143
  ## Example Usage
352
144
 
353
- ### Conversational Commands
354
-
355
- Claude Code will automatically select the appropriate tool based on your natural language commands:
356
-
357
145
  **Create notes:**
358
- ```
146
+
147
+ ```text
359
148
  Create a note about "Project Ideas" with content:
360
149
  - AI-powered note taking
361
150
  - Personal knowledge management
362
151
  ```
363
152
 
364
153
  **Search:**
365
- ```
366
- Search my RemNote for notes about "machine learning"
367
- ```
368
154
 
369
- **Read specific notes:**
370
- ```
371
- Read the note with ID abc123
155
+ ```text
156
+ Search my RemNote for notes about "machine learning"
372
157
  ```
373
158
 
374
159
  **Update notes:**
375
- ```
160
+
161
+ ```text
376
162
  Add a tag "important" to note abc123
377
163
  ```
378
164
 
379
165
  **Journal entries:**
380
- ```
381
- Add to my journal: "Completed the RemNote MCP integration"
382
- ```
383
166
 
384
- **Check status:**
385
- ```
386
- Check if RemNote is connected
167
+ ```text
168
+ Add to my journal: "Completed the RemNote MCP integration"
387
169
  ```
388
170
 
389
- ## Dependencies
390
-
391
- ### Optional Development Dependencies
392
-
393
- - **pino-pretty** - Provides formatted console output in development
394
- - Automatically used when stdout is a TTY (interactive terminal)
395
- - Gracefully falls back to JSON logging if unavailable (e.g., global installations)
396
- - To enable in development: `npm install` (installs devDependencies)
171
+ See the [Tools Reference](docs/guides/tools-reference.md) for more examples.
397
172
 
398
173
  ## Configuration
399
174
 
400
175
  ### Environment Variables
401
176
 
402
177
  - `REMNOTE_HTTP_PORT` - HTTP MCP server port (default: 3001)
178
+ - `REMNOTE_HTTP_HOST` - HTTP server bind address (default: 127.0.0.1)
403
179
  - `REMNOTE_WS_PORT` - WebSocket server port (default: 3002)
404
180
 
405
- **Example with custom ports:**
181
+ ### Custom Ports
406
182
 
407
183
  ```bash
408
- # Set environment variables before starting
409
- export REMNOTE_HTTP_PORT=3003
410
- export REMNOTE_WS_PORT=3004
411
- npm start
412
- # you can pass CLI options after `--`, e.g.
413
- npm start -- -h
184
+ remnote-mcp-server --http-port 3003 --ws-port 3004
414
185
  ```
415
186
 
416
- Then update your `~/.claude.json` and RemNote plugin settings to use the new ports.
417
-
418
- **Note:** If you change the WebSocket port, you must also update the WebSocket URL in the RemNote MCP Bridge plugin
419
- settings.
187
+ After changing ports, update your MCP client configuration and RemNote plugin settings.
420
188
 
421
- ### RemNote Plugin Settings
422
-
423
- Configure in the plugin control panel:
424
-
425
- - **WebSocket URL:** `ws://127.0.0.1:3002` (or your custom port)
426
- - **Auto-reconnect:** Enabled (recommended)
189
+ See [CLI Options Reference](docs/guides/cli-options.md) for all options.
427
190
 
428
191
  ## Troubleshooting
429
192
 
430
- ### Server Not Starting
431
-
432
- 1. **Verify the server is running:**
433
- ```bash
434
- lsof -i :3001
435
- lsof -i :3002
436
- ```
437
- Both ports should show active listeners.
438
-
439
- 2. **Check server output:**
440
- - You should see: `[HTTP Server] Listening on port 3001`
441
- - And: `[WebSocket Server] Listening on port 3002`
442
- 3. **If server fails to start:**
443
- - Check if ports are already in use (see "Port Already in Use" below)
444
- - Verify installation: `which remnote-mcp-server`
445
- - Check server logs for errors
446
-
447
- ### Port Already in Use
193
+ **Server won't start:**
448
194
 
449
- If you see "EADDRINUSE" error for port 3001 or 3002:
195
+ - Check ports aren't in use: `lsof -i :3001` and `lsof -i :3002`
196
+ - Verify installation: `which remnote-mcp-server`
450
197
 
451
- ```bash
452
- # Find what's using the ports
453
- lsof -i :3001
454
- lsof -i :3002
455
-
456
- # Kill the process if needed
457
- kill -9 <PID>
458
- ```
459
-
460
- Alternatively, configure different ports using environment variables (see Configuration section).
461
-
462
- ### Plugin Won't Connect
198
+ **Plugin won't connect:**
463
199
 
464
- 1. **Verify plugin settings in RemNote:**
465
- - WebSocket URL: `ws://127.0.0.1:3002`
466
- - Auto-reconnect: Enabled
467
- 2. **Check plugin console (RemNote Developer Tools):**
468
- ```
469
- Cmd+Option+I (macOS)
470
- Ctrl+Shift+I (Windows/Linux)
471
- ```
200
+ - Verify plugin settings: WebSocket URL `ws://127.0.0.1:3002`
201
+ - Check server is running: `lsof -i :3002`
472
202
 
473
- 3. **Restart RemNote** after changing settings
474
- 4. **Check server logs** for connection messages
203
+ **Tools not appearing:**
475
204
 
476
- ### Tools Not Appearing in Claude Code
205
+ - Verify configuration: `claude mcp list`
206
+ - Restart Claude Code completely
477
207
 
478
- 1. **Verify configuration in `~/.claude.json`:**
479
- ```bash
480
- cat ~/.claude.json | grep -A 10 mcpServers
481
- ```
208
+ See the [Troubleshooting Guide](docs/guides/troubleshooting.md) for detailed solutions.
482
209
 
483
- 2. **Ensure configuration is under correct project path** (use home directory for global)
484
- 3. **Restart Claude Code completely** (not just reload)
485
- 4. **Check MCP logs:**
486
- ```bash
487
- tail -f ~/.claude/debug/mcp-*.log
488
- ```
210
+ ## Contributing & Development
489
211
 
490
- ### Configuration Not Working
491
-
492
- **Common issues:**
493
-
494
- ❌ **Wrong transport type:**
495
- ```json
496
- "type": "stdio" // OLD - doesn't work anymore
497
- ```
498
-
499
- ✅ **Correct transport type:**
500
- ```json
501
- "type": "http" // NEW - required
502
- ```
503
-
504
- ❌ **Using command instead of URL:**
505
- ```json
506
- {
507
- "type": "stdio",
508
- "command": "remnote-mcp-server" // OLD
509
- }
510
- ```
511
-
512
- ✅ **Correct configuration:**
513
- ```json
514
- {
515
- "type": "http",
516
- "url": "http://127.0.0.1:3001/mcp" // NEW
517
- }
518
- ```
519
-
520
- ## Development
521
-
522
- ### Setup
212
+ **Development setup:**
523
213
 
524
214
  ```bash
215
+ git clone https://github.com/robert7/remnote-mcp-server.git
216
+ cd remnote-mcp-server
525
217
  npm install
526
218
  npm run build
527
- npm link # Make command globally available
219
+ npm link
528
220
  ```
529
221
 
530
- ### Development Workflow
222
+ **Development workflow:**
531
223
 
532
224
  ```bash
533
225
  npm run dev # Watch mode with hot reload
534
- npm run typecheck # Type checking only
535
- npm run build # Production build
226
+ npm test # Run test suite
227
+ ./code-quality.sh # Run all quality checks
536
228
  ```
537
229
 
538
- ### Testing
539
-
540
- ```bash
541
- npm test # Run all tests
542
- npm run test:watch # Watch mode
543
- npm run test:coverage # With coverage report
544
- ```
545
-
546
- ### Code Quality
547
-
548
- ```bash
549
- ./code-quality.sh # Run all checks
550
- npm run lint # ESLint only
551
- npm run format # Format code
552
- ```
553
-
554
- ### Development Documentation
555
-
556
- - **[docs/architecture.md](./docs/architecture.md)** - Architecture and design rationale
557
- - **[AGENTS.md](./AGENTS.md)** - AI agent and developer guidance
558
- - **[CHANGELOG.md](./CHANGELOG.md)** - Version history
230
+ See the [Development Setup Guide](docs/guides/development-setup.md) for complete instructions.
559
231
 
560
232
  ## Related Projects
561
233
 
@@ -565,3 +237,10 @@ npm run format # Format code
565
237
  ## License
566
238
 
567
239
  MIT
240
+
241
+ ## Links
242
+
243
+ - [Documentation](docs/guides/) - Complete documentation
244
+ - [GitHub Issues](https://github.com/robert7/remnote-mcp-server/issues) - Bug reports and feature requests
245
+ - [npm Package](https://www.npmjs.com/package/remnote-mcp-server) - Official npm package
246
+ - [CHANGELOG](CHANGELOG.md) - Version history and roadmap
package/dist/cli.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export interface CliOptions {
2
2
  wsPort?: number;
3
3
  httpPort?: number;
4
+ httpHost?: string;
4
5
  logLevel?: string;
5
6
  logLevelFile?: string;
6
7
  verbose?: boolean;
package/dist/cli.js CHANGED
@@ -14,6 +14,7 @@ export function parseCliArgs() {
14
14
  .version(packageJson.version)
15
15
  .option('--ws-port <number>', 'WebSocket port (default: 3002, env: REMNOTE_WS_PORT)', parsePort)
16
16
  .option('--http-port <number>', 'HTTP MCP port (default: 3001, env: REMNOTE_HTTP_PORT)', parsePort)
17
+ .option('--http-host <host>', 'HTTP server bind address (default: 127.0.0.1, env: REMNOTE_HTTP_HOST). Use 0.0.0.0 for Docker/VPS deployments', validateHost)
17
18
  .option('--log-level <level>', `Console log level: ${validLogLevels.join(', ')} (default: info)`, validateLogLevel)
18
19
  .option('--log-level-file <level>', `File log level (default: same as --log-level)`, validateLogLevel)
19
20
  .option('--verbose', 'Shorthand for --log-level debug')
@@ -48,4 +49,24 @@ function validateLogLevel(value) {
48
49
  }
49
50
  return value.toLowerCase();
50
51
  }
52
+ /**
53
+ * Validate host string
54
+ */
55
+ function validateHost(value) {
56
+ // Allow localhost variations and 0.0.0.0
57
+ if (value === 'localhost' || value === '127.0.0.1' || value === '0.0.0.0') {
58
+ return value;
59
+ }
60
+ // Validate IPv4 format
61
+ const ipv4Pattern = /^(\d{1,3}\.){3}\d{1,3}$/;
62
+ if (!ipv4Pattern.test(value)) {
63
+ throw new Error(`Invalid host: ${value}. Must be localhost, 127.0.0.1, 0.0.0.0, or a valid IPv4 address`);
64
+ }
65
+ // Validate each octet is 0-255
66
+ const octets = value.split('.').map(Number);
67
+ if (octets.some((octet) => octet < 0 || octet > 255)) {
68
+ throw new Error(`Invalid host: ${value}. IPv4 octets must be between 0 and 255`);
69
+ }
70
+ return value;
71
+ }
51
72
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAa/C,MAAM,cAAc,GAAG,C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,KAAK,CAAC,sBAAsB,KAAK,mBAAmB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,KAAa;IACjC,yCAAyC;IACzC,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uBAAuB;IACvB,MAAM,WAAW,GAAG,yBAAyB,CAAC;IAC9C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,iBAAiB,KAAK,kEAAkE,CACzF,CAAC;IACJ,CAAC;IAED,+BAA+B;IAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,yCAAyC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
package/dist/config.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import type { CliOptions } from './cli.js';
2
2
  export interface ServerConfig {
3
3
  wsPort: number;
4
+ wsHost: string;
4
5
  httpPort: number;
6
+ httpHost: string;
5
7
  logLevel: string;
6
8
  logLevelFile?: string;
7
9
  logFile?: string;
package/dist/config.js CHANGED
@@ -19,6 +19,10 @@ export function getConfig(cliOptions) {
19
19
  // Get ports with CLI > env > default precedence
20
20
  const wsPort = cliOptions.wsPort || parseInt(process.env.REMNOTE_WS_PORT || '3002', 10);
21
21
  const httpPort = cliOptions.httpPort || parseInt(process.env.REMNOTE_HTTP_PORT || '3001', 10);
22
+ // Get hosts with CLI > env > default precedence
23
+ // SECURITY: WebSocket ALWAYS binds to localhost, regardless of env var or CLI option
24
+ const wsHost = '127.0.0.1';
25
+ const httpHost = cliOptions.httpHost || process.env.REMNOTE_HTTP_HOST || '127.0.0.1';
22
26
  // Validate port conflicts
23
27
  if (wsPort === httpPort) {
24
28
  throw new Error(`WebSocket port and HTTP port cannot be the same (both set to ${wsPort})`);
@@ -29,7 +33,9 @@ export function getConfig(cliOptions) {
29
33
  const prettyLogs = process.stdout.isTTY === true;
30
34
  return {
31
35
  wsPort,
36
+ wsHost,
32
37
  httpPort,
38
+ httpHost,
33
39
  logLevel,
34
40
  logLevelFile,
35
41
  logFile: cliOptions.logFile,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,UAAsB;IAC9C,8BAA8B;IAC9B,IAAI,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,MAAM,CAAC;IAC7C,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACvB,QAAQ,GAAG,OAAO,CAAC;IACrB,CAAC;IAED,0CAA0C;IAC1C,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC;QAC5F,MAAM,IAAI,KAAK,CAAC,2BAA2B,UAAU,CAAC,MAAM,gCAAgC,CAAC,CAAC;IAChG,CAAC;IACD,IACE,UAAU,CAAC,QAAQ,KAAK,SAAS;QACjC,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC,EACxD,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,UAAU,CAAC,QAAQ,gC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M;QACN,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,YAAY;QACZ,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -8,11 +8,12 @@ export declare class HttpMcpServer {
8
8
  private app;
9
9
  private server;
10
10
  private port;
11
+ private host;
11
12
  private wsServer;
12
13
  private serverInfo;
13
14
  private logger;
14
15
  private transports;
15
- constructor(port: number, wsServer: WebSocketServer, serverInfo: ServerInfo, logger: Logger);
16
+ constructor(port: number, host: string, wsServer: WebSocketServer, serverInfo: ServerInfo, logger: Logger);
16
17
  private setupRoutes;
17
18
  private initializeNewSession;
18
19
  private handleSessionRequest;
@@ -7,12 +7,14 @@ export class HttpMcpServer {
7
7
  app;
8
8
  server = null;
9
9
  port;
10
+ host;
10
11
  wsServer;
11
12
  serverInfo;
12
13
  logger;
13
14
  transports = new Map();
14
- constructor(port, wsServer, serverInfo, logger) {
15
+ constructor(port, host, wsServer, serverInfo, logger) {
15
16
  this.port = port;
17
+ this.host = host;
16
18
  this.wsServer = wsServer;
17
19
  this.serverInfo = serverInfo;
18
20
  this.logger = logger.child({ context: 'http-server' });
@@ -150,8 +152,8 @@ export class HttpMcpServer {
150
152
  async start() {
151
153
  return new Promise((resolve, reject) => {
152
154
  try {
153
- this.server = this.app.listen(this.port, () => {
154
- this.logger.info({ port: this.port }, 'HTTP server started');
155
+ this.server = this.app.listen(this.port, this.host, () => {
156
+ this.logger.info({ port: this.port, host: this.host }, 'HTTP server started');
155
157
  resolve();
156
158
  });
157
159
  this.server.on('error', (error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"http-server.js","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,o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qBAAqB,CAAC,CAAC;gBACxD,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;gBACxB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACpC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,uBAAuB,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;QAED,oBAAoB;QACpB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;oBACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;oBACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;oBACnB,OAAO,EAAE,CAAC;gBACZ,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF"}
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ async function main() {
36
36
  ? createRequestResponseLogger(config.responseLog)
37
37
  : undefined;
38
38
  // Initialize WebSocket server for RemNote plugin
39
- const wsServer = new WebSocketServer(config.wsPort, logger, requestLogger, responseLogger);
39
+ const wsServer = new WebSocketServer(config.wsPort, config.wsHost, logger, requestLogger, responseLogger);
40
40
  // Log connection status
41
41
  wsServer.onClientConnect(() => {
42
42
  logger.info('RemNote plugin connected');
@@ -47,7 +47,7 @@ async function main() {
47
47
  // Start WebSocket server
48
48
  await wsServer.start();
49
49
  // Initialize HTTP MCP server
50
- const httpServer = new HttpMcpServer(config.httpPort, wsServer, {
50
+ const httpServer = new HttpMcpServer(config.httpPort, config.httpHost, wsServer, {
51
51
  name: 'remnote-mcp-server',
52
52
  version: packageJson.version,
53
53
  }, logger);
@@ -55,7 +55,9 @@ async function main() {
55
55
  // Log startup message
56
56
  logger.info({
57
57
  wsPort: config.wsPort,
58
+ wsHost: config.wsHost,
58
59
  httpPort: config.httpPort,
60
+ httpHost: config.httpHost,
59
61
  }, `RemNote MCP Server v${packageJson.version} listening`);
60
62
  // Graceful shutdown
61
63
  const shutdown = async () => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE5F,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,KAAK,UAAU,IAAI;IACjB,2DAA2D;IAC3D,MAAM,UAAU,GAAG,YAAY,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IAErC,+BAA+B;IAC/B,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,MAAM,kBAAkB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,MAA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AC,KAAK,EAAE,EAAE;IACrB,4BAA4B;IAC5B,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -3,13 +3,14 @@ export declare class WebSocketServer {
3
3
  private wss;
4
4
  private client;
5
5
  private port;
6
+ private host;
6
7
  private logger;
7
8
  private requestLogger;
8
9
  private responseLogger;
9
10
  private pendingRequests;
10
11
  private connectCallbacks;
11
12
  private disconnectCallbacks;
12
- constructor(port: number, logger: Logger, requestLogger?: Logger, responseLogger?: Logger);
13
+ constructor(port: number, host: string, logger: Logger, requestLogger?: Logger, responseLogger?: Logger);
13
14
  start(): Promise<void>;
14
15
  stop(): Promise<void>;
15
16
  sendRequest(action: string, payload: Record<string, unknown>): Promise<unknown>;
@@ -4,22 +4,24 @@ export class WebSocketServer {
4
4
  wss = null;
5
5
  client = null;
6
6
  port;
7
+ host;
7
8
  logger;
8
9
  requestLogger = null;
9
10
  responseLogger = null;
10
11
  pendingRequests = new Map();
11
12
  connectCallbacks = [];
12
13
  disconnectCallbacks = [];
13
- constructor(port, logger, requestLogger, responseLogger) {
14
+ constructor(port, host, logger, requestLogger, responseLogger) {
14
15
  this.port = port;
16
+ this.host = host;
15
17
  this.logger = logger.child({ context: 'websocket-server' });
16
18
  this.requestLogger = requestLogger || null;
17
19
  this.responseLogger = responseLogger || null;
18
20
  }
19
21
  async start() {
20
22
  return new Promise((resolve, reject) => {
21
- this.wss = new WSServer({ port: this.port }, () => {
22
- this.logger.debug({ port: this.port }, 'WebSocket server started');
23
+ this.wss = new WSServer({ port: this.port, host: this.host }, () => {
24
+ this.logger.debug({ port: this.port, host: this.host }, 'WebSocket server started');
23
25
  resolve();
24
26
  });
25
27
  this.wss.on('error', (error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"websocket-server.js","sourceRoot":"","sources":["../src/websocket-server.ts"],"names":[],"mappings":"AA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AAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAEtD,IAAI,OAAO,EAAE,CAAC;oBACZ,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBAC9B,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;oBAEzC,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;wBACnB,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC5C,CAAC;yBAAM,CAAC;wBACN,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACnC,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,oBAAoB,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remnote-mcp-server",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server bridge for RemNote knowledge base",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",