{"_id":"@abidingbear/wp-mcp","_rev":"2-97cae2b052a2dc96146b030d92472643","name":"@abidingbear/wp-mcp","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@abidingbear/wp-mcp","version":"1.0.0","keywords":["wordpress","mcp","claude","claude-code","wp-cli","generatepress","model-context-protocol"],"author":{"name":"abidingbear"},"license":"MIT","_id":"@abidingbear/wp-mcp@1.0.0","maintainers":[{"name":"abidingbear","email":"berrek@berrek.com"}],"homepage":"https://github.com/abidingbear/wp-mcp#readme","bugs":{"url":"https://github.com/abidingbear/wp-mcp/issues"},"bin":{"wp-mcp":"index.js"},"dist":{"shasum":"1272304f09bdbf32bd77f5d2e785e8dbe9f54ccf","tarball":"https://registry.npmjs.org/@abidingbear/wp-mcp/-/wp-mcp-1.0.0.tgz","fileCount":10,"integrity":"sha512-s6ZcBhUs+4eF5sFFJ2HPRbh2KxgbS2CBNygG3cG7HeaFj8cPsQ6Jwvht7BvTSG+lHjDHyrI+XH8NwzTCwcW4MQ==","signatures":[{"sig":"MEQCICPXtpTIS4yTGYBIKSXieI3Gb1Z3YV+7sS9hC43mzG1yAiApaXR/qUyas76gE5MGoq7K2rfv3KukiD1OQW+TJQ8Jww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44946},"main":"index.js","type":"module","engines":{"node":">=20.0.0"},"scripts":{"dev":"node --watch index.js","start":"node index.js"},"_npmUser":{"name":"abidingbear","email":"berrek@berrek.com"},"repository":{"url":"git+https://github.com/abidingbear/wp-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"WordPress MCP server for Claude Code with WP-CLI integration and GeneratePress theme support","directories":{},"_nodeVersion":"24.2.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wp-mcp_1.0.0_1766508137446_0.9612351415617963","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@abidingbear/wp-mcp","version":"1.1.0","description":"WordPress MCP server for Claude Code with WP-CLI integration and GeneratePress theme support","type":"module","main":"index.js","bin":{"wp-mcp":"index.js"},"scripts":{"start":"node index.js","dev":"node --watch index.js"},"keywords":["wordpress","mcp","claude","claude-code","wp-cli","generatepress","model-context-protocol"],"author":{"name":"abidingbear"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abidingbear/wp-mcp.git"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","shell-quote":"^1.8.3","zod":"^3.25.76"},"engines":{"node":">=20.0.0"},"_id":"@abidingbear/wp-mcp@1.1.0","bugs":{"url":"https://github.com/abidingbear/wp-mcp/issues"},"homepage":"https://github.com/abidingbear/wp-mcp#readme","_nodeVersion":"24.2.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-I9mjbEGsOJ5KX7daPiuoM49zUdXPzY7x8Nnz8e26vLf16HslWtelNqHL3Z7WcNC5mkK1JarsudqLoY1a2Q2k7g==","shasum":"22fbc275b59dca05182a0f01d53fb6594ea66795","tarball":"https://registry.npmjs.org/@abidingbear/wp-mcp/-/wp-mcp-1.1.0.tgz","fileCount":11,"unpackedSize":68963,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDVCLjX9d69A98Vlu7N1oIx+/FJASMgu5REbupV1B+KEgIgI765//dGkGp1LNXkSO6GZ+EBTwUpMgQKJzKEx+SVvPE="}]},"_npmUser":{"name":"abidingbear","email":"berrek@berrek.com"},"directories":{},"maintainers":[{"name":"abidingbear","email":"berrek@berrek.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wp-mcp_1.1.0_1766514791642_0.23248353450268255"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-23T16:42:17.364Z","modified":"2025-12-23T18:33:11.959Z","1.0.0":"2025-12-23T16:42:17.604Z","1.1.0":"2025-12-23T18:33:11.765Z"},"bugs":{"url":"https://github.com/abidingbear/wp-mcp/issues"},"author":{"name":"abidingbear"},"license":"MIT","homepage":"https://github.com/abidingbear/wp-mcp#readme","keywords":["wordpress","mcp","claude","claude-code","wp-cli","generatepress","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/abidingbear/wp-mcp.git"},"description":"WordPress MCP server for Claude Code with WP-CLI integration and GeneratePress theme support","maintainers":[{"name":"abidingbear","email":"berrek@berrek.com"}],"readme":"# @abidingbear/wp-mcp\n\nA WordPress MCP (Model Context Protocol) server for Claude Code with WP-CLI integration and GeneratePress theme support.\n\n## Features\n\n- **Core WordPress Tools**: Manage posts, pages, options, and site settings\n- **GeneratePress Integration**: Full control over GP theme settings, colors, typography, and layout\n- **Multi-site Support**: Configure and manage multiple WordPress installations\n- **WP-CLI Powered**: Uses WP-CLI for reliable WordPress operations\n\n## Requirements\n\n- Node.js 20+\n- WP-CLI installed and accessible\n- WordPress site(s) with shell access\n\n## Installation\n\n### For Claude Code Users\n\nAdd to your project's `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"wp-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@abidingbear/wp-mcp\"]\n    }\n  }\n}\n```\n\n### Configuration\n\nCreate a sites configuration file at `~/.wp-mcp.json`:\n\n```json\n{\n  \"sites\": {\n    \"my-site\": {\n      \"path\": \"/path/to/wordpress/installation\",\n      \"theme\": \"generatepress\",\n      \"description\": \"My WordPress site\"\n    }\n  }\n}\n```\n\nOr use the environment variable `WP_MCP_SITES` to specify a custom config path.\n\n#### Config File Locations\n\nThe server checks these locations in order:\n1. `$WP_MCP_SITES` environment variable\n2. `~/.config/wp-mcp/sites.json`\n3. `~/.wp-mcp.json`\n\n## Available Tools\n\n### Core Tools\n\n| Tool | Description |\n|------|-------------|\n| `wp_list_posts` | List WordPress posts with filters |\n| `wp_get_post` | Get a single post by ID |\n| `wp_create_post` | Create a new post or page |\n| `wp_create_post_with_blocks` | Create post with Gutenberg blocks |\n| `wp_update_post` | Update an existing post |\n| `wp_delete_post` | Delete a post (trash or permanent) |\n| `wp_get_option` | Get a WordPress option value |\n| `wp_set_option` | Set a WordPress option value |\n| `wp_patch_option` | Update a key within a serialized option |\n| `wp_list_options` | List options matching a pattern |\n| `wp_get_theme_mods` | Get theme modification settings |\n| `wp_set_theme_mod` | Set a theme modification value |\n| `wp_list_sites` | List all configured sites |\n| `wp_site_info` | Get WordPress site information |\n| `wp_list_themes` | List installed themes |\n| `wp_list_plugins` | List installed plugins |\n| `wp_flush_cache` | Flush object cache and rewrite rules |\n| `wp_search_replace` | Search and replace in database |\n| `wp_db_export` | Export database to SQL file |\n\n### GeneratePress Tools\n\n| Tool | Description |\n|------|-------------|\n| `gp_get_settings` | Get all GeneratePress theme settings |\n| `gp_get_colors` | Get global color palette |\n| `gp_set_colors` | Set global color palette |\n| `gp_set_setting` | Update a single GP setting |\n| `gp_get_typography` | Get typography settings (GP Premium) |\n| `gp_get_layout` | Get layout settings |\n| `gp_set_container_width` | Set container width |\n| `gp_get_modules` | Get GP Premium module status |\n| `gp_regenerate_css` | Regenerate dynamic CSS |\n\n## Auto-Detection\n\nWhen running in a WordPress directory (or any subdirectory), the server automatically detects the WordPress installation by looking for `wp-config.php`. No configuration file is needed for local development.\n\nThe auto-detected site is available as `local` (or any site ID if it's the only configured site).\n\n## Usage Examples\n\n### List Posts\n\n```\nUse the wp_list_posts tool with site \"local\" to get recent posts\n```\n\n### Update GeneratePress Colors\n\n```\nUse gp_set_colors to update the color palette for site \"local\"\n```\n\n### Get Site Info\n\n```\nUse wp_site_info to get details about site \"local\"\n```\n\n## Security\n\nThis package implements multiple layers of security to protect against command injection and other attacks:\n\n### Command Allowlist\n\nOnly specific WP-CLI commands are allowed:\n- `cache`, `core`, `db`, `option`, `plugin`, `post`, `rewrite`, `search-replace`, `theme`\n\nAll other commands are rejected.\n\n### Input Validation\n\nAll user inputs are validated before use:\n- **Site IDs**: Alphanumeric with hyphens/underscores only\n- **Option names**: WordPress-safe characters only (max 191 chars)\n- **Post types/statuses**: Validated against known WordPress values\n- **Colors**: Must be valid hex format (#RGB, #RRGGBB, or #RRGGBBAA)\n- **File paths**: Sanitized and validated for WordPress installations\n- **Search strings**: Shell metacharacters rejected\n\n### Safe Shell Escaping\n\nAll values passed to shell commands use [shell-quote](https://www.npmjs.com/package/shell-quote) for proper escaping, preventing command injection attacks.\n\n### Path Traversal Protection\n\n- Paths are resolved to absolute paths\n- Symlinks are validated\n- WordPress installation is verified before operations\n- Control characters and null bytes are rejected\n\n### Error Sanitization\n\nError messages are sanitized to avoid exposing internal system paths.\n\n## Troubleshooting\n\n### WP-CLI Not Found\n\nEnsure WP-CLI is installed and available in your PATH:\n\n```bash\nwp --info\n```\n\nIf using Local by Flywheel, open the site shell first or add Local's WP-CLI to your PATH.\n\n### Auto-Detection Not Working\n\nCreate a manual configuration at `~/.wp-mcp.json`:\n\n```json\n{\n  \"sites\": {\n    \"local\": {\n      \"path\": \"/path/to/your/wordpress\"\n    }\n  }\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}