Skip to main content
Glama

WordPress MCP Server

A production-ready Model Context Protocol (MCP) server for WordPress integration. Enables AI agents to interact with WordPress websites through structured tools.

Features

  • 39 WordPress tools covering posts, pages, media, users, categories, tags, plugins, themes, menus, and WooCommerce

  • Secure authentication using WordPress Application Passwords

  • Destructive operation protection requiring explicit confirmation

  • Structured error handling with detailed error codes

  • Pagination support for list operations

  • Environment-based configuration for credentials

Related MCP server: WordPress MCP Server

Prerequisites

  • Node.js 18+

  • WordPress site with REST API enabled

  • WordPress Application Password for authentication

Installation

npm install
npm run build

Configuration

Create a .env file in the project root:

WORDPRESS_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=your-application-password

Generating Application Passwords

  1. Go to WordPress Admin → Users → Your Profile

  2. Scroll to "Application Passwords"

  3. Enter a name (e.g., "MCP Server")

  4. Click "Add New Application Password"

  5. Copy the generated password

Usage

Running the Server

# Development
npm run dev

# Production
npm start

Integration with MCP Clients

Add to your MCP client configuration:

{
  "mcp": {
    "wordpress": {
      "type": "local",
      "command": ["node", "/path/to/wordpress-mcp-server/dist/index.js"],
      "environment": {
        "WORDPRESS_URL": "https://your-site.com",
        "WORDPRESS_USERNAME": "your-username",
        "WORDPRESS_APP_PASSWORD": "your-app-password"
      }
    }
  }
}

Available Tools

Site Operations

Tool

Description

get_site_info

Get site name, description, URLs

get_site_settings

Get site configuration

get_site_health

Get health diagnostics

get_performance

Get performance metrics

search_site

Search content across site

Post Operations

Tool

Description

list_posts

List posts with filtering

get_post

Get single post by ID

create_post

Create new post

update_post

Update existing post

delete_post

Delete post (requires confirmation)

publish_post

Publish draft post

Page Operations

Tool

Description

list_pages

List pages with filtering

get_page

Get single page by ID

create_page

Create new page

update_page

Update existing page

delete_page

Delete page (requires confirmation)

Media Operations

Tool

Description

list_media

List media library items

upload_media

Upload media file

delete_media

Delete media (requires confirmation)

User Operations

Tool

Description

list_users

List users with filtering

get_user

Get single user by ID

create_user

Create new user

update_user

Update existing user

Taxonomy Operations

Tool

Description

list_categories

List categories

create_category

Create new category

list_tags

List tags

create_tag

Create new tag

Plugin Operations

Tool

Description

list_plugins

List installed plugins

activate_plugin

Activate plugin (requires confirmation)

deactivate_plugin

Deactivate plugin (requires confirmation)

Theme Operations

Tool

Description

list_themes

List installed themes

activate_theme

Activate theme (requires confirmation)

Menu Operations

Tool

Description

get_menus

Get navigation menus

update_menu

Update menu

WooCommerce Operations

Tool

Description

get_woocommerce_products

List products

create_woocommerce_product

Create product

update_woocommerce_product

Update product

get_woocommerce_orders

List orders

get_woocommerce_customer

List customers

Security

  • Credentials stored in environment variables (never exposed in output)

  • Destructive operations require explicit confirmation

  • Read-only operations execute automatically

  • Authentication for all protected resources

Development

# Run in development mode
npm run dev

# Build for production
npm run build

# Run tests
npm test

Project Structure

wordpress-mcp-server/
├── src/
│   ├── index.ts          # Entry point
│   ├── server.ts         # MCP server setup
│   ├── client/
│   │   └── wordpress.ts  # WordPress API client
│   ├── tools/
│   │   ├── index.ts      # Tool registration
│   │   ├── definitions.ts # Tool schemas
│   │   ├── site.ts       # Site tools
│   │   ├── posts.ts      # Post tools
│   │   ├── pages.ts      # Page tools
│   │   ├── media.ts      # Media tools
│   │   ├── users.ts      # User tools
│   │   ├── taxonomies.ts # Taxonomy tools
│   │   ├── plugins.ts    # Plugin tools
│   │   ├── themes.ts     # Theme tools
│   │   ├── menus.ts      # Menu tools
│   │   └── woocommerce.ts # WooCommerce tools
│   ├── validation/
│   │   └── schemas.ts    # Zod validation schemas
│   ├── types/
│   │   └── index.ts      # TypeScript type definitions
│   └── utils/
│       ├── config.ts     # Environment configuration
│       └── logger.ts     # Structured logging
├── package.json
├── tsconfig.json
└── .env.example

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Publish to self-hosted WordPress from AI agents: markdown, images, SEO, and Notion sync.

  • Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.

  • WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site

View all MCP Connectors

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/abdulsammad-lgtm/WordPress-MCP-'

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