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

@wp-playground/mcp

v3.1.11

Published

MCP server for WordPress Playground - enables AI agents to interact with the WordPress Playground website.

Downloads

289

Readme

@wp-playground/mcp

MCP server that connects AI providers to a WordPress Playground running in the browser.

Usage

1. Configure your MCP client

Pick the configuration for your AI tool:

Claude Code / Claude Desktop

Add to your Claude Code .mcp.json or Claude Desktop claude_desktop_config.json:

{
	"mcpServers": {
		"wordpress-playground": {
			"type": "stdio",
			"command": "npx",
			"args": ["-y", "@wp-playground/mcp"]
		}
	}
}

Gemini CLI

Add to ~/.gemini/settings.json (or .gemini/settings.json in your project):

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

2. Open the Playground website

Your AI assistant will ask you to open the Playground website and provide the exact URL. You can also ask it: "What's the Playground website URL?"

How it works

AI Client (stdio) → MCP Server (Node.js) → WebSocket (port 7999) → Browser (Playground website)

The MCP server communicates with AI clients via stdio and with the browser via WebSocket. A bridge client (bridge-client.ts) integrated into the Playground website via Redux middleware auto-connects to the WebSocket server and proxies commands to the PlaygroundClient API.

Security

The MCP bridge runs locally and is only accessible from your machine — connections are origin-restricted and require a token generated at server startup, preventing other websites from hijacking it.

Note: A compromised WordPress site could attempt prompt injection by embedding instructions in its content (e.g. in a page, post, or PHP output). Use a capable model — larger models are generally better at detecting these attempts.

Available tools

Site management: playground_get_website_url, playground_list_sites, playground_open_site, playground_rename_site, playground_save_site

Code execution: playground_execute_php, playground_request

Navigation & info: playground_navigate, playground_get_current_url, playground_get_site_info

Filesystem: playground_read_file, playground_write_file, playground_list_files, playground_mkdir, playground_delete_file, playground_delete_directory, playground_file_exists

Development

When working on the MCP server or the Playground codebase, run from source instead:

1. Start the Playground dev server

npm run dev

2. Configure your MCP client

Note: Your default node must be Node 22+. If it isn't, replace node in the command below with the full path to Node 22+ (e.g. /Users/ME/.nvm/versions/node/v22.22.0/bin/node).

Add to your MCP client config (e.g. Claude Code .mcp.json or Claude Desktop claude_desktop_config.json):

{
	"mcpServers": {
		"wordpress-playground": {
			"type": "stdio",
			"command": "node",
			"args": ["--experimental-strip-types", "--experimental-transform-types", "--import", "ABS_PATH_TO_PLAYGROUND/packages/meta/src/node-es-module-loader/register.mts", "ABS_PATH_TO_PLAYGROUND/packages/playground/mcp/src/index.ts"]
		}
	}
}

Replace ABS_PATH_TO_PLAYGROUND with the absolute path to your local checkout of this repository.

3. Open the Playground website

Navigate to http://127.0.0.1:5400/website-server/?mcp=yes in your browser. The MCP bridge connects automatically.