Skip to content

zacktm/testmcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress MCP Server

A Model Context Protocol (MCP) server for interacting with WordPress sites using FastMCP framework.

Features

  • 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

Installation

npm install

Configuration

The 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"
  }
}

Usage

Start the server

npm start

This will start the WordPress MCP server with SSE transport listening on port 8080.

MCP Tools

The server provides the following MCP tools:

1. wp_discover_endpoints

Discovers all available REST API endpoints on a WordPress site.

{
  "site": "site1"
}

2. wp_call_endpoint

Executes REST API requests to the target WordPress site.

{
  "site": "site1",
  "endpoint": "GET_POSTS",
  "method": "GET",
  "params": {
    "per_page": 5
  }
}

3. wp_list_common_endpoints

Lists common WordPress REST API endpoints with descriptions.

{
  "site": "site1"
}

Connecting to the Server

Using SSE Transport

The server is accessible via SSE at http://localhost:8080/sse.

Using CLI Tools

You can test the server using FastMCP's CLI tools:

npx fastmcp dev wp_mcp_server.js
# or
npx fastmcp inspect wp_mcp_server.js

Legacy Server

The legacy MCP server implementation is still available and can be started with:

npm run start:legacy

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published