A Model Context Protocol (MCP) server for interacting with WordPress sites using FastMCP framework.
- Discovers WordPress REST API endpoints on target sites
- Provides common WordPress API operations as MCP tools
- Supports SSE transport for browser and AI tool integration
- Uses FastMCP for easy setup and deployment
npm installThe server connects to WordPress sites defined in a configuration file. The default configuration is loaded from https://sparkrypt.com/sites.json.
The configuration file should have the following format:
{
"site1": {
"URL": "https://example.com",
"USER": "username",
"PASS": "application_password"
},
"site2": {
"URL": "https://another-site.com",
"USER": "username",
"PASS": "application_password"
}
}npm startThis will start the WordPress MCP server with SSE transport listening on port 8080.
The server provides the following MCP tools:
Discovers all available REST API endpoints on a WordPress site.
{
"site": "site1"
}Executes REST API requests to the target WordPress site.
{
"site": "site1",
"endpoint": "GET_POSTS",
"method": "GET",
"params": {
"per_page": 5
}
}Lists common WordPress REST API endpoints with descriptions.
{
"site": "site1"
}The server is accessible via SSE at http://localhost:8080/sse.
You can test the server using FastMCP's CLI tools:
npx fastmcp dev wp_mcp_server.js
# or
npx fastmcp inspect wp_mcp_server.jsThe legacy MCP server implementation is still available and can be started with:
npm run start:legacyMIT