跳到内容

CloseHub Connector

v1.3.3

Close·technology · 2026年6月30日 上架

Connect WordPress to CloseHub with one API key and expose content and site tools to MCP clients such as Claude.

正在使用
40+
评分
暂无
累计下载
1,894
最近更新
2026年11月23日
需要 WordPress 6.4+已测试到 7.2PHP 8.1+

CloseHub Connector replaces the multiple credentials previously required to link a WordPress site with CloseHub — a marketing project management platform.

Once the plugin is activated, it generates a secure API key and exposes a dedicated REST API namespace (/wp-json/closehub/v1/) that CloseHub uses to interact with your site.

It also exposes content abilities through the WordPress MCP Adapter. MCP clients can discover, list, read, create, update, upload an image, update a post slug, replace one exact Gutenberg block, and send posts to the trash using the server at /wp-json/mcp/mcp-adapter-default-server. closehub/upload-media accepts an image as data_base64, returns its Media Library URL, and requires the user’s upload_files capability; pass that URL as featured_image_url to create or update content without uploading a duplicate. closehub/update-post-slug accepts a post ID and slug, then returns the normalized unique slug and resulting URL. closehub/get-post returns a content_hash; use it with closehub/replace-gutenberg-block, a zero-based block_path, the current block name, and one replacement serialized block so a stale read cannot overwrite newer content. These abilities default to the post type but accept a post_type input for any other post type registered with an admin UI — pages, WooCommerce products (including product types WooCommerce’s own MCP abilities don’t support, such as subscriptions), or custom post types. Authenticate with OAuth as a WordPress user, or use the same CloseHub API key as a Bearer token for a shared Claude Team connector. The API key acts with the capabilities of the WordPress user who last generated it.

Settings: One page under Settings CloseHub (Network Admin Settings CloseHub on multisite) shows the API key, the CloseHub endpoint, the MCP server URL, and the user the key acts as. The same API key connects CloseHub and Claude.

Claude Team: In Claude, add a custom connector with the MCP server URL from Settings CloseHub, choose No sign-in, and add a request header named authorization with the value Bearer <your API key>. The URL uses a ?rest_route= query to help preserve the header when a server rewrite strips it from /wp-json/ requests. Everyone sharing this connector has the WordPress permissions of the user who last generated the key. Regenerating the key disconnects CloseHub and every Claude user until updated. OAuth per-user sign-in remains available under Advanced.

To schedule a post, send status=future and a future date in the site’s local time (Y-m-d\TH:i:s, e.g. 2026-12-22T09:00:00), or date_gmt for the same moment in UTC (it wins if both are sent) to create-post or update-post. The conversion uses the site’s timezone, including daylight saving time. status=publish with a future date is scheduled by WordPress and the response includes a notice; status=draft on a scheduled post returns it to draft and keeps its date. Responses return the final status, date and date_gmt as stored, so a client can verify the schedule.

When WPML is active, create-post and POST /closehub/v1/posts also accept language and an optional translation_of source post ID. The connector assigns the new post to the requested language and joins it to the source post’s translation group. List/get/create responses include the language and translation-group details. Existing posts retain their language on update.

When TranslatePress is active instead, the language abilities (list-languages, add-language, set-default-language) manage its languages, and get-post/list-posts/create-post responses return language (the default language the content is written in) and language_urls with the URL of a published post in every published language. TranslatePress translates one post into every language, so language, translation_of, link-translations, unlink-translation, duplicate-post and missing_translation answer with closehub_translatepress_unsupported. If both plugins are active WPML is used.

With TranslatePress, closehub/list-string-translations lists the strings of a post (or every string containing search) with their translation and status per language, and closehub/save-string-translations saves translations for one language as human reviewed, so an MCP client can translate content itself instead of spending automatic translation quota.

For WooCommerce, MCP clients with the manage_woocommerce capability can retrieve an order summary for a date range, including order count, total sales, average order value, and matching orders.

It also exposes a set of “site” abilities for the CLOSE web go-live checklist — configuration steps that used to be manual or wp-cli only. Each requires the WordPress capability noted below.

