Skip to main content
Glama

wp_get_auth_status

Check if your WordPress site is properly authenticated to manage content, users, and settings through the MCP WordPress Server.

Instructions

Gets the current authentication status for a configured WordPress site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.

Implementation Reference

  • Executes the wp_get_auth_status tool: checks if the WordPress client is authenticated, fetches current user if yes, formats a status message with site URL, method, auth status, and user info.
    public async handleGetAuthStatus( client: WordPressClient, params: Record<string, unknown>, ): Promise<Record<string, unknown>> { try { const isAuthenticated = client.isAuthenticated; const config = client.config; let content = `**Authentication Status for ${config.baseUrl}**\n\n` + `**Authenticated:** ${isAuthenticated ? "✅ Yes" : "❌ No"}\n` + `**Method:** ${config.auth.method}\n`; if (isAuthenticated) { const user = await client.getCurrentUser(); content += `**User:** ${user.name} (@${user.slug})\n`; } else { content += "**Status:** Not connected. Use 'wp_test_auth' to connect and verify credentials."; } return { content }; } catch (_error) { throw new Error(`Failed to get auth status: ${getErrorMessage(_error)}`); } }
  • Registers the wp_get_auth_status tool within AuthTools.getTools(), defining its name, description, empty parameters schema, and binding to the handleGetAuthStatus handler.
    { name: "wp_get_auth_status", description: "Gets the current authentication status for a configured WordPress site.", parameters: [], handler: this.handleGetAuthStatus.bind(this), },

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

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