convez.ai
MCP ServerIntegração & APIsAvançado
jay-depot

Nodepad Sync Server

jay-depot/nodepad-sync-server

Gateway de sincronização e MCP para nodepad com suporte multi-dispositivo

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP dual-mode que sincroniza dados de nodepad em tempo real entre dispositivos via WebSocket e expõe uma API para agentes de IA acessarem, buscarem e manipularem blocos de notas através de JSON-RPC (stdio ou HTTP). Suporta múltiplos backends de armazenamento (SQLite ou PostgreSQL).

Instalação

$npx convez-ai jay-depot/nodepad-sync-server

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Sincronizar notas e projetos entre Electron client e agentes IA
  • Integrar busca e CRUD de blocos em workflows de IA
  • Manter estado compartilhado de projeto em tempo real via WebSocket

Veredito

Ferramenta técnica bem arquitetada para casos de uso específicos de sincronização e integração MCP com nodepad. Implementação sólida em TypeScript com suporte robusto a múltiplos backends, mas nicho e voltada para contextos já familiarizados com o projeto nodepad.

README

A tradução para o português deste README ainda está na fila.

nodepad-sync-server

Sync relay and MCP gateway for the Electrified, Ollama'd fork of nodepad.

Single Node.js/TypeScript process, dual-mode: a WebSocket sync server for real-time multi-device nodepad sync, and an MCP server (stdio + HTTP) for AI-agent access to nodepad data — search, CRUD, graph traversal, synthesis.


Quick start

npm install
npm start

Starts the sync server on ws://localhost:3001 and an MCP server on stdio.

Default auth token: nodepad-sync-dev (set AUTH_TOKEN to change it).


Architecture

┌─────────────┐     WebSocket (sync ops)     ┌──────────────────────┐
│  nodepad    │ ◄──────────────────────────► │  nodepad-sync-server │
│  (Electron) │                              │                      │
└─────────────┘                              │  ┌────────────────┐  │
                                             │  │  Sync Server   │  │
┌─────────────┐     MCP (stdio or HTTP)      │  │  (ws://:3001)  │  │
│  Gateway /  │ ◄──────────────────────────► │  └────────────────┘  │
│  CLI agent  │                              │  ┌────────────────┐  │
└─────────────┘                              │  │  MCP Server    │  │
                                             │  │  (stdio/HTTP)  │  │
                                             │  └────────────────┘  │
                                             │  ┌────────────────┐  │
                                             │  │  Storage       │  │
                                             │  │  SQLite/Postgres│  │
                                             │  └────────────────┘  │
                                             └──────────────────────┘

Sync protocol (WebSocket)

  1. Client connects with ?token=<auth> query param
  2. Sends {type: "subscribe", projectId} → gets full {type: "snapshot", …}
  3. Sends {type: "op", op: SyncOp, clientTimestamp} → server persists, broadcasts
  4. Reconnect: {type: "catchup", fromSeq} → gets missed ops since last seq
  5. Ping/keepalive every 30s

MCP protocol

  • stdio (default): standard JSON-RPC 2.0 over stdin/stdout
  • HTTP (--mcp-port): SSE stream on GET /mcp, JSON-RPC on POST /mcp
  • Auth via Authorization: Bearer <token> header or ?token= query param

Usage

Full server (sync + MCP stdio)

npm start

Full server + MCP HTTP

npm start -- --mcp-port 3100
# or
MCP_PORT=3100 npm start

MCP only (stdio)

npm start -- --mcp

MCP only (HTTP)

npm start -- --mcp --mcp-port 3100

PostgreSQL backend

DB_TYPE=postgres DB_URL=postgresql://localhost:5432/nodepad npm start

Environment variables

VariableDefaultDescription
PORT3001Sync server WebSocket port
MCP_PORT3100MCP HTTP server port
AUTH_TOKENnodepad-sync-devAuth token for sync + MCP
DB_TYPEsqliteStorage backend (sqlite or postgres)
DB_URL—PostgreSQL connection string
DB_PATH./data/nodepad.dbSQLite database file path

MCP tools (14)

ToolDescription
list_projectsList all projects
get_projectGet project by ID
create_projectCreate a new project
delete_projectDelete a project and all its data
get_blockGet a single block by ID
create_blockCreate a block (claim, question, idea, task, etc.)
update_blockUpdate block text, type, category, annotation
delete_blockDelete a block
search_blocksFull-text search across blocks (FTS5 / tsvector)
get_graphGet all nodes and edges for a project
find_connectedGraph traversal from a block (configurable depth)
get_synthesisGet ghost notes (synthesis insights)
create_edgeCreate an influencedBy connection between blocks
delete_edgeRemove a connection between blocks

Data model

projects ──── has many ──── blocks
                              │
                              ├── has many ──── subtasks
                              ├── has many ──── edges (influencedBy)
                              │
projects ──── has many ──── ghost_notes

All foreign keys cascade on delete.


Tech

TypeScript · Node.js · better-sqlite3 (with FTS5) · pg · ws (WebSocket)

Ver o original no GitHub

Bom para

Relacionados