Available MCP site abilities:

  • closehub/search-replace-domain (manage_options) — Replace old_domain with new_domain across post content, options, comments, and meta tables, re-serializing serialized values safely. Skips wp_posts.guid. Pass dry_run: true to preview the number of rows that would change per table without writing anything. Example: { "old_domain": "staging.example.com", "new_domain": "example.com" }.
  • closehub/set-robots-txt (manage_options) — Write content to robots.txt, physically if the site root is writable, otherwise served virtually through the robots_txt filter. Example: { "content": "User-agent: *\nDisallow:\nSitemap: https://example.com/sitemap.xml" }.
  • closehub/set-post-noindex (edit_post on the target post_id) — Set or clear the noindex robots meta for one post/page using whichever SEO plugin (Rank Math, Yoast or SEOPress) is active. Example: { "post_id": 42, "noindex": true }.
  • closehub/flush-permalinks (manage_options) — Regenerate rewrite rules, equivalent to wp rewrite flush. Takes no parameters.
  • closehub/get-htaccess (manage_options, read-only) — Return whether .htaccess exists and its current content. Takes no parameters.
  • closehub/set-site-settings (manage_options) — Update the site timezone and/or admin email; at least one is required. Example: { "timezone": "Europe/Madrid", "admin_email": "client@example.com" }.
  • closehub/reassign-posts-author (edit_others_posts) — Reassign every post of post_type (default post) from from_author_id to to_author_id, with a per-post success result. Example: { "from_author_id": 3, "to_author_id": 1 }.
  • closehub/install-wp-org-plugin (install_plugins) — Install (without activating) a plugin from the WordPress.org plugin directory by slug. Example: { "slug": "two-factor" }.
  • closehub/install-plugin-zip (install_plugins; plus update_plugins to replace an installed copy and activate_plugins when activate is true) — Install a plugin from a base64 zip like Plugins > Add New > Upload Plugin. Only for small zips: deploy real packages with create-deploy-ticket below. The zip must hold a single folder (slug, when given, must match it). With overwrite (default true) the installed copy is backed up and replaced, like “Replace current with uploaded”. Clears WP Rocket and OPcache. Returns slug, previous_version, new_version, active, backup and upgrader_messages. Example: { "filename": "my-plugin.zip", "data_base64": "UEsDB...", "slug": "my-plugin" }.
  • closehub/install-theme-zip (install_themes; plus update_themes to replace and switch_themes to activate) — Same as above for themes, like Appearance > Themes > Add New > Upload Theme.
  • closehub/create-deploy-ticket (install_plugins / install_themes) — Single-use ticket to upload one plugin or theme zip from disk to the returned upload_url, sent in the X-CloseHub-Deploy-Ticket header. Bound to the current user, type and slug; expires in 15 minutes and is burned on first use. The upload installs or replaces the package like the zip abilities. Example: { "type": "theme", "slug": "my-theme" }.
  • closehub/get-installed-version (activate_plugins for plugins, switch_themes for themes; read-only) — Installed version, name and active state of one plugin or theme, plus the backups available for rollback. Example: { "type": "theme", "slug": "my-theme" }.
  • closehub/rollback-package (install_* and update_* for the type) — Reinstall a backup taken before a replace: the most recent one, or the backup file named by get-installed-version. The current copy is backed up first. Example: { "type": "theme", "slug": "my-theme" }.
  • closehub/list-unused-plugins (activate_plugins, read-only) — List installed plugins that are not currently active, as removal candidates. Takes no parameters.
  • closehub/update-plugins-and-core (update_plugins and update_core) — Update every plugin with an available update and WordPress core to the latest version, with a per-plugin success result. Takes no parameters.
  • closehub/create-site-user (create_users, plus promote_users when role is administrator) — Create a WordPress user for the site’s client. role defaults to editor; username defaults to the local part of email when omitted. Example: { "email": "client@example.com", "role": "editor" }.
  • closehub/link-translations (edit_post on both posts) — Link two existing posts as WPML translations without creating or editing content. post_id joins the translation group of translation_of (the original) in language. Rejects a language mismatch, different post types, a non-translatable post type, a translation_of that is itself a translation, and an existing translation in that language (closehub_translation_conflict) unless force: true, which detaches it into its own group. Purges the cache of every post in the affected groups unless clear_cache: false. Example: { "post_id": 5789, "translation_of": 4732, "language": "en" }.
  • closehub/unlink-translation (edit_post) — Move a translation into a translation group of its own. The original post of a group cannot be unlinked while it has translations.
  • closehub/list-languages (edit_posts) — List the active WPML or TranslatePress languages and the default one; include_available: true also lists supported languages that can still be added. With TranslatePress each language also reports published and its url_slug, and codes are locales such as fr_FR.
  • closehub/add-language (manage_options) — Activate a WPML-supported language by code, e.g. { "language": "fr" }, or add a language to translate into with TranslatePress, e.g. { "language": "fr_FR" } (publish: false keeps it hidden from visitors; the page cache is purged unless clear_cache: false). Existing content is not changed.
  • closehub/set-default-language (manage_options) — Make an active language the site default.
  • closehub/duplicate-post (edit_post + create capability) — Copy an original post into one or more other languages as drafts, using WPML’s own duplication. Each copy is linked to the original by default; link: false creates independent, unlinked copies. Example: { "post_id": 42, "languages": [ "en", "fr" ] }.
  • closehub/create-post with language creates new content in that language; add translation_of to link it as a translation of an existing post, or leave it out to keep it unlinked.
  • closehub/clear-cache (rocket_purge_cache or manage_options) — Purge the page cache of the active caching plugin (currently WP Rocket). scope is all (default, whole site) or posts (only the given post_ids; IDs that don’t match a post are reported back in invalid_post_ids). Pass minify: true to also clear minified CSS/JS files. Returns 503 when no supported cache plugin is active. On multisite pass site_id to choose the site to purge; on a subdirectory network, purging the main site with WP Rocket also clears the subsites’ cached pages, since they live inside the main site’s cache folder. Example: { "scope": "posts", "post_ids": [ 42, 57 ] }.

