npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cavort-it-systems/wordpress-mcp

v1.0.0

Published

Lightweight WordPress MCP server - token-optimized REST API access

Downloads

88

Readme

wordpress-mcp

npm version License: MIT MCP SDK

Lightweight WordPress MCP server for site management. 42 tools with token-optimized responses — REST API responses automatically slimmed from kilobytes to essentials.

Why This Server?

WordPress REST API returns extremely verbose JSON (~5-10KB per post). This server strips it down:

| Response | Before | After | Reduction | |----------|--------|-------|-----------| | wp_list_posts (10 posts) | ~50KB | ~2KB | 96% | | wp_get_post | ~5KB | ~200 bytes | 96% | | wp_list_plugins | ~15KB | ~800 bytes | 95% |

Less tokens = faster responses, lower costs, more context for your AI.

Installation

npm install -g @cavort-it-systems/wordpress-mcp

Or run directly:

npx @cavort-it-systems/wordpress-mcp

Configuration

Claude Code CLI

claude mcp add wordpress \
  -e WORDPRESS_SITE_URL=https://example.com \
  -e WORDPRESS_USERNAME=admin \
  -e WORDPRESS_PASSWORD="xxxx xxxx xxxx xxxx" \
  -- npx @cavort-it-systems/wordpress-mcp

Claude Desktop / Manual

Add to your MCP config (~/.claude.json or Claude Desktop settings):

{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["@cavort-it-systems/wordpress-mcp"],
      "env": {
        "WORDPRESS_SITE_URL": "https://example.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "xxxx xxxx xxxx xxxx"
      }
    }
  }
}

From Source

git clone https://github.com/cvrt-jh/wordpress-mcp.git
cd wordpress-mcp
npm install && npm run build

Authentication

Uses Application Passwords (WordPress 5.6+):

  1. Go to Users → Profile in WordPress admin
  2. Scroll to Application Passwords
  3. Create new password for "Claude MCP"
  4. Use the generated password (keep the spaces)

Response Slimming

All responses are automatically trimmed. Example:

wp_get_post — from ~5KB to ~200 bytes:

// Before (WordPress REST API raw)
{"id":123,"date":"2026-01-15T10:30:00","date_gmt":"2026-01-15T09:30:00",
"guid":{"rendered":"https://example.com/?p=123"},"modified":"2026-01-20T14:00:00",
"modified_gmt":"2026-01-20T13:00:00","slug":"my-post","status":"publish",
"type":"post","link":"https://example.com/my-post/","title":{"rendered":"My Post"},
"content":{"rendered":"<p>Full content...</p>","protected":false},
"excerpt":{"rendered":"<p>Excerpt...</p>","protected":false},
"author":1,"featured_media":456,"comment_status":"open","ping_status":"open",
"sticky":false,"template":"","format":"standard","meta":{"footnotes":""},
"categories":[1,5],"tags":[10,20],"class_list":["post-123","type-post",...],
"_links":{"self":[...],"collection":[...],"about":[...],...}}

// After (slimmed)
{"id":123,"title":"My Post","slug":"my-post","status":"publish",
"date":"2026-01-15T10:30:00","modified":"2026-01-20T14:00:00",
"link":"https://example.com/my-post/","excerpt":"Excerpt...",
"author":1,"categories":[1,5],"tags":[10,20],"featured_media":456}

What gets stripped:

| Field | Where | Why | |-------|-------|-----| | guid, _links | everywhere | Internal WordPress data | | content.rendered | lists | Only included when explicitly requested | | meta, class_list | posts/pages | Theme/plugin metadata | | ping_status, comment_status | posts | Rarely needed | | template, format, sticky | posts | Theme-specific | | HTML tags | excerpts | Clean text output | | Pretty-print JSON | all | Compact single-line output |

Tools (42)

Site (4)

  • wp_site_info - Get site name, description, URL
  • wp_get_settings - Get site settings
  • wp_update_settings - Update site settings
  • wp_get_namespaces - List REST API namespaces

Posts (6)

  • wp_list_posts - List posts with filters
  • wp_get_post - Get single post
  • wp_create_post - Create post
  • wp_update_post - Update post
  • wp_delete_post - Delete post
  • wp_search_posts - Search posts

Pages (5)

  • wp_list_pages - List pages
  • wp_get_page - Get single page
  • wp_create_page - Create page
  • wp_update_page - Update page
  • wp_delete_page - Delete page

Users (6)

  • wp_list_users - List users
  • wp_me - Get current user
  • wp_get_user - Get user by ID
  • wp_create_user - Create user
  • wp_update_user - Update user
  • wp_delete_user - Delete user

Plugins (5)

  • wp_list_plugins - List plugins
  • wp_get_plugin - Get plugin details
  • wp_activate_plugin - Activate plugin
  • wp_deactivate_plugin - Deactivate plugin
  • wp_delete_plugin - Delete plugin

Themes (4)

  • wp_list_themes - List themes
  • wp_get_active_theme - Get active theme
  • wp_get_theme - Get theme details
  • wp_activate_theme - Switch themes

Media (4)

  • wp_list_media - List media library
  • wp_get_media - Get media item
  • wp_update_media - Update media metadata
  • wp_delete_media - Delete media

Categories & Tags (8)

  • wp_list_categories - List categories
  • wp_create_category - Create category
  • wp_update_category - Update category
  • wp_delete_category - Delete category
  • wp_list_tags - List tags
  • wp_create_tag - Create tag
  • wp_update_tag - Update tag
  • wp_delete_tag - Delete tag

Comments (6)

  • wp_list_comments - List comments
  • wp_get_comment - Get comment
  • wp_create_comment - Create comment
  • wp_update_comment - Update/moderate comment
  • wp_delete_comment - Delete comment
  • wp_moderate_comments - Batch moderate

Architecture

src/
  index.ts          # Entry: McpServer + StdioServerTransport
  client.ts         # WordPress REST API client (Basic Auth)
  types.ts          # Shared Zod schemas + jsonResult helper
  slim.ts           # Response slimming transformers
  tools/
    site.ts         # 4 tools
    posts.ts        # 6 tools
    pages.ts        # 5 tools
    users.ts        # 6 tools
    plugins.ts      # 5 tools
    themes.ts       # 4 tools
    media.ts        # 4 tools
    taxonomies.ts   # 8 tools (categories + tags)
    comments.ts     # 6 tools

Multi-Site Support

For managing multiple WordPress sites, run separate MCP instances:

{
  "mcpServers": {
    "wordpress-site1": {
      "command": "npx",
      "args": ["@cavort-it-systems/wordpress-mcp"],
      "env": {
        "WORDPRESS_SITE_URL": "https://site1.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "xxxx xxxx xxxx xxxx"
      }
    },
    "wordpress-site2": {
      "command": "npx",
      "args": ["@cavort-it-systems/wordpress-mcp"],
      "env": {
        "WORDPRESS_SITE_URL": "https://site2.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "yyyy yyyy yyyy yyyy"
      }
    }
  }
}

License

MIT