You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

wpmcp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wpmcp

MCP server for WordPress with 49+ tools for complete site management through AI

Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
19
26.67%
Maintainers
1
Weekly downloads
 
Created
Source

WordPress MCP Server

A Model Context Protocol server that provides 49+ tools for complete WordPress site management through AI.

GitHub License: MIT TypeScript

What This Does

This MCP server enables AI agents (Claude, LangGraph, etc.) to manage WordPress sites through natural language. It connects to WordPress via REST API and provides specialized tools for posts, pages, media, users, categories, comments, and site settings.

Features

  • 49+ WordPress Tools - Complete CRUD operations for all WordPress content types
  • Type Safe - Full TypeScript implementation
  • Production Ready - Proper error handling and validation
  • Well Organized - Clean file structure for easy maintenance

Available Tools

CategoryCountTools
Posts15create, update, delete, get, search, schedule, publish, duplicate, revisions, bulk operations
Pages4create, update, delete, get with hierarchy
Media5upload, get, update, delete, featured images
Users4create, get, update, delete
Categories4create, get, update, delete
Tags2create, get
Comments4create, get, update, delete
Settings4get site info, test connection, get/update settings
Plugins/Themes2get installed plugins and themes
SEO2set SEO meta (Yoast, Rank Math, AIOSEO), custom meta

Installation

# Clone repository
git clone https://github.com/RaheesAhmed/wordpress-mcp-server.git
cd wordpress-mcp-server

# Install dependencies
npm install

# Configure WordPress credentials
cp .env.example .env
# Edit .env with your WordPress URL, username, and password

# Build
npm run build

# Run
npm start

Configuration

Environment Variables

WORDPRESS_URL=https://yourblog.com
WORDPRESS_USERNAME=admin
WORDPRESS_PASSWORD=your-app-password

WordPress Authentication

Self-Hosted WordPress:

WordPress.com:

  • Requires Business plan or higher
  • Generate Application Password: Settings → Security → Application Passwords

MCP Client Setup

Add to your MCP client configuration (e.g., Claude Desktop, Cline):

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["/path/to/wordpress-mcp-server/dist/index.js"],
      "env": {
        "WORDPRESS_URL": "https://yourblog.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "your-password"
      }
    }
  }
}

Usage

Once configured, ask your AI:

"Create a blog post about AI with 1000 words and publish it"
"Get all draft posts"
"Upload an image and set it as featured image for post 123"
"List all WordPress users"
"Get all installed plugins"

API Examples

Create Post

{
  "title": "My Post Title",
  "content": "<p>Post content</p>",
  "status": "publish",
  "categories": [1],
  "tags": [2, 3]
}

Upload Media

{
  "fileBase64": "base64-encoded-file-content",
  "filename": "image.jpg",
  "altText": "Image description"
}

Create User

{
  "username": "johndoe",
  "email": "john@example.com",
  "password": "SecurePass123",
  "roles": ["author"]
}

Project Structure

src/
├── index.ts              # Server entry point
├── config/               # Configuration
├── types/                # TypeScript definitions
├── utils/                # API wrapper and helpers
└── tools/                # WordPress tool implementations
    ├── posts.ts          # 15 post tools
    ├── pages.ts          # 4 page tools
    ├── media.ts          # 5 media tools
    └── all-features.ts   # Additional tools

Development

# Run in development mode
npm run dev

# Run tests
npm test

# Lint
npm run lint

Contributing

  • Fork the repository
  • Create your feature branch (git checkout -b feature/amazing)
  • Commit your changes (git commit -m 'Add feature')
  • Push to branch (git push origin feature/amazing)
  • Open a Pull Request

License

MIT License - see LICENSE

Built for AI-powered WordPress automation

Keywords

mcp

FAQs

Package last updated on 22 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts