WordPress MCP Extension
Implements a Model Context Protocol server for WordPress that enhances VS Code with WordPress-specific intelligence, including database integration, code completion, and documentation.
README
WordPress MCP Extension for VS Code
This VS Code extension implements a Model Context Protocol (MCP) server for WordPress integration. It helps VS Code understand your WordPress environment, making development easier and more intuitive.
Features
- WordPress Configuration Detection: Automatically finds your wp-config.php file by searching from the current directory up through parent directories
- Database Integration: Extracts WordPress database credentials and connects to your WordPress database
- WordPress Installation Path: Detects the WordPress installation directory
- Intelligent Code Completion: Provides context-aware code completion for WordPress functions and hooks
- Documentation Hover: Shows documentation for WordPress functions including the current WordPress version
- Code Actions: Offers WordPress-specific code actions and quick fixes
Requirements
- VS Code 1.74.0 or higher
- A WordPress installation that the extension can access
- Node.js and npm (for development)
Usage
- Open a folder that contains a WordPress installation or is a child directory of a WordPress installation
- The extension will automatically search for a wp-config.php file
- Use the command
WordPress MCP: Connect to WordPressto explicitly connect to the WordPress installation - Enjoy enhanced WordPress coding with intelligent assistance based on your specific WordPress environment
Extension Settings
This extension doesn't require any additional settings.
Known Issues
- PHP serialization parsing is implemented in a simplified way and may not handle all serialized data formats
- Database connection needs to close properly when VS Code shuts down
Release Notes
0.1.0
Initial release of WordPress MCP Extension with basic WordPress integration features.
Development
Building the Extension
npm install
npm run compile
Packaging the Extension
npm install -g vsce
vsce package
This creates a .vsix file in your project directory that can be installed in VS Code.
Testing the Extension
After installing the extension, you can test its functionality using these commands:
-
Test WordPress Connection:
> WordPress MCP: Connect to WordPressThis command will search for and connect to your WordPress installation.
-
View WordPress Configuration:
> WordPress MCP: Show WordPress ConfigurationThis displays database credentials and other WordPress configuration details.
-
Query WordPress Database:
> WordPress MCP: Query DatabaseThis allows you to execute natural language queries against your WordPress database.
-
Test MCP Integration via Chat:
@wordpress What is the database name in wp-config.php?Use in the VS Code chat interface to test the MCP integration. Other useful queries:
- @wordpress What is the database username?
- @wordpress Show me active plugins
- @wordpress What theme is active?
- @wordpress What custom post types are available?
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.