What it replaces:

  • WordPress Application Password (username + password)
  • WooCommerce REST API consumer key and consumer secret
  • Gravity Forms API key

You only need to share two things with CloseHub:

  1. Your site URL
  2. The generated API key (found at Settings CloseHub)

Available endpoints:

  • GET /closehub/v1/ping — verify the connection
  • POST /closehub/v1/posts — publish or draft a post (or another post type via post_type), including optional SEO metadata (Rank Math, Yoast or SEOPress), featured image, categories, scheduling (status=future with date/date_gmt), and WPML language/translation_of when WPML is active
  • PUT /closehub/v1/posts/{id} — update a post’s (or other post type’s) title, content, excerpt, status, publish date (date/date_gmt), SEO metadata, featured image, or categories
  • GET /closehub/v1/woocommerce/orders — fetch order data (requires WooCommerce)
  • GET /closehub/v1/woocommerce/store-stats — best sellers, best customers, new customers, buying hours and unpaid orders (requires WooCommerce)
  • GET /closehub/v1/gravity-forms/forms — list forms (requires Gravity Forms)
  • GET /closehub/v1/gravity-forms/forms/{id} — get form details
  • GET /closehub/v1/gravity-forms/forms/{id}/entries — count form entries by date range
  • POST /closehub/v1/elm-releases — create an Easy License Manager release for a product (by product_id or product_sku) and update its WooCommerce download file to the given zip_url in one call; optional tested, requires, requires_php, upgrade_notice
  • PUT /closehub/v1/elm-releases/{id} — update fields on an existing release (all optional) and, if zip_url is given, its product’s download file

WooCommerce, Gravity Forms, and Easy License Manager endpoints return a clear error if those plugins are not active — they are not required.

Multisite networks:

MCP abilities work from the network too: connect once with the network API key and every ability knows which sites it can act on. Abilities that read content or rebuild per-site caches (list-posts, list-languages, get-order-summary, flush-permalinks) run on every site and return one result per site; pass site_ids to limit them. Abilities tied to a specific post, file or setting (for example create-post, get-post, update-post, trash-post, set-robots-txt, clear-cache) require a site_id so an ID is never applied to the wrong site. Server-wide abilities (install-wp-org-plugin, install-plugin-zip, install-theme-zip, create-deploy-ticket, get-installed-version, rollback-package, list-unused-plugins, update-plugins-and-core) run once. Use closehub/list-sites to discover site IDs. Permissions are re-checked on every site.

On a WordPress Multisite network, the same endpoints listed above are shared by every site in the network — there is no separate namespace or key to manage. Activate the plugin network-wide and go to Network Admin Settings CloseHub to find one API key shared by the whole network. Every request to those endpoints automatically returns a sites array with one entry per site in the network (site_id, url, and that site’s data or an error message), instead of a single site’s result — handy when a network is used to run the same company in multiple languages.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums