remnote-mcp-server 0.1.2 → 0.2.1

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,68 @@ Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-02-11
11
+
12
+ ### Added
13
+
14
+ - `publish-to-npm.sh` script to automate npm publishing workflow with proper error checking
15
+ - Pre-flight checks: git clean, npm authentication, package.json validation
16
+ - Automatic code quality verification via `./code-quality.sh`
17
+ - Package contents verification with `npm pack --dry-run`
18
+ - User confirmation required before actual publish
19
+ - Post-publication git tag creation and push
20
+ - Success summary with next-step reminders (GitHub release, CHANGELOG update)
21
+
22
+ ## [0.2.0] - 2026-02-11
23
+
24
+ ### Changed
25
+
26
+ - **BREAKING**: Transport refactored from stdio to Streamable HTTP (SSE)
27
+ - Users must start server independently with `npm start` or `npm run dev`
28
+ - Server runs as long-running process on port 3001 (HTTP) and 3002 (WebSocket)
29
+ - Claude Code configuration must use `http` transport type instead of `stdio`
30
+ - Multiple Claude Code sessions can now connect to a single server instance
31
+ - TypeScript module resolution changed from "node" to "Node16" for SDK deep imports compatibility
32
+ - README.md "Claude Code CLI" section now includes complete `claude mcp` command examples
33
+ - Shows `claude mcp add` command with expected output
34
+ - Shows `claude mcp list` for verifying connection health
35
+ - Shows `claude mcp remove` for unregistering the server
36
+ - Positioned before manual configuration section as recommended approach
37
+
38
+ ### Added
39
+
40
+ - Multi-agent support: Multiple AI agents can now connect to the same RemNote knowledge base simultaneously
41
+ - HTTP MCP server with Streamable HTTP (SSE) transport for session management
42
+ - New `REMNOTE_HTTP_PORT` environment variable (default: 3001)
43
+ - Express-based HTTP server with JSON parsing middleware
44
+ - Session lifecycle management: multiple concurrent MCP sessions with independent state
45
+ - Comprehensive HTTP server test suite (15 tests covering initialization, session management, SSE streams, and error
46
+ cases)
47
+ - "Two-Component Architecture" section in README.md for consistency with RemNote MCP Bridge documentation
48
+
49
+ ### Dependencies
50
+
51
+ - Added `express` ^5.2.0 for HTTP server
52
+ - Added `@types/express` ^5.0.0 for TypeScript support
53
+
54
+ ### Fixed
55
+
56
+ - Fixed `remnote_status` tool action name mismatch (server sent 'status', plugin expected 'get_status')
57
+
58
+ ## [0.1.3] - 2026-02-07
59
+
60
+ ### Added
61
+
62
+ - Demo documentation with screenshot showing Claude Code searching RemNote via MCP Bridge & Server
63
+ - New `docs/demo.md` with visual demonstration
64
+ - Demo section in README.md with preview image
65
+ - Screenshot file: `docs/remnote-mcp-server-demo.jpg`
66
+ - npm package badge in README.md linking to npm registry page
67
+ - npm installation instructions as recommended installation method in README.md
68
+ - Global installation via `npm install -g remnote-mcp-server`
69
+ - Uninstall instructions for both npm and source installations
70
+ - Enhanced troubleshooting section covering both npm and source installation methods
71
+
10
72
  ## [0.1.2] - 2026-02-07
11
73
 
12
74
  ### Added
package/README.md CHANGED
@@ -1,9 +1,26 @@
1
1
  # RemNote MCP Server
2
2
 
3
- [![CI](https://github.com/robert7/remnote-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/robert7/remnote-mcp-server/actions/workflows/ci.yml)
3
+ ![Status](https://img.shields.io/badge/status-beta-yellow) ![License](https://img.shields.io/badge/license-MIT-blue)
4
+ ![CI](https://github.com/robert7/remnote-mcp-server/actions/workflows/ci.yml/badge.svg)
5
+ [![codecov](https://codecov.io/gh/robert7/remnote-mcp-server/branch/main/graph/badge.svg)](https://codecov.io/gh/robert7/remnote-mcp-server)
4
6
 
5
- MCP server that bridges Claude Code (and other MCP clients) to [RemNote](https://remnote.com/) via the [RemNote MCP
6
- Bridge plugin](https://github.com/robert7/remnote-mcp-bridge).
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).
9
+
10
+ ## Demo
11
+
12
+ See Claude Code in action with RemNote: **[View Demo →](docs/demo.md)**
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.
7
24
 
8
25
  ## What is This?
9
26
 
@@ -14,13 +31,14 @@ notes, and maintain your daily journal—all through conversational commands.
14
31
  **Architecture:**
15
32
 
16
33
  ```text
17
- AI agent (e.g. Claude Code, MCP Client) ↔ MCP Server (stdio) ↔ WebSocket Server :3002 ↔ RemNote Plugin ↔ RemNote
34
+ AI agents (HTTP) ↔ MCP HTTP Server :3001 ↔ WebSocket Server :3002 ↔ RemNote Plugin ↔ RemNote
18
35
  ```
19
36
 
20
37
  The server acts as a bridge:
21
38
 
22
- - Communicates with Claude Code via stdio transport (MCP protocol)
23
- - Runs a WebSocket server (port 3002) that the RemNote browser plugin connects to
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
24
42
  - Translates MCP tool calls into RemNote API actions
25
43
 
26
44
  ## Features
@@ -32,41 +50,25 @@ The server acts as a bridge:
32
50
  - **Journal Entries** - Append timestamped entries to daily documents
33
51
  - **Connection Status** - Check server and plugin connection health
34
52
 
35
- ## Important Limitations
36
-
37
- **This MCP server enforces a strict 1:1:1 relationship:** one AI agent ↔ one MCP server instance ↔ one RemNote plugin
38
- connection.
39
-
40
- ### Multi-Agent Constraints
53
+ ## Multi-Agent Support
41
54
 
42
- You **cannot** use multiple AI agents (e.g., two Claude Code sessions) with the same RemNote knowledge base
43
- simultaneously. Three architectural constraints prevent this:
55
+ **Multiple AI agents can now connect simultaneously!** The server uses Streamable HTTP transport, allowing multiple
56
+ Claude Code sessions (or other MCP clients) to access the same RemNote knowledge base concurrently.
44
57
 
45
- 1. **stdio transport is point-to-point** - Each MCP server process communicates with exactly one AI agent via
46
- stdin/stdout. The transport protocol doesn't support multiple clients.
47
- 2. **WebSocket enforces single-client** - The server explicitly rejects multiple RemNote plugin connections. Only one
48
- plugin instance can connect to port 3002 at a time (connection code: 1008).
49
- 3. **Port binding conflict** - Multiple server instances attempting to use the default port 3002 will fail with
50
- `EADDRINUSE`.
58
+ ### How It Works
51
59
 
52
- ### Practical Implications
60
+ - One long-running server process on ports 3001 (HTTP) and 3002 (WebSocket)
61
+ - Multiple AI agents connect via HTTP and get independent MCP sessions
62
+ - All sessions share the same WebSocket bridge to RemNote
63
+ - Concurrent requests are handled via UUID-based correlation
53
64
 
54
- - **One agent at a time** - Close one Claude Code session before starting another if both need RemNote access
55
- - **No concurrent access** - Cannot have multiple AI assistants modifying your RemNote knowledge base simultaneously
56
- - **Separate workspaces don't help** - Even with different ports, only one plugin instance can connect to RemNote at a
57
- time
65
+ ### Limitations
58
66
 
59
- ### Alternative Approach
67
+ The WebSocket bridge still enforces a **single RemNote plugin connection**. This means:
60
68
 
61
- If you need multiple AI agents with separate note-taking systems, use separate RemNote accounts/workspaces and configure
62
- each with its own MCP server instance on different ports.
63
-
64
- ### Future Plans
65
-
66
- **HTTP transport migration planned** - The single-agent limitation is a temporary architectural constraint. A future
67
- version will migrate from stdio transport to HTTP transport (SSE), which would allow multiple AI agents to connect
68
- to the same MCP server instance simultaneously. This would remove constraint #1 above while maintaining the existing
69
- WebSocket bridge to RemNote.
69
+ - Multiple AI agents can connect to the server
70
+ - But only one RemNote app instance can be connected at a time
71
+ - This is a RemNote plugin limitation, not an MCP server limitation
70
72
 
71
73
  ## Prerequisites
72
74
 
@@ -78,7 +80,25 @@ WebSocket bridge to RemNote.
78
80
 
79
81
  ### 1. Install the MCP Server
80
82
 
81
- **From source (recommended for development):**
83
+ **From npm (recommended for most users):**
84
+
85
+ ```bash
86
+ # Install globally
87
+ npm install -g remnote-mcp-server
88
+
89
+ # Verify installation
90
+ which remnote-mcp-server
91
+ # Should output: /path/to/node/bin/remnote-mcp-server
92
+ ```
93
+
94
+ **Uninstalling:**
95
+
96
+ ```bash
97
+ # Remove global installation
98
+ npm uninstall -g remnote-mcp-server
99
+ ```
100
+
101
+ **From source (for development):**
82
102
 
83
103
  ```bash
84
104
  git clone https://github.com/robert7/remnote-mcp-server.git
@@ -101,23 +121,38 @@ executable, allowing Claude Code to launch `remnote-mcp-server` from anywhere wi
101
121
  uses a different Node.js version or environment (e.g., different shell PATH), it won't find the command. Ensure your
102
122
  shell configuration (`.bashrc`, `.zshrc`) properly exposes your Node.js environment.
103
123
 
104
- **About stdio transport**
124
+ **Unlinking the source installation:**
125
+
126
+ When you no longer want the global `remnote-mcp-server` command to point to your local repository:
127
+
128
+ ```bash
129
+ # Remove the global symlink
130
+ npm unlink -g remnote-mcp-server
131
+
132
+ # Verify it's removed
133
+ which remnote-mcp-server
134
+ # Should output nothing if successfully unlinked
135
+ ```
105
136
 
106
- This MCP server uses [stdio transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#stdio),
107
- the preferred communication mechanism for MCP. In stdio transport, Claude Code launches the server as a subprocess and
108
- exchanges JSON-RPC messages via standard input/output streams.
137
+ After unlinking, you can install the published npm package globally with `npm install -g remnote-mcp-server` if needed.
138
+
139
+ **About Streamable HTTP Transport**
140
+
141
+ This MCP server uses [Streamable HTTP
142
+ transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#http-with-sse), a communication
143
+ mechanism for MCP that supports multiple concurrent clients.
109
144
 
110
145
  **Key characteristics:**
111
146
 
112
- - **Lifecycle management**: Claude Code automatically starts the server when it launches and stops it on exit. The
113
- server is launched as a subprocess, not a standalone service.
114
- - **Message protocol**: Communication uses newline-delimited JSON-RPC messages on stdin (client server) and stdout
115
- (server → client). No HTTP/REST endpoints are exposed.
116
- - **Logging constraint**: stdout is reserved exclusively for MCP protocol messages. All logging must go to stderr, which
117
- is why the codebase uses `console.error()` for logs.
147
+ - **Lifecycle management**: You must start the server independently (`npm start` or `npm run dev`). Claude Code connects
148
+ to the running server via HTTP.
149
+ - **Message protocol**: Communication uses JSON-RPC over HTTP POST for requests and Server-Sent Events (SSE) for
150
+ notifications.
151
+ - **Multi-client support**: Multiple AI agents can connect simultaneously, each with their own MCP session.
152
+ - **Session management**: Server tracks sessions via `mcp-session-id` headers and UUID-based request correlation.
118
153
 
119
- This architecture provides tight integration with Claude Code while maintaining process isolation and security
120
- boundaries. For technical details, see the [MCP
154
+ This architecture enables multiple Claude Code windows to access RemNote concurrently while maintaining process
155
+ isolation and security boundaries. For technical details, see the [MCP
121
156
  specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports).
122
157
 
123
158
  ### 2. Install RemNote MCP Bridge Plugin
@@ -129,91 +164,139 @@ Install the [RemNote MCP Bridge plugin](https://github.com/robert7/remnote-mcp-b
129
164
  3. Configure WebSocket URL: `ws://127.0.0.1:3002`
130
165
  4. Enable auto-reconnect
131
166
 
132
- ### 3. Configure Claude Code CLI
167
+ ### 3. Start the Server
133
168
 
134
- MCP servers are configured in `~/.claude.json` under the `mcpServers` key within project-specific sections.
169
+ **IMPORTANT:** You must start the server before using it with Claude Code.
135
170
 
136
- **Add to your `~/.claude.json`:**
171
+ ```bash
172
+ # Production mode
173
+ npm start
137
174
 
138
- ```json
139
- {
140
- "projects": {
141
- "/Users/username": {
142
- "mcpServers": {
143
- "remnote": {
144
- "type": "stdio",
145
- "command": "remnote-mcp-server",
146
- "args": [],
147
- "env": {
148
- "REMNOTE_WS_PORT": "3002"
149
- }
150
- }
151
- }
152
- }
153
- }
154
- }
175
+ # OR development mode (with hot reload)
176
+ npm run dev
177
+ ```
178
+
179
+ Expected output:
180
+ ```
181
+ [WebSocket Server] Listening on port 3002
182
+ [HTTP Server] Listening on port 3001
183
+ ```
184
+
185
+ Keep this terminal running. The server must be running for Claude Code to connect.
186
+
187
+ ## Configuration of AI Agents
188
+
189
+ ### Claude Code CLI
190
+
191
+ Use the `claude mcp` CLI commands to add, test, and remove the MCP server.
192
+
193
+ **Add the server:**
194
+
195
+ ```bash
196
+ # goto your project directory
197
+ cd /Users/username/Projects/sample-project
198
+ claude mcp add remnote --transport http http://localhost:3001/mcp
199
+ ```
200
+
201
+ Example output:
202
+
203
+ ```text
204
+ Added HTTP MCP server remnote with URL: http://localhost:3001/mcp to local config
205
+ File modified: /Users/username/.claude.json [project: /Users/username/Projects/sample-project]
206
+ ```
207
+
208
+ **Verify connection:**
209
+
210
+ ```bash
211
+ claude mcp list
212
+ ```
213
+
214
+ Example output:
215
+
216
+ ```text
217
+ remnote: http://localhost:3001/mcp (HTTP) - ✓ Connected
155
218
  ```
156
219
 
157
- **Configuration Notes:**
220
+ As alternative you can use `/mcp` command in any Claude Code session to check the connection health.
158
221
 
159
- - **Global availability:** Use your home directory path (`/Users/username`) to make RemNote tools available in all
160
- projects
161
- - **Project-specific:** Use a specific project path to limit availability to that project
162
- - **Multiple projects:** Add `mcpServers` configuration under each project path as needed
222
+ **Using the server:**
163
223
 
164
- **Example with multiple projects:**
224
+ Once configured, Claude Code automatically loads RemNote tools in your sessions. See the [Example Usage](#example-usage)
225
+ section below for conversational commands.
226
+
227
+ ```bash
228
+ # In any Claude Code session
229
+ claude
230
+
231
+ prompt:
232
+ show remnote note titles related do AI assisted coding
233
+ ...
234
+ remnote - remnote_search (MCP)(query: "AI assisted coding", limit: 20, includeContent: false)
235
+ ...
236
+ Found 20 notes related to "AI assisted coding". The main results include:
237
+
238
+ Primary note:
239
+ - AI assisted coding (remId: qtVwh5XBQbJM2HfSp)
240
+
241
+ Related tools/platforms:
242
+ - Claude Code
243
+ - Gemini CLI
244
+ ...
245
+ ```
246
+
247
+ **Remove the server:**
248
+
249
+ ```bash
250
+ claude mcp remove remnote
251
+ ```
252
+
253
+ Example output:
254
+
255
+ ```text
256
+ ✓ Removed MCP server "remnote"
257
+ Config: /Users/username/.claude.json
258
+ ```
259
+
260
+ ### Claude Code CLI (manual configuration)
261
+
262
+ If you prefer to manually configure the MCP server in Claude Code CLI instead of using `claude mcp add`, you can
263
+ directly edit your `~/.claude.json` file.
264
+
265
+ MCP servers are configured in `~/.claude.json` under the `mcpServers` key within project-specific sections.
266
+
267
+ **Add to your `~/.claude.json`:**
165
268
 
166
269
  ```json
167
270
  {
168
271
  "projects": {
169
272
  "/Users/username": {
273
+ ...
170
274
  "mcpServers": {
171
275
  "remnote": {
172
- "type": "stdio",
173
- "command": "remnote-mcp-server",
174
- "args": [],
175
- "env": {
176
- "REMNOTE_WS_PORT": "3002"
177
- }
178
- }
179
- }
180
- },
181
- "/Users/username/Projects/my-project": {
182
- "mcpServers": {
183
- "remnote": {
184
- "type": "stdio",
185
- "command": "remnote-mcp-server",
186
- "args": [],
187
- "env": {
188
- "REMNOTE_WS_PORT": "3002"
189
- }
276
+ "type": "http",
277
+ "url": "http://localhost:3001/mcp"
190
278
  }
191
- }
192
- }
193
- }
279
+ ...
194
280
  }
195
281
  ```
196
282
 
197
- ### 4. Restart Claude Code
198
-
199
- Restart Claude Code completely to load the MCP server configuration. The server will start automatically when Claude
200
- Code launches.
283
+ Restart Claude Code completely to load the MCP server configuration. Claude Code will connect to the running server.
201
284
 
202
285
  ## Verification
203
286
 
204
287
  ### Check Server is Running
205
288
 
206
- After Claude Code restarts, verify the server started:
289
+ Verify both ports are listening:
207
290
 
208
291
  ```bash
209
- # Check process is running
210
- ps aux | grep remnote-mcp-server
292
+ # Check HTTP port (MCP)
293
+ lsof -i :3001
211
294
 
212
- # Check WebSocket port is listening
295
+ # Check WebSocket port (RemNote bridge)
213
296
  lsof -i :3002
214
297
  ```
215
298
 
216
- You should see the `remnote-mcp-server` process running.
299
+ You should see the `node` process listening on both ports.
217
300
 
218
301
  ### Check RemNote Plugin Connection
219
302
 
@@ -305,30 +388,22 @@ Check if RemNote is connected
305
388
 
306
389
  ### Environment Variables
307
390
 
391
+ - `REMNOTE_HTTP_PORT` - HTTP MCP server port (default: 3001)
308
392
  - `REMNOTE_WS_PORT` - WebSocket server port (default: 3002)
309
393
 
310
- **Example with custom port:**
394
+ **Example with custom ports:**
311
395
 
312
- ```json
313
- {
314
- "projects": {
315
- "/Users/username": {
316
- "mcpServers": {
317
- "remnote": {
318
- "type": "stdio",
319
- "command": "remnote-mcp-server",
320
- "args": [],
321
- "env": {
322
- "REMNOTE_WS_PORT": "3003"
323
- }
324
- }
325
- }
326
- }
327
- }
328
- }
396
+ ```bash
397
+ # Set environment variables before starting
398
+ export REMNOTE_HTTP_PORT=3003
399
+ export REMNOTE_WS_PORT=3004
400
+ npm start
329
401
  ```
330
402
 
331
- **Note:** If you change the port, you must also update the WebSocket URL in the RemNote MCP Bridge plugin settings.
403
+ Then update your `~/.claude.json` and RemNote plugin settings to use the new ports.
404
+
405
+ **Note:** If you change the WebSocket port, you must also update the WebSocket URL in the RemNote MCP Bridge plugin
406
+ settings.
332
407
 
333
408
  ### RemNote Plugin Settings
334
409
 
@@ -341,36 +416,35 @@ Configure in the plugin control panel:
341
416
 
342
417
  ### Server Not Starting
343
418
 
344
- 1. **Check if globally linked:**
419
+ 1. **Verify the server is running:**
345
420
  ```bash
346
- which remnote-mcp-server
421
+ lsof -i :3001
422
+ lsof -i :3002
347
423
  ```
348
- Should return a path to the executable.
424
+ Both ports should show active listeners.
349
425
 
350
- 2. **Re-link if needed:**
351
- ```bash
352
- cd ~/Projects/_private/remnote-mcp-server
353
- npm link
354
- ```
426
+ 2. **Check server output:**
427
+ - You should see: `[HTTP Server] Listening on port 3001`
428
+ - And: `[WebSocket Server] Listening on port 3002`
429
+ 3. **If server fails to start:**
430
+ - Check if ports are already in use (see "Port Already in Use" below)
431
+ - Verify installation: `which remnote-mcp-server`
432
+ - Check server logs for errors
355
433
 
356
- 3. **Check Claude Code logs:**
357
- ```bash
358
- tail -f ~/.claude/debug/mcp-*.log
359
- ```
434
+ ### Port Already in Use
360
435
 
361
- ### Port 3002 Already in Use
362
-
363
- If you see "EADDRINUSE" error:
436
+ If you see "EADDRINUSE" error for port 3001 or 3002:
364
437
 
365
438
  ```bash
366
- # Find what's using the port
439
+ # Find what's using the ports
440
+ lsof -i :3001
367
441
  lsof -i :3002
368
442
 
369
443
  # Kill the process if needed
370
444
  kill -9 <PID>
371
445
  ```
372
446
 
373
- Alternatively, configure a different port in both `~/.claude.json` and the RemNote plugin settings.
447
+ Alternatively, configure different ports using environment variables (see Configuration section).
374
448
 
375
449
  ### Plugin Won't Connect
376
450
 
@@ -402,32 +476,34 @@ Alternatively, configure a different port in both `~/.claude.json` and the RemNo
402
476
 
403
477
  ### Configuration Not Working
404
478
 
405
- **Common issue:** Using the old `~/.claude/.mcp.json` file format
479
+ **Common issues:**
480
+
481
+ ❌ **Wrong transport type:**
482
+ ```json
483
+ "type": "stdio" // OLD - doesn't work anymore
484
+ ```
485
+
486
+ ✅ **Correct transport type:**
487
+ ```json
488
+ "type": "http" // NEW - required
489
+ ```
406
490
 
407
- ❌ **Old format (deprecated):**
491
+ ❌ **Using command instead of URL:**
408
492
  ```json
409
- // File: ~/.claude/.mcp.json
410
493
  {
411
- "remnote": { ... }
494
+ "type": "stdio",
495
+ "command": "remnote-mcp-server" // OLD
412
496
  }
413
497
  ```
414
498
 
415
- ✅ **Correct format:**
499
+ ✅ **Correct configuration:**
416
500
  ```json
417
- // File: ~/.claude.json
418
501
  {
419
- "projects": {
420
- "/Users/username": {
421
- "mcpServers": {
422
- "remnote": { ... }
423
- }
424
- }
425
- }
502
+ "type": "http",
503
+ "url": "http://127.0.0.1:3001/mcp" // NEW
426
504
  }
427
505
  ```
428
506
 
429
- The `enabledMcpjsonServers` setting in `~/.claude/settings.json` is also deprecated and no longer needed.
430
-
431
507
  ## Development
432
508
 
433
509
  ### Setup
@@ -468,10 +544,9 @@ Run `./code-quality.sh` to ensure all checks pass.
468
544
 
469
545
  ### Manual Testing
470
546
 
471
- To test the server independently (without Claude Code):
547
+ To test the server:
472
548
 
473
549
  ```bash
474
- # Stop Claude Code first to free port 3002
475
550
  cd ~/Projects/_private/remnote-mcp-server
476
551
  npm run dev
477
552
  ```
@@ -479,7 +554,7 @@ npm run dev
479
554
  Expected output:
480
555
  ```
481
556
  [WebSocket Server] Listening on port 3002
482
- [MCP Server] Server started on stdio
557
+ [HTTP Server] Listening on port 3001
483
558
  ```
484
559
 
485
560
  When the RemNote plugin connects:
@@ -488,11 +563,13 @@ When the RemNote plugin connects:
488
563
  [RemNote Bridge] RemNote plugin connected
489
564
  ```
490
565
 
566
+ When Claude Code connects, you'll see HTTP requests in the logs.
567
+
491
568
  Press Ctrl+C to stop.
492
569
 
493
570
  ### Development Documentation
494
571
 
495
- - **[IMPLEMENTATION.md](./IMPLEMENTATION.md)** - Technical implementation details
572
+ - **[docs/architecture.md](./docs/architecture.md)** - Architecture and design rationale
496
573
  - **[AGENTS.md](./AGENTS.md)** - AI agent and developer guidance
497
574
  - **[CHANGELOG.md](./CHANGELOG.md)** - Version history
498
575
 
@@ -0,0 +1,21 @@
1
+ import { WebSocketServer } from './websocket-server.js';
2
+ interface ServerInfo {
3
+ name: string;
4
+ version: string;
5
+ }
6
+ export declare class HttpMcpServer {
7
+ private app;
8
+ private server;
9
+ private port;
10
+ private wsServer;
11
+ private serverInfo;
12
+ private transports;
13
+ constructor(port: number, wsServer: WebSocketServer, serverInfo: ServerInfo);
14
+ private setupRoutes;
15
+ private initializeNewSession;
16
+ private handleSessionRequest;
17
+ start(): Promise<void>;
18
+ stop(): Promise<void>;
19
+ getActiveSessionCount(): number;
20
+ }
21
+ export {};
@@ -0,0 +1,186 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
3
+ import express from 'express';
4
+ import { randomUUID } from 'crypto';
5
+ import { registerAllTools } from './tools/index.js';
6
+ export class HttpMcpServer {
7
+ app;
8
+ server = null;
9
+ port;
10
+ wsServer;
11
+ serverInfo;
12
+ transports = new Map();
13
+ constructor(port, wsServer, serverInfo) {
14
+ this.port = port;
15
+ this.wsServer = wsServer;
16
+ this.serverInfo = serverInfo;
17
+ // Create Express app with JSON parsing
18
+ this.app = express();
19
+ this.app.use(express.json());
20
+ // Route handlers
21
+ this.setupRoutes();
22
+ }
23
+ setupRoutes() {
24
+ // POST: Handle session initialization and requests
25
+ this.app.post('/mcp', async (req, res) => {
26
+ try {
27
+ const sessionId = req.headers['mcp-session-id'];
28
+ const body = req.body;
29
+ // Check if this is an initialize request
30
+ const isInitializeRequest = body && body.method === 'initialize' && body.jsonrpc === '2.0';
31
+ if (!sessionId && isInitializeRequest) {
32
+ // New session initialization
33
+ await this.initializeNewSession(req, res, body);
34
+ }
35
+ else if (sessionId) {
36
+ // Existing session request
37
+ await this.handleSessionRequest(sessionId, req, res, body);
38
+ }
39
+ else {
40
+ // Missing session ID for non-initialize request
41
+ res.status(400).json({
42
+ jsonrpc: '2.0',
43
+ error: {
44
+ code: -32600,
45
+ message: 'Missing mcp-session-id header for non-initialize request',
46
+ },
47
+ id: body?.id ?? null,
48
+ });
49
+ }
50
+ }
51
+ catch (error) {
52
+ console.error('[HTTP Server] Error handling POST request:', error);
53
+ res.status(500).json({
54
+ jsonrpc: '2.0',
55
+ error: {
56
+ code: -32603,
57
+ message: error instanceof Error ? error.message : String(error),
58
+ },
59
+ id: null,
60
+ });
61
+ }
62
+ });
63
+ // GET: SSE stream for session notifications
64
+ this.app.get('/mcp', async (req, res) => {
65
+ const sessionId = req.headers['mcp-session-id'];
66
+ if (!sessionId) {
67
+ res.status(400).json({ error: 'Missing mcp-session-id header' });
68
+ return;
69
+ }
70
+ const transport = this.transports.get(sessionId);
71
+ if (!transport) {
72
+ res.status(404).json({ error: `Session not found: ${sessionId}` });
73
+ return;
74
+ }
75
+ // Let transport handle SSE stream setup
76
+ await transport.handleRequest(req, res);
77
+ });
78
+ // DELETE: Terminate session
79
+ this.app.delete('/mcp', async (req, res) => {
80
+ const sessionId = req.headers['mcp-session-id'];
81
+ if (!sessionId) {
82
+ res.status(400).json({ error: 'Missing mcp-session-id header' });
83
+ return;
84
+ }
85
+ const transport = this.transports.get(sessionId);
86
+ if (!transport) {
87
+ res.status(404).json({ error: `Session not found: ${sessionId}` });
88
+ return;
89
+ }
90
+ // Let transport handle session termination
91
+ await transport.handleRequest(req, res);
92
+ });
93
+ }
94
+ async initializeNewSession(req, res, body) {
95
+ // Create new transport with session ID generator
96
+ const transport = new StreamableHTTPServerTransport({
97
+ sessionIdGenerator: () => randomUUID(),
98
+ onsessioninitialized: (sessionId) => {
99
+ this.transports.set(sessionId, transport);
100
+ console.error(`[HTTP Server] New session initialized: ${sessionId}`);
101
+ },
102
+ });
103
+ // Set up onclose handler to clean up transport when closed
104
+ transport.onclose = () => {
105
+ const sessionId = transport.sessionId;
106
+ if (sessionId && this.transports.has(sessionId)) {
107
+ console.error(`[HTTP Server] Session closed: ${sessionId}`);
108
+ this.transports.delete(sessionId);
109
+ }
110
+ };
111
+ // Create new MCP server instance for this session
112
+ const server = new Server(this.serverInfo, {
113
+ capabilities: {
114
+ tools: {},
115
+ },
116
+ });
117
+ // Register all tools with the shared WebSocket server
118
+ registerAllTools(server, this.wsServer);
119
+ // Connect server to transport
120
+ await server.connect(transport);
121
+ // Handle the initialize request
122
+ await transport.handleRequest(req, res, body);
123
+ }
124
+ async handleSessionRequest(sessionId, req, res, body) {
125
+ const transport = this.transports.get(sessionId);
126
+ if (!transport) {
127
+ res.status(400).json({
128
+ jsonrpc: '2.0',
129
+ error: {
130
+ code: -32600,
131
+ message: `Invalid session ID: ${sessionId}`,
132
+ },
133
+ id: body?.id ?? null,
134
+ });
135
+ return;
136
+ }
137
+ await transport.handleRequest(req, res, body);
138
+ }
139
+ async start() {
140
+ return new Promise((resolve, reject) => {
141
+ try {
142
+ this.server = this.app.listen(this.port, () => {
143
+ console.error(`[HTTP Server] Listening on port ${this.port}`);
144
+ resolve();
145
+ });
146
+ this.server.on('error', (error) => {
147
+ console.error('[HTTP Server] Server error:', error);
148
+ reject(error);
149
+ });
150
+ }
151
+ catch (error) {
152
+ reject(error);
153
+ }
154
+ });
155
+ }
156
+ async stop() {
157
+ // Close all active transports
158
+ for (const [sessionId, transport] of this.transports.entries()) {
159
+ try {
160
+ console.error(`[HTTP Server] Closing session: ${sessionId}`);
161
+ await transport.close();
162
+ this.transports.delete(sessionId);
163
+ }
164
+ catch (error) {
165
+ console.error(`[HTTP Server] Error closing session ${sessionId}:`, error);
166
+ }
167
+ }
168
+ // Close HTTP server
169
+ return new Promise((resolve) => {
170
+ if (this.server) {
171
+ this.server.close(() => {
172
+ console.error('[HTTP Server] Server stopped');
173
+ this.server = null;
174
+ resolve();
175
+ });
176
+ }
177
+ else {
178
+ resolve();
179
+ }
180
+ });
181
+ }
182
+ getActiveSessionCount() {
183
+ return this.transports.size;
184
+ }
185
+ }
186
+ //# sourceMappingURL=http-server.js.map
@@ -0,0 +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,oDAAoD,CAAC;AACnG,OAAO,OAAsD,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOpD,MAAM,OAAO,aAAa;IAChB,GAAG,CAAU;IACb,MAAM,GAAyC,IAAI,CAAC;IACpD,IAAI,CAAS;IACb,QAAQ,CAAkB;IAC1B,UAAU,CAAa;IACvB,UAAU,GAAG,IAAI,GAAG,EAAyC,CAAC;IAEtE,YAAY,IAAY,EAAE,QAAyB,EAAE,UAAsB;QACzE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CA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C;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
@@ -1,25 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
2
  import { createRequire } from 'module';
5
3
  import { WebSocketServer } from './websocket-server.js';
6
- import { registerAllTools } from './tools/index.js';
4
+ import { HttpMcpServer } from './http-server.js';
7
5
  const require = createRequire(import.meta.url);
8
6
  const packageJson = require('../package.json');
9
7
  const WS_PORT = parseInt(process.env.REMNOTE_WS_PORT || '3002', 10);
8
+ const HTTP_PORT = parseInt(process.env.REMNOTE_HTTP_PORT || '3001', 10);
10
9
  async function main() {
11
- // Initialize MCP server
12
- const mcpServer = new Server({
13
- name: 'remnote-mcp-server',
14
- version: packageJson.version,
15
- }, {
16
- capabilities: {
17
- tools: {},
18
- },
19
- });
20
10
  // Initialize WebSocket server for RemNote plugin
21
11
  const wsServer = new WebSocketServer(WS_PORT);
22
- // Log connection status to stderr (stdio reserved for MCP)
12
+ // Log connection status
23
13
  wsServer.onClientConnect(() => {
24
14
  console.error('[RemNote Bridge] RemNote plugin connected');
25
15
  });
@@ -29,17 +19,17 @@ async function main() {
29
19
  // Start WebSocket server
30
20
  await wsServer.start();
31
21
  console.error(`[WebSocket Server] Listening on port ${WS_PORT}`);
32
- // Register all RemNote MCP tools
33
- registerAllTools(mcpServer, wsServer);
34
- // Set up stdio transport for MCP
35
- const transport = new StdioServerTransport();
36
- await mcpServer.connect(transport);
37
- console.error('[MCP Server] Server started on stdio');
22
+ // Initialize HTTP MCP server
23
+ const httpServer = new HttpMcpServer(HTTP_PORT, wsServer, {
24
+ name: 'remnote-mcp-server',
25
+ version: packageJson.version,
26
+ });
27
+ await httpServer.start();
38
28
  // Graceful shutdown
39
29
  const shutdown = async () => {
40
30
  console.error('[MCP Server] Shutting down...');
31
+ await httpServer.stop();
41
32
  await wsServer.stop();
42
- await mcpServer.close();
43
33
  process.exit(0);
44
34
  };
45
35
  process.on('SIGINT', shutdown);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;AAEpE,KAAK,UAAU,IAAI;IACjB,wBAAwB;IACxB,MAAM,SAAS,GAAG,IAAI,MAAM,CAC1B;QACE,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,WAAW,CAAC,OAAO;KAC7B,EACD;QACE,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;SACV;KACF,CACF,CAAC;IAEF,iDAAiD;IACjD,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;IAE9C,2DAA2D;IAC3D,QAAQ,CAAC,eAAe,CAAC,GAAG,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC7D,CAAC,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U,CAAC,IAAI,EAAE,CAAC;QACxB,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -130,7 +130,7 @@ export function registerAllTools(server, wsServer) {
130
130
  ],
131
131
  };
132
132
  }
133
- const result = await wsServer.sendRequest('status', {});
133
+ const result = await wsServer.sendRequest('get_status', {});
134
134
  return {
135
135
  content: [
136
136
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,sEAAsE;IACnF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,E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H,CAAC,CAAC,CAAC;IAEH,8BAA8B;IAC9B,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE;YACL,gBAAgB;YAChB,WAAW;YACX,cAAc;YACd,gBAAgB;YAChB,mBAAmB;YACnB,WAAW;SACZ;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remnote-mcp-server",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "MCP server bridge for RemNote knowledge base",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -53,10 +53,12 @@
53
53
  "homepage": "https://github.com/robert7/remnote-mcp-server#readme",
54
54
  "dependencies": {
55
55
  "@modelcontextprotocol/sdk": "^1.26.0",
56
+ "express": "^5.2.0",
56
57
  "ws": "^8.19.0",
57
58
  "zod": "^4.3.6"
58
59
  },
59
60
  "devDependencies": {
61
+ "@types/express": "^5.0.0",
60
62
  "@types/node": "^25.2.1",
61
63
  "@types/ws": "^8.18.1",
62
64
  "@typescript-eslint/eslint-plugin": "^6.21.0",