You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/i18n/en/docusaurus-plugin-content-docs/current/extensions/mcp.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,17 @@ $ npm i @midwayjs/mcp@4 --save
37
37
$ npm i @modelcontextprotocol/sdk zod --save
38
38
```
39
39
40
+
:::warning
41
+
Important Zod compatibility notice
42
+
43
+
The MCP SDK (`@modelcontextprotocol/sdk`) currently uses Zod v3.x. To ensure compatibility, your project must use Zod 3.x. Do not use Zod v4.x or higher, otherwise type compatibility issues may occur.
44
+
45
+
Recommended specific version:
46
+
```bash
47
+
$ npm i zod@^3.24.1 --save
48
+
```
49
+
:::
50
+
40
51
If you use the `sse` or `stream-http` transport, you also need to install one of the HTTP framework components (choose one):
41
52
42
53
```bash
@@ -57,7 +68,7 @@ Or add the following dependencies to `package.json` and reinstall.
57
68
"dependencies": {
58
69
"@midwayjs/mcp": "^4.0.0",
59
70
"@modelcontextprotocol/sdk": "^1.19.0",
60
-
"zod": "^3.24.0",
71
+
"zod": "^3.24.1",
61
72
"@midwayjs/express": "^4.0.0"
62
73
}
63
74
}
@@ -192,6 +203,21 @@ Assuming the server runs at `http://localhost:3000`, the default endpoints are:
192
203
Backward compatibility: When the server is configured with the `stream-http` transport, legacy SSE clients can still connect and communicate via the `/sse` endpoint.
193
204
:::
194
205
206
+
### Logging configuration
207
+
208
+
The MCP component outputs logs by default. You can further configure logging details via `mcpLogger`.
0 commit comments