Installation

Set up the WPZylos MCP server and connect it to your AI editor.

Prerequisites

RequirementVersionNotes
Node.js18+LTS recommended. Check with node --version
npm9+Comes with Node.js. Check with npm --version
WPZylos sourcelatestThe 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:

VariableRequiredDescription
WPZYLOS_ROOTYesAbsolute 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.json files
  • 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:

  1. Check tool listing -- Open the AI chat in your editor and ask:

    "List available MCP tools"


    You should see 79 tools from the wpzylos server.
  2. 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.
  3. 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