Skip to main content
Glama

wp-cli-mcp


¿Qué puede hacer Claude con esto?

"Install WooCommerce and activate it"
"Create a new page called About Us with this content..."
"List all plugins and deactivate the ones I'm not using"
"Scaffold a new child theme called my-theme"
"Create a navigation menu with Home, About, Contact links"
"Search and replace old domain with new domain in database"
"Export the database before I make changes"
"Generate a custom Gutenberg block for testimonials"

Todo impulsado por WP-CLI bajo el capó. Funciona localmente o a través de SSH en servidores remotos.

Herramientas (más de 30)

Categoría

Herramientas

Núcleo

wp_core_version, wp_core_check_update

Plugins

wp_plugin_list, wp_plugin_install, wp_plugin_activate, wp_plugin_deactivate, wp_plugin_delete, wp_plugin_search

Temas

wp_theme_list, wp_theme_install, wp_theme_activate, wp_theme_delete

Entradas

wp_post_list, wp_post_get, wp_post_create, wp_post_update, wp_post_delete

Usuarios

wp_user_list, wp_user_create

Opciones

wp_option_get, wp_option_update

Menús

wp_menu_list, wp_menu_create, wp_menu_item_add, wp_menu_location_assign

Medios

wp_media_import

Base de datos

wp_db_query, wp_db_export, wp_search_replace

Andamiaje

wp_scaffold_theme, wp_scaffold_plugin, wp_scaffold_block

Caché

wp_rewrite_flush, wp_cache_flush

Crudo

wp_cli_raw — ejecuta cualquier comando de WP-CLI

Requisitos

  • WP-CLI instalado y en el PATH

  • Instalación de WordPress (local o accesible vía SSH)

  • Node.js 18+

Configuración

Instalación

npm install -g wp-cli-mcp

Configurar con Claude Code

Añadir a la configuración de MCP de Claude Code (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wordpress": {
      "command": "wp-cli-mcp",
      "env": {
        "WP_PATH": "/path/to/your/wordpress"
      }
    }
  }
}

Servidor remoto vía SSH

{
  "mcpServers": {
    "wordpress": {
      "command": "wp-cli-mcp",
      "env": {
        "WP_SSH": "user@yourserver.com:/var/www/html"
      }
    }
  }
}

Variables de entorno

Variable

Descripción

Ejemplo

WP_PATH

Ruta local de WordPress

/var/www/html

WP_SSH

Cadena de conexión SSH

user@host:/path/to/wp

WP_URL

URL del sitio (multisitio)

https://example.com

Ejemplos

Flujo de trabajo de desarrollo de temas

You: "Scaffold a child theme based on twentytwentyfour"
Claude: Uses wp_scaffold_theme → creates child theme files

You: "Install and activate it"
Claude: Uses wp_theme_activate → theme is live

You: "Create the homepage with a hero section and 3 feature cards"
Claude: Uses wp_post_create → creates page with HTML content

Gestión de plugins

You: "What plugins do I have installed?"
Claude: Uses wp_plugin_list → shows all plugins with status

You: "Install Contact Form 7 and WooCommerce"
Claude: Uses wp_plugin_install twice → both installed and activated

Operaciones de base de datos

You: "I'm migrating from staging.example.com to example.com"
Claude: Uses wp_db_export → backup first
       Uses wp_search_replace (dry_run) → preview changes
       Uses wp_search_replace → apply changes
       Uses wp_cache_flush → clear cache

Combina bien con

Utiliza los tres juntos para un desarrollo completo de WordPress impulsado por IA.

Licencia

MIT — Mustafa Vatandas

Install Server
A
security – no known vulnerabilities
A
license - permissive license
B
quality - B tier

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mvtandas/wp-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server