🎁 GiveWP MCP Server
A Model Context Protocol (MCP) server implementation for GiveWP that integrates with Elementor's Angie AI assistant.
🚀 Features
- Integration with GiveWP's donation management system
- Provides AI-powered tools for campaigns, donations, donors, and forms
- Connects with Elementor's Angie AI assistant
- Built on the Model Context Protocol (MCP) standard
Prerequisites
- Node.js 18+ or Bun 1.2.20+
🔧 Installation
npm install @givewp/mcp-server
bun add @givewp/mcp-server
⚙️ Configuration
Create an mcp.json
file with the following structure:
Using Bun (recommended):
{
"mcpServers": {
"givewp-mcp": {
"command": "bunx",
"args": ["-y", "@givewp/mcp-server@latest"],
"env": {
"WP_REST_URL": "https://your-wordpress-site.com/wp-json",
"WP_USERNAME": "your-username",
"WP_APP_PASSWORD": "your-application-password",
"NODE_TLS_REJECT_UNAUTHORIZED": 1
}
}
}
}
Using npm:
{
"mcpServers": {
"givewp-mcp": {
"command": "npx",
"args": ["-y", "@givewp/mcp-server@latest"],
"env": {
"WP_REST_URL": "https://your-wordpress-site.com/wp-json",
"WP_USERNAME": "your-username",
"WP_APP_PASSWORD": "your-application-password",
"NODE_TLS_REJECT_UNAUTHORIZED": 1
}
}
}
}
Required environment variables:
WP_REST_URL
: Your WordPress site's REST API URL
WP_USERNAME
: Your WordPress username
WP_APP_PASSWORD
: Your WordPress application password
Usage with Cursor or Claude Desktop
Add and customize the above configuration. For more information, read the Cursor MCP documentation or the Claude Desktop MCP guide.
Testing MCP Server Tools
[!IMPORTANT]
You need an accessible WordPress installation with GiveWP installed that the MCP Server can talk to.
The easiest way to test the tools for valid REST connectivity is to use the MCP Inspector.
Run this in your terminal, and it will automatically launch the MCP Inspector and allow you to run an instance of the server
locally:
npx @modelcontextprotocol/inspector --config path/to/your/mcp.json
[!TIP]
If you're testing this against a local WordPress install that does not have a valid SSL certificate, set NODE_TLS_REJECT_UNAUTHORIZED
to 0
in the mcp.json
to allow API requests to complete. Note: This should only be used in development environments, never in production.
🏃♂️ Usage
CLI Usage
[!IMPORTANT]
Copy the .env.example to an .env
file in your current working directory and fill it out according to the configuration.
bunx -y @givewp/mcp-server@latest
npx -y @givewp/mcp-server@latest
bun run src/cli.ts
Integration with Elementor's Angie
This server can be integrated with Elementor's Angie AI assistant:
import register from '@givewp/mcp-server/angie';
register().then(() => console.log('Angie MCP connection successful'));
🏷️ Publishing Packages to NPM
To publish packages to NPM:
💡 The package version is set via publish.yml
workflow, so just leave them all as 0.0.0
.
- Go to the GitHub repository releases page
- Click "Create a new release"
- Create a new tag with the version number (e.g.,
1.0.1
)
- Fill in the release title and description
- Publish the release
This will automatically trigger the publish.yml
GitHub workflow to publish all packages to NPM.
🛠️ MCP Tools Available
The server provides the following MCP tools:
Campaigns
- List campaigns
- Get campaign details
- Update campaigns
- Duplicate campaigns
- Get campaign statistics
- Get campaign revenue
- Get campaign comments
- Create new campaigns
Forms
- List donation forms
- Get form details
Donors
- List donors
- Get donor details
- List donor notes
- Get donor statistics
Donations
- List donations
- Get donation details
- List donation notes
- Delete donations
🛠️ Development
[!NOTE]
Development requires bun.
bun install
bun run build
bun run test
Available Scripts
bun run build
- Build all packages
bun run dev
- Start development mode for all packages
bun run test
- Run test suite
bun run test:ui
- Run tests with UI
bun run test:coverage
- Generate test coverage report
bun run test:coverage:open
- Generate test coverage report and open it in your default browser
bun run lint
- Run ESLint
bun run lint:fix
- Fix ESLint problems
bun run format
- Check code formatting
bun run format:fix
- Automatically fix formatting
bun run typecheck
- Run TypeScript type checking
bun run clean
- Clean all temporary build folders