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: README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,36 @@ startup_timeout_ms = 20_000
113
113
114
114
</details>
115
115
116
+
### Next.js Runtime Integration (Recommended for Next.js >= 16 beta)
117
+
118
+
For Next.js 16 beta or later, enable the MCP server in your Next.js application to unlock powerful runtime diagnostics and integration with Claude Code:
119
+
120
+
**Update `next.config.ts` or `next.config.js`:**
121
+
122
+
```js
123
+
/**@type{import('next').NextConfig}*/
124
+
constnextConfig= {
125
+
experimental: {
126
+
mcpServer:true,
127
+
},
128
+
};
129
+
130
+
exportdefaultnextConfig;
131
+
```
132
+
133
+
**Restart your Next.js dev server:**
134
+
135
+
```bash
136
+
npm run dev
137
+
```
138
+
139
+
**Benefits with Claude Code:**
140
+
141
+
-**Real-time diagnostics**: Claude Code can query your running Next.js server for errors, routes, and build status
142
+
-**Intelligent error detection**: Automatically identify issues in your application
143
+
-**Runtime context**: Get accurate information about your app's current state without static analysis
144
+
-**Better recommendations**: AI coding agents make informed decisions based on actual runtime behavior
145
+
116
146
### Your First Prompt
117
147
118
148
Enter the following prompt in your MCP client to check if everything is working:
@@ -123,6 +153,14 @@ Help me upgrade my Next.js app to version 16
123
153
124
154
Your MCP client should provide guidance and tools for upgrading your Next.js application.
125
155
156
+
If you're on **Next.js 16 beta or later** with `experimental.mcpServer` enabled, you can also try:
157
+
158
+
```
159
+
What's the structure of my Next.js routes?
160
+
```
161
+
162
+
Claude Code will query your running dev server for actual route information and component diagnostics.
163
+
126
164
## Resources
127
165
128
166
Next.js 16 knowledge base resources are automatically available to your AI assistant. These resources provide comprehensive documentation split into focused sections for efficient context management:
0 commit comments