@react-spectrum/mcp 0.1.0 → 1.0.0

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 CHANGED
@@ -1,21 +1,27 @@
1
1
  # @react-spectrum/mcp
2
2
 
3
- The `@react-spectrum/mcp` package allows you to run [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) servers for React Spectrum (S2) and React Aria locally. It exposes a set of tools that MCP clients can discover and call to browse the docs.
3
+ The `@react-spectrum/mcp` package provides a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) server for React Spectrum (S2) documentation. It exposes a set of tools that MCP clients can discover and call to browse the docs, search for icons and illustrations, and more.
4
4
 
5
- ## Using with an MCP client
5
+ ## Installation
6
6
 
7
- Add one or both servers to your MCP client configuration (the exact file and schema may depend on your client).
7
+ ### Quick Start
8
+
9
+ Simply run the server using npx:
10
+
11
+ ```bash
12
+ npx @react-spectrum/mcp@latest
13
+ ```
14
+
15
+ ### Using with an MCP client
16
+
17
+ Add the server to your MCP client configuration (the exact file and schema may depend on your client).
8
18
 
9
19
  ```json
10
20
  {
11
21
  "mcpServers": {
12
- "s2-docs": {
22
+ "React Spectrum (S2)": {
13
23
  "command": "npx",
14
- "args": ["@react-spectrum/mcp", "s2"]
15
- },
16
- "react-aria-docs": {
17
- "command": "npx",
18
- "args": ["@react-spectrum/mcp", "react-aria"]
24
+ "args": ["@react-spectrum/mcp@latest"]
19
25
  }
20
26
  }
21
27
  }
@@ -26,13 +32,7 @@ Add one or both servers to your MCP client configuration (the exact file and sch
26
32
 
27
33
  #### Click the button to install:
28
34
 
29
- React Spectrum (S2):
30
-
31
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=s2-docs&config=eyJjb21tYW5kIjoibnB4IEByZWFjdC1zcGVjdHJ1bS9tY3AgczIifQ%3D%3D)
32
-
33
- React Aria:
34
-
35
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=react-aria-docs&config=eyJjb21tYW5kIjoibnB4IEByZWFjdC1zcGVjdHJ1bS9tY3AgcmVhY3QtYXJpYSJ9)
35
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=React%20Spectrum%20(S2)&config=eyJjb21tYW5kIjoibnB4IEByZWFjdC1zcGVjdHJ1bS9tY3BAbGF0ZXN0In0%3D)
36
36
 
37
37
  Or follow the MCP install [guide](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) and use the standard config above.
38
38
 
@@ -43,23 +43,14 @@ Or follow the MCP install [guide](https://docs.cursor.com/en/context/mcp#install
43
43
 
44
44
  #### Click the button to install:
45
45
 
46
- React Spectrum (S2):
47
-
48
- [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](vscode:mcp/install?%7B%22name%22%3A%22s2-docs%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40react-spectrum%2Fmcp%22%2C%22s2%22%5D%7D)
49
-
50
- React Aria:
51
-
52
- [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](vscode:mcp/install?%7B%22name%22%3A%22react-aria-docs%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40react-spectrum%2Fmcp%22%2C%22react-aria%22%5D%7D)
53
-
46
+ [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](vscode:mcp/install?%7B%22name%22%3A%22React%20Spectrum%20(S2)%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40react-spectrum%2Fmcp%40latest%22%5D%7D)
54
47
 
55
48
  #### Or install manually:
56
49
 
57
- Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) and use the standard config above. You can also add servers using the VS Code CLI:
50
+ Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) and use the standard config above. You can also add the server using the VS Code CLI:
58
51
 
59
52
  ```bash
60
- # For VS Code
61
- code --add-mcp '{"name":"s2-docs","command":"npx","args":["@react-spectrum/mcp","s2"]}'
62
- code --add-mcp '{"name":"react-aria-docs","command":"npx","args":["@react-spectrum/mcp","react-aria"]}'
53
+ code --add-mcp '{"name":"React Spectrum (S2)","command":"npx","args":["@react-spectrum/mcp@latest"]}'
63
54
  ```
64
55
 
65
56
  </details>
@@ -67,11 +58,10 @@ code --add-mcp '{"name":"react-aria-docs","command":"npx","args":["@react-spectr
67
58
  <details>
68
59
  <summary>Claude Code</summary>
69
60
 
70
- Use the Claude Code CLI to add the servers:
61
+ Use the Claude Code CLI to add the server:
71
62
 
72
63
  ```bash
73
- claude mcp add s2-docs npx @react-spectrum/mcp s2
74
- claude mcp add react-aria-docs npx @react-spectrum/mcp react-aria
64
+ claude mcp add react-spectrum-s2 npx @react-spectrum/mcp@latest
75
65
  ```
76
66
  For more information, see the [Claude Code MCP documentation](https://docs.claude.com/en/docs/claude-code/mcp).
77
67
  </details>
@@ -82,13 +72,9 @@ For more information, see the [Claude Code MCP documentation](https://docs.claud
82
72
  Create or edit the configuration file `~/.codex/config.toml` and add:
83
73
 
84
74
  ```toml
