Skip to content
Back to search

woocommerce-mcp-server

A WooCommerce (MCP) Model Context Protocol server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/techspawn--woocommerce-mcp-server/badge.svg)](/listings/techspawn--woocommerce-mcp-server)

HTML

<a href="/listings/techspawn--woocommerce-mcp-server"><img src="/api/listings/techspawn--woocommerce-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone the repository 2. Install dependencies:

npm install

3. Build the project:

npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 423 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/mseep-audited.png)](https://mseep.ai/app/techspawn-woocommerce-mcp-server)
  2. # WooCommerce MCP Server
  3. A Model Context Protocol (MCP) server for WooCommerce integration, compatible with Windows, macOS, and Linux.
  4. ## Overview
  5. This MCP server enables interaction with WooCommerce stores through the WordPress REST API. It provides comprehensive tools for managing all aspects of products, orders, customers, shipping, taxes, discounts, and store configuration using JSON-RPC 2.0 protocol.
  6. ### Related Project
  7. **Showcase your WooCommerce store to 800+ million ChatGPT users!** Check out [WooCommerce ChatGPT App](https://github.com/techspawn/woocommerce-chatgpt-app) - A visual shopping assistant built using MCP and ChatGPT SDK with beautiful UI displaying products, images, prices, and descriptions. Browse, search, filter, and seamlessly navigate to your store - all within ChatGPT.
  8. ## Installation - WooCommerce MCP Server
  9. 1. Clone the repository
  10. 2. Install dependencies:
  11. ```bash
  12. npm install
  13. ```
  14. 3. Build the project:
  15. ```bash
  16. npm run build
  17. ```
  18. ## Configuration
  19. Add the server to your MCP settings file with environment variables for credentials:
  20. ```json
  21. {
  22. "mcpServers": {
  23. "woocommerce": {
  24. "command": "node",
  25. "args": ["path/to/build/index.js"],
  26. "env": {
  27. "WORDPRESS_SITE_URL": "https://your-wordpress-site.com",
  28. "WOOCOMMERCE_CONSUMER_KEY": "your-woocommerce-consumer-key",
  29. "WOOCOMMERCE_CONSUMER_SECRET": "your-woocommerce-consumer-secret",
  30. "WORDPRESS_USERNAME": "your-wordpress-username",
  31. "WORDPRESS_PASSWORD": "your-wordpress-password"
  32. }
  33. }
  34. }
  35. }
  36. ```
  37. ### Environment Variables
  38. #### Required for WooCommerce API access:
  39. - `WORDPRESS_SITE_URL`: Your WordPress site URL (WooCommerce is a WordPress plugin)
  40. - `WOOCOMMERCE_CONSUMER_KEY`: WooCommerce REST API consumer key
  41. - `WOOCOMMERCE_CONSUMER_SECRET`: WooCommerce REST API consumer secret
  42. #### Required only for WordPress API methods:
  43. - `WORDPRESS_USERNAME`: WordPress username with appropriate permissions
  44. - `WORDPRESS_PASSWORD`: WordPress password for authentication
  45. You can also provide these credentials in the request parameters if you prefer not to use environment variables.
  46. ## Authentication Options
  47. ### WooCommerce Authentication
  48. WooCommerce API access requires consumer keys that you can generate in your WordPress dashboard under WooCommerce → Settings → Advanced → REST API.
  49. ### WordPress Authentication
  50. For WordPress-specific methods (like managing posts), you need to provide:
  51. - Username/password credentials for basic authentication
  52. - The WordPress REST API must be enabled on your site
  53. ## API Methods
  54. The server supports both WordPress and WooCommerce API methods. Here's a list of available methods grouped by category:
  55. ### WordPress Content Management
  56. These methods require WordPress username/password credentials and are independent of the WooCommerce API.
  57. | Method | Description |
  58. |--------|-------------|
  59. | `create_post` | Create a new WordPress post |
  60. | `get_posts` | Retrieve WordPress posts |
  61. | `update_post` | Update an existing WordPress post |
  62. | `get_post_meta` | Get post metadata |
  63. | `update_post_meta` | Update post metadata |
  64. | `create_post_meta` | Create post metadata |
  65. | `delete_post_meta` | Delete post metadata |
  66. ### WooCommerce Products
  67. | Method | Description |
  68. |--------|-------------|
  69. | `get_products` | Retrieve a list of products |
  70. | `get_product` | Get a single product by ID |
  71. | `create_product` | Create a new product |
  72. | `update_product` | Update an existing product |
  73. | `delete_product` | Delete a product |
  74. | `get_product_meta` | Get product metadata |
  75. | `create_product_meta` | Create/update product metadata |
  76. | `update_product_meta` | Update product metadata (alias for create) |
  77. | `delete_product_meta` | Delete product metadata |
  78. ### Product Categories
  79. | Method | Description |
  80. |--------|-------------|
  81. | `get_product_categories` | Retrieve product categories |
  82. | `get_product_category` | Get a single product category |
  83. | `create_product_category` | Create a new product category |
  84. | `update_product_category` | Update a product category |
  85. | `delete_product_category` | Delete a product category |
  86. ### Product Tags
  87. | Method | Description |
  88. |--------|-------------|
  89. | `get_product_tags` | Retrieve product tags |
  90. | `get_product_tag` | Get a single product tag |
  91. | `create_product_tag` | Create a new product tag |
  92. | `update_product_tag` | Update a product tag |
  93. | `delete_product_tag` | Delete a product tag |
  94. ### Product Attributes
  95. | Method | Description |
  96. |--------|-------------|
  97. | `get_product_attributes` | Retrieve product attributes |
  98. | `get_product_attribute` | Get a single product attribute |
  99. | `create_product_attribute` | Create a new product attribute |
  100. | `update_product_attribute` | Update a product attribute |
  101. | `delete_product_attribute` | Delete a product attribute |
  102. | `get_attribute_terms` | Retrieve attribute terms |
  103. | `get_attribute_term` | Get a single attribute term |
  104. | `create_attribute_term` | Create a new attribute term |
  105. | `update_attribute_term` | Update an attribute term |
  106. | `delete_attribute_term` | Delete an attribute term |
  107. ### Product Variations
  108. | Method | Description |
  109. |--------|-------------|
  110. | `get_product_variations` | Retrieve product variations |
  111. | `get_product_variation` | Get a single product variation |
  112. | `create_product_variation` | Create a new product variation |
  113. | `update_product_variation` | Update a product variation |
  114. | `delete_product_variation` | Delete a product variation |
  115. ### Product Reviews
  116. | Method | Description |
  117. |--------|-------------|
  118. | `get_product_reviews` | Retrieve product reviews |
  119. | `get_product_review` | Get a single product review |
  120. | `create_product_review` | Create a new product review |
  121. | `update_product_review` | Update a product review |
  122. | `delete_product_review` | Delete a product review |
  123. ### WooCommerce Orders
  124. | Method | Description |
  125. |--------|-------------|
  126. | `get_orders` | Retrieve a list of orders |
  127. | `get_order` | Get a single order by ID |
  128. | `create_order` | Create a new order |
  129. | `update_order` | Update an existing order |
  130. | `delete_order` | Delete an order |
  131. | `get_order_meta` | Get order metadata |
  132. | `create_order_meta` | Create/update order metadata |
  133. | `update_order_meta` | Update order metadata (alias for create) |
  134. | `delete_order_meta` | Delete order metadata |
  135. ### Order Notes
  136. | Method | Description |
  137. |--------|-------------|
  138. | `get_order_notes` | Retrieve order notes |
  139. | `get_order_note` | Get a single order note |
  140. | `create_order_note` | Create a new order note |
  141. | `delete_order_note` | Delete an order note |
  142. ### Order Refunds
  143. | Method | Description |
  144. |--------|-------------|
  145. | `get_order_refunds` | Retrieve order refunds |
  146. | `get_order_refund` | Get a single order refund |
  147. | `create_order_refund` | Create a new order refund |
  148. | `delete_order_refund` | Delete an order refund |
  149. ### WooCommerce Customers
  150. | Method | Description |
  151. |--------|-------------|
  152. | `get_customers` | Retrieve a list of customers |
  153. | `get_customer` | Get a single customer by ID |
  154. | `create_customer` | Create a new customer |
  155. | `update_customer` | Update an existing customer |
  156. | `delete_customer` | Delete a customer |
  157. | `get_customer_meta` | Get customer metadata |
  158. | `create_customer_meta` | Create/update customer metadata |
  159. | `update_customer_meta` | Update customer metadata (alias for create) |
  160. | `delete_customer_meta` | Delete customer metadata |
  161. ### Shipping
  162. | Method | Description |
  163. |--------|-------------|
  164. | `get_shipping_zones` | Retrieve shipping zones |
  165. | `get_shipping_zone` | Get a single shipping zone |
  166. | `create_shipping_zone` | Create a new shipping zone |
  167. | `update_shipping_zone` | Update a shipping zone |
  168. | `delete_shipping_zone` | Delete a shipping zone |
  169. | `get_shipping_methods` | Retrieve shipping methods |
  170. | `get_shipping_zone_methods` | Get shipping methods for a zone |
  171. | `create_shipping_zone_method` | Create a new shipping method for a zone |
  172. | `update_shipping_zone_method` | Update a shipping method for a zone |
  173. | `delete_shipping_zone_method` | Delete a shipping method from a zone |
  174. | `get_shipping_zone_locations` | Get locations for a shipping zone |
  175. | `update_shipping_zone_locations` | Update locations for a shipping zone |
  176. ### Taxes
  177. | Method | Description |
  178. |--------|-------------|
  179. | `get_tax_classes` | Retrieve tax classes |
  180. | `create_tax_class` | Create a new tax class |
  181. | `delete_tax_class` | Delete a tax class |
  182. | `get_tax_rates` | Retrieve tax rates |
  183. | `get_tax_rate` | Get a single tax rate |
  184. | `create_tax_rate` | Create a new tax rate |
  185. | `update_tax_rate` | Update a tax rate |
  186. | `delete_tax_rate` | Delete a tax rate |
  187. ### Discounts/Coupons
  188. | Method | Description |
  189. |--------|-------------|
  190. | `get_coupons` | Retrieve coupons |
  191. | `get_coupon` | Get a single coupon |
  192. | `create_coupon` | Create a new coupon |
  193. | `update_coupon` | Update a coupon |
  194. | `delete_coupon` | Delete a coupon |
  195. ### Payment Gateways
  196. | Method | Description |
  197. |--------|-------------|
  198. | `get_payment_gateways` | Retrieve payment gateways |
  199. | `get_payment_gateway` | Get a single payment gateway |
  200. | `update_payment_gateway` | Update a payment gateway |
  201. ### Reports
  202. | Method | Description |
  203. |--------|-------------|
  204. | `get_sales_report` | Retrieve sales reports |
  205. | `get_products_report` | Retrieve products reports |
  206. | `get_orders_report` | Retrieve orders reports |
  207. | `get_categories_report` | Retrieve categories reports |
  208. | `get_customers_report` | Retrieve customers reports |
  209. | `get_stock_report` | Retrieve stock reports |
  210. | `get_coupons_report` | Retrieve coupons reports |
  211. | `get_taxes_report` | Retrieve taxes reports |
  212. ### Settings
  213. | Method | Description |
  214. |--------|-------------|
  215. | `get_settings` | Retrieve all settings |
  216. | `get_setting_options` | Retrieve options for a setting |
  217. | `update_setting_option` | Update a setting option |
  218. ### System Status
  219. | Method | Description |
  220. |--------|-------------|
  221. | `get_system_status` | Retrieve system status |
  222. | `get_system_status_tools` | Retrieve system status tools |
  223. | `run_system_status_tool` | Run a system status tool |
  224. ### Data
  225. | Method | Description |
  226. |--------|-------------|
  227. | `get_data` | Retrieve store data |
  228. | `get_continents` | Retrieve continents data |
  229. | `get_countries` | Retrieve countries data |
  230. | `get_currencies` | Retrieve currencies data |
  231. | `get_current_currency` | Get the current currency |
  232. ## Method Parameters
  233. All methods follow a similar parameter structure. Here are some examples:
  234. ### Common Parameters for All Methods
  235. - `siteUrl`: (optional if set in env) WordPress site URL
  236. ### Additional Parameters for WooCommerce Methods
  237. - `consumerKey`: (optional if set in env) WooCommerce consumer key
  238. - `consumerSecret`: (optional if set in env) WooCommerce consumer secret
  239. ### Additional Parameters for WordPress Methods
  240. - `username`: (optional if set in env) WordPress username
  241. - `password`: (optional if set in env) WordPress password
  242. ## Example Usage
  243. ### WordPress API Example
  244. ```json
  245. {
  246. "jsonrpc": "2.0",
  247. "id": 1,
  248. "method": "create_post",
  249. "params": {
  250. "siteUrl": "https://your-wordpress-site.com",
  251. "username": "your-wordpress-username",
  252. "password": "your-wordpress-password",
  253. "title": "My New Blog Post",
  254. "content": "This is the content of my new blog post.",
  255. "status": "publish"
  256. }
  257. }
  258. ```
  259. ### WooCommerce Products Example
  260. ```json
  261. {
  262. "jsonrpc": "2.0",
  263. "id": 1,
  264. "method": "get_products",
  265. "params": {
  266. "perPage": 20,
  267. "page": 1,
  268. "filters": {
  269. "category": 19,
  270. "status": "publish"
  271. }
  272. }
  273. }
  274. ```
  275. ### Create Product Example
  276. ```json
  277. {
  278. "jsonrpc": "2.0",
  279. "id": 1,
  280. "method": "create_product",
  281. "params": {
  282. "productData": {
  283. "name": "Premium T-Shirt",
  284. "type": "simple",
  285. "regular_price": "29.99",
  286. "description": "Comfortable cotton t-shirt, available in various sizes.",
  287. "short_description": "Premium quality t-shirt.",
  288. "categories": [
  289. {
  290. "id": 19
  291. }
  292. ],
  293. "images": [
  294. {
  295. "src": "http://example.com/wp-content/uploads/2022/06/t-shirt.jpg"
  296. }
  297. ]
  298. }
  299. }
  300. }
  301. ```
  302. ### Product Metadata Example
  303. ```json
  304. {
  305. "jsonrpc": "2.0",
  306. "id": 1,
  307. "method": "create_product_meta",
  308. "params": {
  309. "productId": 456,
  310. "metaKey": "_custom_product_field",
  311. "metaValue": {
  312. "special_attribute": "value",
  313. "another_attribute": 42
  314. }
  315. }
  316. }
  317. ```
  318. ### Order Metadata Example
  319. ```json
  320. {
  321. "jsonrpc": "2.0",
  322. "id": 1,
  323. "method": "create_order_meta",
  324. "params": {
  325. "orderId": 789,
  326. "metaKey": "_delivery_instructions",
  327. "metaValue": "Leave package at the back door"
  328. }
  329. }
  330. ```
  331. ## Security Note
  332. For WooCommerce REST API access, you need to generate API keys. You can create them in your WordPress dashboard under WooCommerce → Settings → Advanced → REST API.
  333. ## Requirements
  334. - Node.js 20.0.0 or higher
  335. - WordPress site with WooCommerce plugin installed
  336. - WooCommerce REST API keys
  337. ## License
  338. MIT License - See LICENSE file for details

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.