Commit 2a808be
committed
feat(mcp): refactor to in-app HTTP server — v6.2.0 (build 96)
Replace the v6.1.0 helper-binary + stdio + URL-scheme + status-polling
architecture with a single in-process HTTP MCP server. Same 13 tools,
same one-click installer, but the entire pipeline now lives inside the
running app and works identically on App Store builds.
New:
- MCPHTTPServer (swift-nio + StatefulHTTPServerTransport) binds to
127.0.0.1:8765 at /mcp, auto-retries higher ports if 8765 is taken.
- MCPToolRegistry owns the 13 tool definitions and dispatches each to
direct calls into FrameHistoryDatabase / AstroRootStore / ArchiveScanner
/ TriageViewModel (via MCPViewModelBridge). No indirection, no polling.
- FrameHistoryDatabase+MCP extension hosts the per-tool query methods
(listSetupsForMCP, qualitySummaryForMCP, etc.) returning plain Codable
result structs.
- MCPConnectorWindow now shows the running endpoint URL with a live
preflight, plus a "Test Connection" button that round-trips an
initialize request to prove the server's up.
- com.apple.security.network.server entitlement on the app, so a
sandboxed App Store build can also accept localhost connections.
Removed:
- AstroBlinkMCPServer standalone tool target and the entire MCPServer/
directory.
- "Embed AstroBlinkMCPServer" postBuildScript + SKIP_MCP_HELPER switch.
- astroblink://scan and astroblink://mark-garbage URL verbs.
- MCPCommandRunner.swift, MCPCommandStatus.swift, the
saveMCPCommandStatus / updateMCPProgress / autoGarbageCandidates-via-
polling helpers.
Migration:
- No user action. The mcp_command_status table is now unused; left in
place to avoid an immediate v11 migration.
- Old Claude Desktop configs pointing at the v6.1.0 helper binary are
inert. Re-run "Install to Claude Desktop" from MCP Connector to
overwrite with the new URL form.
kAlgorithmVersion unchanged. Tested end-to-end: app launches, server
binds, MCP initialize/tools/list/tools/call ping all succeed.1 parent 88e81b7 commit 2a808be
22 files changed
Lines changed: 1644 additions & 2122 deletions
File tree
- AstroTriage.xcodeproj
- AstroTriage
- App
- Engine
- UI
- MCPServer
Large diffs are not rendered by default.
Lines changed: 0 additions & 91 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
27 | 23 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
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 | | - | |
| 24 | + | |
75 | 25 | | |
76 | 26 | | |
77 | 27 | | |
| |||
372 | 322 | | |
373 | 323 | | |
374 | 324 | | |
375 | | - | |
376 | | - | |
377 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
378 | 328 | | |
379 | 329 | | |
380 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
0 commit comments