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

mcp-server-wp

v1.0.0

Published

Local MCP server that bridges AI agents (Claude Code, Codex, Cursor etc.) to WordPress via the MCP Bridge plugin

Readme

MCP Bridge for WordPress

Control your WordPress site with natural language — directly from Claude Code, Cursor, Codex and other AI tools.

npm version License: MIT


What is this?

MCP Bridge consists of two parts that work together:

| Part | What it does | |------|-------------| | 🔌 WordPress Plugin (leanplugins.dev) | Exposes a secure REST API on your WordPress site | | ⚡ This npm package | Local MCP server that connects your AI tool to the REST API |

Once set up, you can tell your AI agent things like:

  • "List all active plugins on my site"
  • "Deactivate the Hello Dolly plugin"
  • "Show me the site health status"
  • "Run wp cache flush on my server"
  • "What plugins have pending updates?"

Requirements

  • WordPress 6.0+ with the MCP Bridge Plugin installed & activated
  • Node.js 18+
  • An AI tool that supports MCP (Claude Code, Cursor, Windsurf, etc.)

Setup (3 Steps)

Step 1 — Install & activate the WordPress plugin

Download the MCP Bridge Plugin from leanplugins.dev and install it in your WordPress backend.

After activation you'll see a new menu item under Settings → MCP Bridge.


Step 2 — Create a WordPress Application Password

In your WordPress admin:

WP Admin → Users → Your Profile → scroll to "Application Passwords"
→ Enter a name e.g. "Claude Code"
→ Click "Add New Application Password"
→ Copy the generated password (shown only once!)
   Example: "AbCd EfGh IjKl MnOp QrSt UvWx"

Step 3 — Create your config file

Create ~/.mcp-bridge.json on your local machine:

{
  "sites": {
    "my-site": {
      "url": "https://your-wordpress-site.com",
      "username": "your-wp-username",
      "applicationPassword": "AbCd EfGh IjKl MnOp QrSt UvWx",
      "label": "My WordPress Site"
    }
  },
  "defaultSite": "my-site"
}

Multiple sites? Just add more entries to the sites object and reference them with the site parameter in your prompts.


Connecting to your AI tool

Claude Code

claude mcp add wordpress -- npx -y mcp-server-wp

Then restart Claude Code. That's it! 🎉


Cursor / Windsurf

Add to your ~/.cursor/mcp.json (or ~/.windsurf/mcp.json):

{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["-y", "mcp-server-wp"]
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["-y", "mcp-server-wp"]
    }
  }
}

Available Tools

Once connected, your AI agent has access to these tools:

| Tool | Description | Risk | |------|-------------|------| | wp_site_health | WP version, PHP info, DB stats, HTTP status, plugin updates | ✅ Safe | | wp_query_db | Execute SQL queries (SELECT by default, writes opt-in) | ⚠️ Medium | | wp_manage_plugins | List, activate, deactivate, update plugins | ⚠️ Medium | | wp_run_cli | Execute WP-CLI commands on your server | 🔴 High Risk | | wp_file_system | Read/write theme & plugin files | 🔴 High Risk |

High-risk tools are disabled by default. Enable them explicitly in Settings → MCP Bridge in your WP Admin.


Example Prompts

"Show me the health status of my WordPress site"
"Which plugins are inactive?"
"Update all plugins on my site"
"Flush the WordPress cache"
"Read the functions.php of my active theme"
"Run wp user list on my site"

Security

  • Authentication via WordPress Application Passwords (WP core feature, no third-party auth)
  • All requests require manage_options capability (admin only)
  • Rate limiting, IP whitelist and HTTPS enforcement configurable in plugin settings
  • High-risk tools (WP-CLI, File System) are off by default
  • Full request logging in the WP database

Multi-Site Example

{
  "sites": {
    "production": {
      "url": "https://my-shop.com",
      "username": "admin",
      "applicationPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
      "label": "Production Shop"
    },
    "staging": {
      "url": "https://staging.my-shop.com",
      "username": "admin",
      "applicationPassword": "yyyy yyyy yyyy yyyy yyyy yyyy",
      "label": "Staging"
    }
  },
  "defaultSite": "staging"
}

Then in your AI tool:

"List plugins on my production site"
"Run cache flush on staging"

Links


License

MIT © LeanPlugins