Skip to content

Commit 4cafe9b

Browse files
committed
docs: next integration
1 parent 523bb6a commit 4cafe9b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,36 @@ startup_timeout_ms = 20_000
113113

114114
</details>
115115

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+
const nextConfig = {
125+
experimental: {
126+
mcpServer: true,
127+
},
128+
};
129+
130+
export default nextConfig;
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+
116146
### Your First Prompt
117147

118148
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
123153

124154
Your MCP client should provide guidance and tools for upgrading your Next.js application.
125155

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+
126164
## Resources
127165

128166
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

Comments
 (0)