Skip to main content
Glama

wp_get_plugins

Retrieve installed WordPress plugins with their status, version, and details to manage site functionality and troubleshoot issues.

Instructions

Get installed plugins from WordPress. Requires authentication.

Args: status: Filter by status - 'active', 'inactive', or 'all'. Default is 'all'. Returns: List of plugins with name, plugin slug, status, version, and description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoall

Implementation Reference

  • The MCP tool handler for wp_get_plugins. Decorated with @mcp.tool() for registration. Delegates to WordPressClient.get_plugins().
    @mcp.tool() def wp_get_plugins(status: str = "all") -> list[dict]: """Get installed plugins from WordPress. Requires authentication. Args: status: Filter by status - 'active', 'inactive', or 'all'. Default is 'all'. Returns: List of plugins with name, plugin slug, status, version, and description. """ client = get_client() return client.get_plugins(status=status)
  • Core implementation of plugin fetching in WordPressClient using WP REST API /plugins endpoint, formats response with name, plugin slug, status, version, description.
    def get_plugins(self, status: str = "all") -> list[dict]: """Get installed plugins (requires authentication).""" params = {} if status != "all": params["status"] = status plugins = self._get("plugins", params, require_auth=True) return [ { "name": p["name"], "plugin": p["plugin"], "status": p["status"], "version": p.get("version", "unknown"), "description": p.get("description", {}).get("raw", "")[:100], } for p in plugins ]
  • The @mcp.tool() decorator registers the wp_get_plugins function as an MCP tool.
    @mcp.tool()
  • Helper function to get or initialize the shared WordPressClient instance used by all tools.
    def get_client() -> WordPressClient: """Get or create the WordPress client.""" global _client if _client is None: config = load_config() _client = WordPressClient(config) return _client
  • Generic _get method used by get_plugins to query the /plugins endpoint.
    def _get( self, endpoint: str, params: dict | None = None, require_auth: bool = False ) -> Any: """Make a GET request to the WordPress API.""" url = f"{self.config.api_base}/{endpoint}" headers = self._get_headers(require_auth) response = self._client.get(url, headers=headers, params=params) response.raise_for_status() return response.json()

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/gaupoit/wordpress-mcp'

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