@qwik.dev/mcp 2.0.0-rc.0 → 2.0.0-rc.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 +52 -4
- package/dist/cli.js +1 -1
- package/dist/docs.json +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -23,20 +23,68 @@ export default defineConfig({
|
|
|
23
23
|
|
|
24
24
|
For a browser-only Qwik app, omit `qwikRouter()` and keep your existing `qwikVite({ csr: true })` configuration. Start Vite and open the app in a local browser.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
## MCP client configuration
|
|
27
|
+
|
|
28
|
+
The examples below run the installed package directly with Node.js 22.18 or later. They use the same package version as your Vite plugin, require no download at startup, and work even when the client starts the process outside your project directory.
|
|
29
|
+
|
|
30
|
+
Replace `/absolute/path/to/project` with the directory containing your app's `vite.config.ts` and `node_modules`. The first argument points to the installed CLI; the second selects the Qwik project. Passing only the project path to `npx --no-install` does not change where npm looks for the local package.
|
|
31
|
+
|
|
32
|
+
### Codex
|
|
33
|
+
|
|
34
|
+
Add this to `.codex/config.toml` in your project:
|
|
35
|
+
|
|
36
|
+
```toml
|
|
37
|
+
[mcp_servers.qwik]
|
|
38
|
+
command = "node"
|
|
39
|
+
args = ["/absolute/path/to/project/node_modules/@qwik.dev/mcp/dist/cli.js", "/absolute/path/to/project"]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Codex loads project configuration for trusted projects. You can also add the entry to `~/.codex/config.toml` for a personal configuration. Restart your Codex session after editing the file; in the CLI, use `/mcp` to check the connection. See the [Codex MCP documentation](https://developers.openai.com/codex/mcp).
|
|
43
|
+
|
|
44
|
+
### Claude Code
|
|
45
|
+
|
|
46
|
+
Create `.mcp.json` in your project root:
|
|
27
47
|
|
|
28
48
|
```json
|
|
29
49
|
{
|
|
30
50
|
"mcpServers": {
|
|
31
51
|
"qwik": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
52
|
+
"type": "stdio",
|
|
53
|
+
"command": "node",
|
|
54
|
+
"args": [
|
|
55
|
+
"/absolute/path/to/project/node_modules/@qwik.dev/mcp/dist/cli.js",
|
|
56
|
+
"/absolute/path/to/project"
|
|
57
|
+
]
|
|
34
58
|
}
|
|
35
59
|
}
|
|
36
60
|
}
|
|
37
61
|
```
|
|
38
62
|
|
|
39
|
-
|
|
63
|
+
Start Claude Code in the project, approve the project MCP server when prompted, and use `/mcp` to check its status. See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp).
|
|
64
|
+
|
|
65
|
+
### GitHub Copilot in VS Code
|
|
66
|
+
|
|
67
|
+
Create or update `.vscode/mcp.json`:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"servers": {
|
|
72
|
+
"qwik": {
|
|
73
|
+
"type": "stdio",
|
|
74
|
+
"command": "node",
|
|
75
|
+
"args": ["${workspaceFolder}/node_modules/@qwik.dev/mcp/dist/cli.js", "${workspaceFolder}"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
VS Code replaces `${workspaceFolder}` with the project directory. This format uses `servers`, whereas Claude Code uses `mcpServers`. Run **MCP: List Servers** from the Command Palette, select `qwik`, and start it. In Copilot Chat, select **Agent** mode and enable the Qwik tools in the tools picker. See the [VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers).
|
|
82
|
+
|
|
83
|
+
### Check the connection
|
|
84
|
+
|
|
85
|
+
Ask your agent to call `get_project_info` and confirm that `root` is your app directory. `devServerRunning: false` means the CLI connected but Vite is not running with `qwikMcp()`. Start Vite and open the app in a browser to use the live inspection tools.
|
|
86
|
+
|
|
87
|
+
If the client cannot find `node`, set `command` to the absolute path of your Node.js executable. If it cannot find `cli.js`, check that `@qwik.dev/mcp` is installed in the selected project. On Windows, use forward slashes in paths, such as `C:/projects/my-app`, or escape each backslash as `\\` in JSON and TOML strings.
|
|
40
88
|
|
|
41
89
|
## Tools
|
|
42
90
|
|