things-mcp-server 0.1.0 → 0.1.2
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/README.md +5 -28
- package/dist/services/things-service.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,30 +67,6 @@ Or in development:
|
|
|
67
67
|
THINGS_AUTH_TOKEN=your_token_here pnpm dev
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
## MCP Config (Local Source Checkout)
|
|
71
|
-
|
|
72
|
-
This repository includes `mcp.config.example.json` for running the built local server:
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
"mcpServers": {
|
|
77
|
-
"things": {
|
|
78
|
-
"command": "/opt/homebrew/bin/node",
|
|
79
|
-
"args": ["/Users/your-user/Code/things-mcp/dist/index.js"],
|
|
80
|
-
"env": {
|
|
81
|
-
"THINGS_AUTH_TOKEN": "your-token-here"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Notes:
|
|
89
|
-
|
|
90
|
-
- Run `pnpm build` first so `dist/index.js` exists.
|
|
91
|
-
- Update `args[0]` to your actual local absolute path.
|
|
92
|
-
- Keep `command` aligned with the same Node runtime used for install/build to avoid `better-sqlite3` ABI mismatch.
|
|
93
|
-
|
|
94
70
|
## Publish and Install (No Source Checkout)
|
|
95
71
|
|
|
96
72
|
You can publish to npm and run it via `npx`, so client machines do not need this source repo.
|
|
@@ -118,7 +94,7 @@ MCP config example (installed on demand from npm):
|
|
|
118
94
|
}
|
|
119
95
|
```
|
|
120
96
|
|
|
121
|
-
Optional SQLite read path override:
|
|
97
|
+
Optional SQLite read path override (only when auto-discovery fails):
|
|
122
98
|
|
|
123
99
|
```bash
|
|
124
100
|
THINGS_DB_PATH="/Users/you/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-XXXX/Things Database.thingsdatabase/main.sqlite"
|
|
@@ -138,15 +114,16 @@ If `lastOpenError` includes `NODE_MODULE_VERSION` mismatch:
|
|
|
138
114
|
|
|
139
115
|
1. Align Node runtime used by MCP host and by local install.
|
|
140
116
|
2. Rebuild native module with that runtime: `pnpm rebuild better-sqlite3`.
|
|
141
|
-
3.
|
|
117
|
+
3. If you run via `npx`, make sure your MCP host resolves `npx/node` from the same runtime version used to install/rebuild dependencies.
|
|
118
|
+
4. Restart the MCP host and reconnect the client.
|
|
142
119
|
|
|
143
120
|
## Tool Safety Notes
|
|
144
121
|
|
|
145
122
|
- `things_add_area`, `things_add_todo`, `things_add_project`, `things_update_todo`, `things_complete_todo`, `things_move_todo`, and `things_delete_todo` all require `confirm=true`.
|
|
146
123
|
- This server does not execute arbitrary scripts.
|
|
147
124
|
- Reads are done via AppleScript.
|
|
148
|
-
- URL-scheme-supported operations use Things URL scheme (`add_todo`, `add_project`, `
|
|
149
|
-
- AppleScript is used for
|
|
125
|
+
- URL-scheme-supported operations use Things URL scheme (`add_todo`, `add_project`, `move_todo`, `complete_todo`, `show_item`), and `update_todo` when heading placement is requested.
|
|
126
|
+
- AppleScript is used for read operations, plus write operations `add_area`, `delete_todo`, and most `update_todo` cases.
|
|
150
127
|
|
|
151
128
|
## Read Detail Fields
|
|
152
129
|
|
|
@@ -120,10 +120,18 @@ export class ThingsService {
|
|
|
120
120
|
if (input.headingId) {
|
|
121
121
|
assertThingsId(input.headingId);
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
const requiresUrlScheme = input.heading !== undefined || input.headingId !== undefined;
|
|
124
|
+
if (requiresUrlScheme) {
|
|
125
|
+
await this.urlSchemeAdapter.updateTodo(input);
|
|
126
|
+
return {
|
|
127
|
+
ok: true,
|
|
128
|
+
message: "Todo update request sent to Things via URL scheme."
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
await this.appleScriptAdapter.updateTodo(input);
|
|
124
132
|
return {
|
|
125
133
|
ok: true,
|
|
126
|
-
message: "Todo
|
|
134
|
+
message: "Todo updated via AppleScript."
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
137
|
async completeTodo(input) {
|