85
- [mcp_servers.s2-docs]
86
- command = "npx"
87
- args = ["@react-spectrum/mcp", "s2"]
88
-
89
- [mcp_servers.react-aria-docs]
75
+ [mcp_servers.react-spectrum-s2]
90
76
  command = "npx"
91
- args = ["@react-spectrum/mcp", "react-aria"]
77
+ args = ["@react-spectrum/mcp@latest"]
92
78
  ```
93
79
 
94
80
  For more information, see the [Codex MCP documentation](https://github.com/openai/codex/blob/main/docs/config.md#mcp_servers).
@@ -98,11 +84,10 @@ For more information, see the [Codex MCP documentation](https://github.com/opena
98
84
  <details>
99
85
  <summary>Gemini CLI</summary>
100
86
 
101
- Use the Gemini CLI to add the servers:
87
+ Use the Gemini CLI to add the server:
102
88
 
103
89
  ```bash
104
- gemini mcp add s2-docs npx @react-spectrum/mcp s2
105
- gemini mcp add react-aria-docs npx @react-spectrum/mcp react-aria
90
+ gemini mcp add react-spectrum-s2 npx @react-spectrum/mcp@latest
106
91
  ```
107
92
 
108
93
  For more information, see the [Gemini CLI MCP documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server).
@@ -120,8 +105,36 @@ Follow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/m
120
105
 
121
106
  | Tool | Input | Description |
122
107
  | --- | --- | --- |
123
- | `list_pages` | `{ includeDescription?: boolean }` | List available pages in the selected docs library. |
124
- | `get_page_info` | `{ page_name: string }` | Return page description and list of section titles. |
125
- | `get_page` | `{ page_name: string, section_name?: string }` | Return full page markdown, or only the specified section. |
126
- | `search_icons` (S2 only) | `{ terms: string or string[] }` | Search S2 workflow icon names. |
127
- | `search_illustrations` (S2 only) | `{ terms: string or string[] }` | Search S2 illustration names. |
108
+ | `list_s2_pages` | `{ includeDescription?: boolean }` | List available pages in the S2 docs. |
109
+ | `get_s2_page_info` | `{ page_name: string }` | Return page description and list of section titles. |
110
+ | `get_s2_page` | `{ page_name: string, section_name?: string }` | Return full page markdown, or only the specified section. |
111
+ | `search_s2_icons` | `{ terms: string \| string[] }` | Search S2 workflow icon names. |
112
+ | `search_s2_illustrations` | `{ terms: string \| string[] }` | Search S2 illustration names. |
113
+
114
+ ## Development
115
+
116
+ ### Testing locally
117
+
118
+ Build the docs and MCP server locally, then start the docs server.
119
+
120
+ ```bash
121
+ yarn workspace @react-spectrum/s2-docs generate:md
122
+ yarn workspace @react-spectrum/mcp build
123
+ yarn start:s2-docs
124
+ ```
125
+
126
+ Update your MCP client configuration to use the local MCP server:
127
+
128
+ ```json
129
+ {
130
+ "mcpServers": {
131
+ "React Spectrum (S2)": {
132
+ "command": "node",
133
+ "args": ["{your path here}/react-spectrum/packages/dev/mcp/s2/dist/s2/src/index.js"],
134
+ "env": {
135
+ "DOCS_CDN_BASE": "http://localhost:1234"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ ```
@@ -183,6 +183,7 @@
183
183
  "GroupNo",
184
184
  "Hand",
185
185
  "Heart",
186
+ "HeartFilled",
186
187
  "HelpCircle",
187
188
  "History",
188
189
  "Home",
@@ -219,6 +220,7 @@
219
220
  "Mask",
220
221
  "MaskDisable",
221
222
  "Maximize",
223
+ "MediaOffline",
222
224
  "Mention",
223
225
  "MenuHamburger",
224
226
  "Microphone",
@@ -323,6 +325,10 @@
323
325
  "SwitchVertical",
324
326
  "Table",
325
327
  "Tag",
328
+ "TagBold",
329
+ "TagItalic",
330
+ "TagStrikeThrough",
331
+ "TagUnderline",
326
332
  "Target",
327
333
  "Temperature",
328
334
  "Template",
@@ -390,6 +396,7 @@
390
396
  "VolumeOff",
391
397
  "VolumeOne",
392
398
  "VolumeTwo",
399
+ "Wallet",
393
400
  "WebNavBar",
394
401
  "WebPage",
395
402
  "ZoomIn",
@@ -127,6 +127,7 @@
127
127
  "NoFile",
128
128
  "NoFilter",
129
129
  "NoImage",
130
+ "NoInternetConnection",
130
131
  "NoLibraries",
131
132
  "NoLibrariesBrands",
132
133
  "NoReviewLinks",
@@ -161,6 +162,7 @@
161
162
  "Shapes",
162
163
  "ShoppingBag",
163
164
  "ShoppingCart",
165
+ "SocialPost",
164
166
  "Sparkles",
165
167
  "SpeedFast",
166
168
  "StampClone",