Commit 5e7ad54
* feat(persistence): add ServerStore class (TASK-029-01)
XDG-compliant server config persistence at ~/.config/mcp-inspector/servers.json.
Modeled after TokenStore: atomic writes, 0o600 file permissions, 0o700 directory.
Stores: id, name, url, transport, params, hasOAuth flag, addedAt timestamp.
Methods: load(), save(), delete(), listAll(), migrate(), isEmpty(), clear(), exists().
Migration support for importing localStorage data during frontend migration.
32 tests cover CRUD, migration, permissions, corruption handling, atomic writes.
* feat(inspector): add ephemeral flag to ConnectOptions [TASK-029-02]
* feat(persistence): wire ServerStore to ConnectionRegistry (TASK-029-03)
* feat(inspector): frontend migration and API integration (TASK-029-06)
* feat(inspector): add remove button for persisted servers (TASK-029-07)
- Add confirmation dialog before server removal (DELETE /api/servers/:id)
- Remove button (trash icon) is separate from Stop button
- Stopped servers show both Start and Remove actions
- Active servers show both Stop and Remove actions
- onDeleteServer callback distinguishes connected vs stopped servers
* feat(inspector): wire ServerStore API routes to HTTP servers (TASK-029)
Add /api/servers routes to both dual-server and standalone-server:
- GET /api/servers — list persisted servers
- POST /api/servers — save a server entry
- POST /api/servers/migrate — migrate from localStorage
- DELETE /api/servers/:id — remove a persisted server
Wire ServerStore instance into ConnectionRegistry constructor.
This connects the persistence layer (029-01/03) to the HTTP layer
that the frontend (029-06) calls.
* fix(inspector): resolve lint errors in server persistence routes
- Type-assert JSON.parse outputs for migrate and save endpoints
- Replace dynamic delete with destructuring in ServerStore
- Remove unnecessary Boolean() wrapper on hasOAuth
- Improve confirmation dialog message (remove internal detail)
- Remove unused err catch parameters
* fix(inspector): validate server entries and default hasOAuth in migration
- Add ServerStore.validateEntry() static method for runtime validation
- POST /api/servers now validates payload before saving (rejects malformed)
- Migration defaults hasOAuth to false when undefined
- Remove unused PersistedServerEntry imports from server files
---------
Co-authored-by: Sirius <sirius@clawd.bot>
1 parent 446b9a9 commit 5e7ad54
File tree
9 files changed
+1543
-55
lines changed- packages/inspector
- src
- dashboard/react
- components
- persistence
- types
- tests
9 files changed
+1543
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
113 | 149 | | |
114 | 150 | | |
115 | 151 | | |
| |||
243 | 279 | | |
244 | 280 | | |
245 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
246 | 297 | | |
247 | 298 | | |
248 | 299 | | |
| |||
Lines changed: 145 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
70 | 122 | | |
71 | 123 | | |
72 | 124 | | |
73 | 125 | | |
74 | 126 | | |
75 | | - | |
76 | 127 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
83 | 137 | | |
84 | 138 | | |
85 | 139 | | |
86 | 140 | | |
87 | 141 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
96 | 153 | | |
97 | 154 | | |
98 | 155 | | |
| |||
128 | 185 | | |
129 | 186 | | |
130 | 187 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
135 | 226 | | |
136 | 227 | | |
137 | 228 | | |
| |||
293 | 384 | | |
294 | 385 | | |
295 | 386 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 387 | | |
302 | 388 | | |
303 | 389 | | |
| |||
621 | 707 | | |
622 | 708 | | |
623 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
624 | 713 | | |
625 | 714 | | |
626 | 715 | | |
| |||
643 | 732 | | |
644 | 733 | | |
645 | 734 | | |
646 | | - | |
| 735 | + | |
| 736 | + | |
647 | 737 | | |
648 | 738 | | |
649 | 739 | | |
| |||
660 | 750 | | |
661 | 751 | | |
662 | 752 | | |
663 | | - | |
| 753 | + | |
| 754 | + | |
664 | 755 | | |
665 | 756 | | |
666 | 757 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1155 | 1161 | | |
1156 | 1162 | | |
1157 | 1163 | | |
| |||
0 commit comments