MCP server for Ward - exposes Next.js observability to AI tools
npm install @useward/mcpModel Context Protocol (MCP) server for Ward. Exposes Next.js observability data to AI coding assistants like Claude.
``bash`
npm install -g @useward/mcp
Add to your MCP configuration:
`json`
{
"mcpServers": {
"ward": {
"command": "npx",
"args": ["@useward/mcp"]
}
}
}
`bash`
npx @useward/mcp
The MCP server connects to Ward devtools. Make sure devtools is running:
`bash`
npx @useward/devtools
| Tool | Description |
|------|-------------|
| list_projects | List all monitored Next.js projects |get_sessions
| | Get recent page sessions with performance metrics |get_session_details
| | Get detailed resource waterfall for a session |diagnose_performance
| | Analyze performance bottlenecks and get suggestions |get_errors
| | Retrieve errors from recent sessions |find_slow_requests
| | Find HTTP/DB requests above a threshold |
Once connected, ask Claude:
- "What's slow in my app?"
- "Show me the waterfall for the last page load"
- "Are there any N+1 queries?"
- "What performance issues should I fix?"
| Variable | Default | Description |
|----------|---------|-------------|
| WARD_DEVTOOLS_URL | http://localhost:19393` | Devtools server URL |
1. Ward SDK instruments your Next.js app
2. Devtools server collects telemetry
3. MCP server connects to devtools via SSE
4. AI assistants query performance data through MCP tools