Installation
Set up the WPZylos MCP server and connect it to your AI editor.
Prerequisites
| Requirement | Version | Notes |
|---|---|---|
| Node.js | 18+ | LTS recommended. Check with node --version |
| npm | 9+ | Comes with Node.js. Check with npm --version |
| WPZylos source | latest | The framework monorepo must be cloned locally |
The MCP server reads the framework source code at runtime, so the WPZylos monorepo must be accessible on disk.
Build
Clone or navigate to the wpzylos-mcp package inside the monorepo:
cd wpzylos/wpzylos-mcp
npm install
npm run build
This compiles TypeScript to dist/index.js -- the entry point for the MCP server.
To verify the build succeeded:
ls dist/index.js
Development Mode
For active development on the MCP server itself:
npm run dev
This watches for file changes and rebuilds automatically.
Environment
The server requires one environment variable:
| Variable | Required | Description |
|---|---|---|
WPZYLOS_ROOT | Yes | Absolute path to the WPZylos framework monorepo root |
Example:
# Linux / macOS
export WPZYLOS_ROOT=/home/dev/projects/wpzylos
# Windows (PowerShell)
$env:WPZYLOS_ROOT = "D:\laragon\www\wpzylos"
The server uses this path to:
- Discover all framework packages via
composer.jsonfiles - Parse PHP source files for class extraction
- Locate stub templates for code generation
- Index documentation for resource queries
IDE Configuration
Cursor
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"wpzylos": {
"command": "node",
"args": ["path/to/wpzylos-mcp/dist/index.js"],
"env": {
"WPZYLOS_ROOT": "D:/path/to/wpzylos"
}
}
}
}
Restart Cursor after adding the config. The MCP tools should appear in the tool list.
VS Code (Copilot)
Add to your VS Code settings.json or workspace settings:
{
"mcp": {
"servers": {
"wpzylos": {
"command": "node",
"args": ["path/to/wpzylos-mcp/dist/index.js"],
"env": {
"WPZYLOS_ROOT": "D:/path/to/wpzylos"
}
}
}
}
}
Claude Desktop
Edit claude_desktop_config.json (found in Claude Desktop settings):
{
"mcpServers": {
"wpzylos": {
"command": "node",
"args": ["path/to/wpzylos-mcp/dist/index.js"],
"env": {
"WPZYLOS_ROOT": "D:/path/to/wpzylos"
}
}
}
}
Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"wpzylos": {
"command": "node",
"args": ["path/to/wpzylos-mcp/dist/index.js"],
"env": {
"WPZYLOS_ROOT": "D:/path/to/wpzylos"
}
}
}
}
Verification
After configuring your IDE, verify the server is working:
- Check tool listing -- Open the AI chat in your editor and ask:
"List available MCP tools"
You should see 79 tools from thewpzylosserver. - Test a simple call -- Ask the AI:
"Use the inspect_package tool to show me wpzylos-core"
The AI should return package metadata including namespace, dependencies, and description. - Test code generation -- Ask the AI:
"Generate a provider class called CacheProvider"
The AI should produce a PHP class that extends the framework's base provider with correct namespace and method signatures.
If tools do not appear, see Troubleshooting.
Next Steps
- Overview -- Understand the architecture
- Usage -- Learn workflows and patterns
- Troubleshooting -- Fix common issues