Commit 12f911e
authored
feat: MCP ChatGPT App (#241)
* feat: add ChatGPT Apps SDK integration with widget UI for MCP server
Add `ui://widget/cran.html` resource serving interactive search widget for ChatGPT Apps. Update all search tools (`search_packages`, `search_authors`, `search_universal`) to return `structuredContent` responses consumed by widget via `window.openai.toolOutput`. Add OpenAI-specific metadata annotations including `outputTemplate`, `toolInvocation` labels, `readOnlyHint`, and `openWorldHint`. Introduce `makeToolResponse()` helper
* refactor: improve search service type safety and structure
Add explicit TypeScript types for search hits (`PackageCombinedHit`, `AuthorCombinedHit`, `CombinedSearchHit`) with discriminated union on `type` field. Update `SearchService.searchUniversal()` to return structured response with `searchType` and `query` fields alongside typed `combined` results. Refactor search result mapping to construct typed objects with URLs upfront before sorting, eliminating redundant transformations. Add `Package
* feat: enhance ChatGPT widget with package metadata and improved UI
Add `title` and `last_released_at` fields to package search results throughout the stack. Update `PackageService` to fetch these fields from database queries and include them in search hits. Propagate fields through `SearchService` to MCP server responses for consumption by ChatGPT widget.
Redesign widget UI with Radix Colors dark mode palette, replacing previous light theme. Implement card-based layout with Iris/Jade color variants for
* refactor: remove ChatGPT Apps SDK widget integration from MCP server
Remove `ui://widget/cran.html` resource and all `openai/outputTemplate` metadata from MCP server tools. Delete widget HTML file serving logic and associated file system dependencies. Update documentation to reflect MCP-only functionality without ChatGPT Apps SDK integration. Rename server from "Crane App" to "CRAN/E" and adjust tool invocation labels accordingly. Simplify CSP requirements by removing widget-specific directives.
* refactor: update package resource description in MCP server
Change resource description from "CRAN/E package" to "CRAN R-package" to clarify that resources represent R packages from CRAN rather than the CRAN/E platform itself.
* ```
feat: add MCP navigation link and homepage promotion
Add "MCP" item to main navigation menu. Add promotional text on homepage linking to MCP page with icon, encouraging use of remote MCP-server for agents. Apply fade-in animation to new homepage element.
```
* feat: centralize MCP version management and display on MCP page
Extract MCP server version into shared `config.server.ts` constant. Update MCP server initialization and MCP page to use centralized version. Add loader to MCP page to fetch and display version dynamically. Add `mcpVersion` field to `package.json` for version tracking. Fix accessibility issues by converting copy button from div to button element and correcting apostrophe escaping.1 parent df290b7 commit 12f911e
File tree
16 files changed
+952
-1110
lines changed- docs
- web
- app
- data
- mcp
- modules
- routes
- public
16 files changed
+952
-1110
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | | - | |
8 | | - | |
| 5 | + | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
30 | 51 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 52 | + | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
| |||
380 | 398 | | |
381 | 399 | | |
382 | 400 | | |
383 | | - | |
| 401 | + | |
384 | 402 | | |
385 | 403 | | |
386 | 404 | | |
| |||
455 | 473 | | |
456 | 474 | | |
457 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
458 | 480 | | |
459 | 481 | | |
460 | 482 | | |
| |||
474 | 496 | | |
475 | 497 | | |
476 | 498 | | |
477 | | - | |
| 499 | + | |
478 | 500 | | |
479 | 501 | | |
480 | 502 | | |
| |||
486 | 508 | | |
487 | 509 | | |
488 | 510 | | |
| 511 | + | |
| 512 | + | |
489 | 513 | | |
490 | 514 | | |
491 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
5 | 29 | | |
6 | 30 | | |
7 | 31 | | |
| |||
30 | 54 | | |
31 | 55 | | |
32 | 56 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 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 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
62 | 125 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
83 | 134 | | |
84 | 135 | | |
85 | 136 | | |
0 commit comments