@rozek/sds-mcp-server-loro 0.0.10
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/LICENSE.md +9 -0
- package/README.md +106 -0
- package/dist/sds-mcp-server-loro.d.ts +1 -0
- package/dist/sds-mcp-server-loro.js +15 -0
- package/package.json +64 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Andreas Rozek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# @rozek/sds-mcp-server-loro
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for the **shareable-data-store** (SDS) family, using the **Loro** CRDT backend. Exposes all SDS store and entry operations as MCP tools so that AI agents can manage CRDT stores, entries, items, links, tokens, and batch workflows through the standard MCP tool-calling interface.
|
|
4
|
+
|
|
5
|
+
Built on top of `@rozek/sds-mcp-server`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
| requirement | details |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| **Node.js 22.5+** | required to run `sds-mcp-server-loro`. Download from [nodejs.org](https://nodejs.org). |
|
|
14
|
+
| **MCP client** | any host that speaks the Model Context Protocol (Claude Desktop, custom agent, etc.) |
|
|
15
|
+
| **SDS server** | only required for network operations (`sds_store_sync`, `sds_store_ping`, `sds_token_issue`). All local read/write tools work entirely offline. |
|
|
16
|
+
| **JWT tokens** | server operations need a client token (scope `read` or `write`) or an admin token (scope `admin`). |
|
|
17
|
+
|
|
18
|
+
All clients and servers connected to the same relay must use the **same CRDT backend**. Use `@rozek/sds-mcp-server-loro` together with `@rozek/sds-websocket-server` and `@rozek/sds-command-loro`.
|
|
19
|
+
|
|
20
|
+
SQLite support is built directly into Node.js 22.5+ — no native addon and no build toolchain is needed.
|
|
21
|
+
|
|
22
|
+
> **Note:** Run `pnpm build` (or `npm run build`) in this package directory before starting the server for the first time. The `dist/` directory is not included in the repository.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm add @rozek/sds-mcp-server-loro
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or use without installation via npx:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx @rozek/sds-mcp-server-loro
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Running without Installation
|
|
41
|
+
|
|
42
|
+
Register the server in your MCP host configuration using `npx` as the command:
|
|
43
|
+
|
|
44
|
+
**Claude Desktop (`claude_desktop_config.json`):**
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"sds": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": [ "-y", "@rozek/sds-mcp-server-loro" ]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
### Server-level defaults
|
|
62
|
+
|
|
63
|
+
You can pre-configure default values for `StoreId`, `PersistenceDir`, `ServerURL`, `Token`, and `AdminToken` so that individual tool calls do not need to repeat them.
|
|
64
|
+
|
|
65
|
+
**CLI arguments:**
|
|
66
|
+
|
|
67
|
+
| argument | applies to |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `--store <id>` | default `StoreId` for all tools |
|
|
70
|
+
| `--data-dir <path>` | default `PersistenceDir` for all tools |
|
|
71
|
+
| `--server <url>` | default `ServerURL` for sync/token tools |
|
|
72
|
+
| `--token <jwt>` | default client `Token` for sync tools |
|
|
73
|
+
| `--admin-token <jwt>` | default `AdminToken` for `sds_token_issue` |
|
|
74
|
+
|
|
75
|
+
**Environment variables:**
|
|
76
|
+
|
|
77
|
+
| variable | applies to |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| `SDS_STORE_ID` | default `StoreId` for all tools |
|
|
80
|
+
| `SDS_DATA_DIR` | default `PersistenceDir` for all tools |
|
|
81
|
+
| `SDS_SERVER_URL` | default `ServerURL` for sync/token tools |
|
|
82
|
+
| `SDS_TOKEN` | default client `Token` for sync tools |
|
|
83
|
+
| `SDS_ADMIN_TOKEN` | default `AdminToken` for `sds_token_issue` |
|
|
84
|
+
|
|
85
|
+
**Precedence** (highest to lowest): tool parameter → CLI argument → environment variable → built-in default (`~/.sds` for `PersistenceDir`).
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Tools
|
|
90
|
+
|
|
91
|
+
See `@rozek/sds-mcp-server` for the complete tool reference. All 20 tools available in `sds-mcp-server-loro` are identical to those in `sds-mcp-server` — the only difference is the CRDT backend used to store and synchronise data.
|
|
92
|
+
|
|
93
|
+
| category | tools |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| **store** | `sds_store_info`, `sds_store_ping`, `sds_store_sync`, `sds_store_destroy`, `sds_store_export`, `sds_store_import` |
|
|
96
|
+
| **entry** | `sds_entry_create`, `sds_entry_get`, `sds_entry_list`, `sds_entry_update`, `sds_entry_move`, `sds_entry_delete`, `sds_entry_restore`, `sds_entry_purge` |
|
|
97
|
+
| **trash** | `sds_trash_list`, `sds_trash_purge_all`, `sds_trash_purge_expired` |
|
|
98
|
+
| **tree** | `sds_tree_show` |
|
|
99
|
+
| **token** | `sds_token_issue` |
|
|
100
|
+
| **batch** | `sds_batch` |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
[MIT License](../../LICENSE.md) © Andreas Rozek
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --no-warnings
|
|
2
|
+
import { SDS_DataStore as o } from "@rozek/sds-core-loro";
|
|
3
|
+
import { runMCPServer as s } from "@rozek/sds-mcp-server";
|
|
4
|
+
const e = "0.0.10", t = {
|
|
5
|
+
version: e
|
|
6
|
+
}, c = {
|
|
7
|
+
fromScratch: () => o.fromScratch(),
|
|
8
|
+
fromBinary: (r) => o.fromBinary(r)
|
|
9
|
+
};
|
|
10
|
+
s(c, "sds-mcp-server-loro", t.version).catch((r) => {
|
|
11
|
+
process.stderr.write(
|
|
12
|
+
`sds-mcp-server-loro: fatal: ${r.message ?? r}
|
|
13
|
+
`
|
|
14
|
+
), process.exit(1);
|
|
15
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rozek/sds-mcp-server-loro",
|
|
3
|
+
"description": "MCP server for shareable-data-store (Loro CRDT backend)",
|
|
4
|
+
"version": "0.0.10",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"crdt",
|
|
7
|
+
"loro",
|
|
8
|
+
"mcp",
|
|
9
|
+
"model-context-protocol",
|
|
10
|
+
"shareable-data-store"
|
|
11
|
+
],
|
|
12
|
+
"author": "Andreas Rozek",
|
|
13
|
+
"homepage": "https://github.com/rozek/shareable-data-store#readme",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/rozek/shareable-data-store.git",
|
|
17
|
+
"directory": "packages/sds-mcp-server-loro"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/rozek/shareable-data-store/issues"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=22.5"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./dist/sds-mcp-server-loro.js",
|
|
28
|
+
"module": "./dist/sds-mcp-server-loro.js",
|
|
29
|
+
"types": "./dist/sds-mcp-server-loro.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": "./dist/sds-mcp-server-loro.js",
|
|
33
|
+
"types": "./dist/sds-mcp-server-loro.d.ts"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"bin": {
|
|
37
|
+
"sds-mcp-server-loro": "./dist/sds-mcp-server-loro.js"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@rozek/sds-mcp-server": "0.0.10",
|
|
44
|
+
"@rozek/sds-core-loro": "0.0.10"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
48
|
+
"@types/node": "^22.0.0",
|
|
49
|
+
"typescript": "^5.7.2",
|
|
50
|
+
"vite": "^6.0.0",
|
|
51
|
+
"vite-plugin-dts": "^4.0.0",
|
|
52
|
+
"vitest": "^2.0.0"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"dev": "vite build --watch",
|
|
59
|
+
"build": "vite build",
|
|
60
|
+
"test": "vitest",
|
|
61
|
+
"test:run": "vitest run",
|
|
62
|
+
"typecheck": "tsc --noEmit"
|
|
63
|
+
}
|
|
64
|
+
}
|