IDE Configuration
Complete setup guides for using the WooCommerce MCP Server with Visual Studio Code and PhpStorm.
Environment Variables Reference
Both IDEs require the same set of environment variables. Configure these in your MCP server definition:
| Variable | Required | Description |
|---|---|---|
WORDPRESS_SITE_URL | Yes | Full URL of your WordPress site (e.g., https://your-site.com) |
WOOCOMMERCE_CONSUMER_KEY | Yes | WooCommerce REST API consumer key (ck_xxx) |
WOOCOMMERCE_CONSUMER_SECRET | Yes | WooCommerce REST API consumer secret (cs_xxx) |
WORDPRESS_USERNAME | No | WordPress username for post/meta tools |
WORDPRESS_PASSWORD | No | WordPress Application Password for post/meta tools |
ALLOW_SELF_SIGNED_CERTS | No | Set to true for local dev with self-signed SSL |
Visual Studio Code
VS Code supports MCP servers natively through its GitHub Copilot integration. The server runs in stdio mode — VS Code spawns it as a child process and communicates via stdin/stdout.
Configuration Methods
There are two ways to configure the MCP server in VS Code:
Method 1: User-Level Configuration (Global)
This makes the WooCommerce MCP server available across all your projects.
Create or edit the file at ~/.vscode/mcp.json (or use Settings → Features → Chat → MCP):
{
"servers": {
"woocommerce": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_your_consumer_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_your_consumer_secret",
"WORDPRESS_USERNAME": "developer",
"WORDPRESS_PASSWORD": "your-app-password",
"ALLOW_SELF_SIGNED_CERTS": "true"
}
}
}
}
Method 2: Workspace-Level Configuration (Per-Project)
This scopes the MCP server to a specific workspace. Create .vscode/mcp.json in your project root:
{
"servers": {
"woocommerce": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_your_consumer_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_your_consumer_secret",
"WORDPRESS_USERNAME": "developer",
"WORDPRESS_PASSWORD": "your-app-password",
"ALLOW_SELF_SIGNED_CERTS": "true"
}
}
}
}
VS Code Configuration via Settings UI
- Open Settings (Ctrl+Comma)
- Search for "MCP"
- Navigate to Features → Chat → MCP
- Click "Edit in settings.json" or "Add Server"
- Enter the server configuration as shown above
Verifying the Connection
- Open the GitHub Copilot Chat panel (Ctrl+Shift+I)
- Switch to Agent mode (click the mode selector at the top of the chat panel)
- You should see "woocommerce" listed as an available MCP server in the tools dropdown
- Test by asking: "List the 5 most recent WooCommerce orders"
Multiple Store Configuration
To connect to multiple WooCommerce stores, add separate server entries with unique names:
{
"servers": {
"woocommerce-production": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://production-store.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_production_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_production_secret"
}
},
"woocommerce-staging": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://staging-store.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_staging_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_staging_secret",
"ALLOW_SELF_SIGNED_CERTS": "true"
}
}
}
}
PhpStorm (JetBrains IDEs)
PhpStorm and other JetBrains IDEs (WebStorm, IntelliJ IDEA) support MCP servers through their AI Assistant integration. The server runs in stdio mode, identical to VS Code.
Configuration Methods
Method 1: Settings UI (Recommended)
- Open Settings (Ctrl+Alt+S)
- Navigate to Languages & Frameworks → AI Assistant → MCP Servers
- Click the + button to add a new server
- Fill in the configuration:
- Name:
woocommerce - Command:
node - Arguments:
C:/path/to/woocommerce-mcp-server/build/index.js
- Name:
- Add environment variables by clicking Environment Variables and entering each key-value pair:
WORDPRESS_SITE_URL=https://your-site.comWOOCOMMERCE_CONSUMER_KEY=ck_your_consumer_keyWOOCOMMERCE_CONSUMER_SECRET=cs_your_consumer_secretWORDPRESS_USERNAME=developerWORDPRESS_PASSWORD=your-app-passwordALLOW_SELF_SIGNED_CERTS=true
- Click OK to save
Method 2: Project-Level Configuration File
Create .github/copilot/mcp.json in your project root:
{
"servers": {
"woocommerce": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_your_consumer_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_your_consumer_secret",
"WORDPRESS_USERNAME": "developer",
"WORDPRESS_PASSWORD": "your-app-password",
"ALLOW_SELF_SIGNED_CERTS": "true"
}
}
}
}
PhpStorm automatically detects this file and registers the MCP server.
Verifying the Connection
- Open the AI Assistant panel (Alt+Enter or via the sidebar)
- The WooCommerce MCP server should appear in the available tools list
- Test by asking: "Get the system status of the WooCommerce store"
- Check Settings → AI Assistant → MCP Servers — the server status should show as "Connected"
Multiple Store Configuration
Same as VS Code — add multiple entries with unique names in the servers object:
{
"servers": {
"woocommerce-production": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://production-store.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_production_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_production_secret"
}
},
"woocommerce-staging": {
"command": "node",
"args": ["C:/path/to/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://staging-store.com",
"WOOCOMMERCE_CONSUMER_KEY": "ck_staging_key",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_staging_secret",
"ALLOW_SELF_SIGNED_CERTS": "true"
}
}
}
}
Common Configuration Tips
Path Format
Use forward slashes or escaped backslashes in file paths:
// Windows — either format works
"args": ["C:/Repos/woocommerce-mcp-server/build/index.js"]
"args": ["C:\\Repos\\woocommerce-mcp-server\\build\\index.js"]
// macOS / Linux
"args": ["/home/user/woocommerce-mcp-server/build/index.js"]
Security Best Practices
- Never commit credentials to version control — add
mcp.jsonto.gitignoreif it contains secrets - Use workspace-level configuration for project-specific stores
- Use user-level configuration for personal development stores
- Rotate API keys periodically and revoke unused keys in WooCommerce settings
- For shared team configurations, use environment variable references instead of hardcoded values
Updating the Server
When the MCP server code is updated:
cd /path/to/woocommerce-mcp-server
git pull
npm install
npm run build
Then restart your IDE or reload the MCP server connection. In VS Code, use the Command Palette (Ctrl+Shift+P) and search for "MCP: Restart Server".
Troubleshooting
Server Not Appearing in IDE
- Verify the path in
argspoints to the correctbuild/index.jsfile - Ensure the project has been built (
npm run build) - Check that Node.js 20+ is available in your system PATH
- Restart the IDE after adding the configuration
Connection Timeouts
- Verify
WORDPRESS_SITE_URLis accessible from your machine - For local sites, ensure the development server is running
- Check for firewall rules blocking outbound HTTPS connections
"Unauthorized" Errors
- Regenerate WooCommerce API keys and update the configuration
- Verify keys have Read/Write permissions
- For WordPress operations, ensure the Application Password is valid and the user has appropriate roles
Self-Signed Certificate Errors
- Set
ALLOW_SELF_SIGNED_CERTStotruein your environment variables - This is required for Laravel Herd, Valet, Local by Flywheel, and similar local development tools
Next Steps
- Architecture — Understand the server internals and security model
- Tools Reference — Browse all 159+ available MCP tools by category