@gravitykit/block-mcp 2.0.0-beta → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,6 +34,8 @@
34
34
  * [Blocks that store data in two places](#blocks-that-store-data-in-two-places)
35
35
  * [Post types AI agents can create](#post-types-ai-agents-can-create)
36
36
  * [Storage-mode scan + reset](#storage-mode-scan--reset)
37
+ * [Security](#security)
38
+ * [Seal mode (Claude Desktop)](#seal-mode-claude-desktop)
37
39
  * [Examples](#examples)
38
40
  * [Testing](#testing)
39
41
  * [Requirements](#requirements)
@@ -175,7 +177,7 @@ These can coexist. Block MCP could (and likely will) be exposed through the offi
175
177
  AI Agent ←stdio→ MCP server (your machine) ←HTTPS→ WordPress plugin (your site)
176
178
  ```
177
179
 
178
- **WordPress plugin** (`wordpress-plugin/gk-block-api/`) — REST API at `gk-block-api/v1`. Handles block parsing, serialization, safety checks, preference scoring, rate limiting, revisions. Works with any post type that stores Gutenberg blocks in `post_content`.
180
+ **WordPress plugin** (`wordpress-plugin/gk-block-mcp/`) — REST API at `gk-block-api/v1`. Handles block parsing, serialization, safety checks, preference scoring, rate limiting, revisions. Works with any post type that stores Gutenberg blocks in `post_content`.
179
181
 
180
182
  **MCP server** (`src/`) — TypeScript stdio server that exposes the REST API as MCP tools. Authenticates as a normal WordPress user via Application Password. No special privileges, no direct DB access from the MCP side.
181
183
 
@@ -183,14 +185,14 @@ AI Agent ←stdio→ MCP server (your machine) ←HTTPS→ WordPress plugin
183
185
 
184
186
  ### 1. Install the WordPress plugin
185
187
 
186
- **Easiest — download the latest ZIP:** [gk-block-api.zip](https://github.com/GravityKit/block-mcp/releases/download/latest/gk-block-api.zip) (auto-built from `main` on every push).
188
+ **Easiest — download the latest ZIP:** [gk-block-mcp.zip](https://github.com/GravityKit/block-mcp/releases/download/latest/gk-block-mcp.zip) (auto-built from `main` on every push).
187
189
 
188
190
  Then in WordPress: **Plugins → Add New → Upload Plugin** and pick the ZIP.
189
191
 
190
- Or copy `wordpress-plugin/gk-block-api/` to your site's `wp-content/plugins/` and activate manually. Or via WP-CLI:
192
+ Or copy `wordpress-plugin/gk-block-mcp/` to your site's `wp-content/plugins/` and activate manually. Or via WP-CLI:
191
193
 
192
194
  ```bash
193
- wp plugin install https://github.com/GravityKit/block-mcp/releases/download/latest/gk-block-api.zip --activate
195
+ wp plugin install https://github.com/GravityKit/block-mcp/releases/download/latest/gk-block-mcp.zip --activate
194
196
  ```
195
197
 
196
198
  ### 2. Connect your AI assistant
@@ -231,8 +233,9 @@ In WordPress admin: **Users → Profile → Application Passwords**. Or via CLI:
231
233
  wp user application-password create <username> "Block MCP" --porcelain
232
234
  ```
233
235
 
234
- The user needs at minimum the `edit_posts` capability for any post you want to
235
- read or write. Then build and register the server:
236
+ Read endpoints require the `edit_posts` capability; write endpoints require
237
+ `edit_post` on the specific post being changed. Then build and register the
238
+ server:
236
239
 
237
240
  ```bash
238
241
  git clone https://github.com/GravityKit/block-mcp
@@ -374,6 +377,30 @@ The scan walks every published post and classifies each distinct block as static
374
377
 
375
378
  ![Storage scan and reset](docs/screenshots/settings-scan-reset.png)
376
379
 
380
+ ## Security
381
+
382
+ Block MCP gives an AI assistant exactly the access it needs to edit content — and nothing more.
383
+
384
+ - **A separate, limited account.** Connecting creates a dedicated account just for the assistant. It can write and edit your posts, pages, and media, but it can't change site settings, delete other people's content, or sign in to your dashboard — and disconnecting it removes all of that access at once. (You can connect through your own account instead; it's clearly marked as the higher-access option, and a site owner can turn that option off entirely.)
385
+ - **Your password stays private.** It's never shown in a web address or saved to your browser history, and the connection is set up locally on your own computer. Any config files written are readable only by you.
386
+ - **Stored secrets are encrypted.** Any credential held between setup steps is encrypted (AES‑256‑GCM) before it's saved, and cleared once it's used — never kept as plain text.
387
+ - **The assistant can't inject code.** Everything it writes is sanitized, so it can't slip scripts or trackers into your pages.
388
+
389
+ ### Seal mode (Claude Desktop)
390
+
391
+ The one-click Claude Desktop installer can either include your credential or leave it out:
392
+
393
+ | Mode | What happens |
394
+ |---|---|
395
+ | `prefill` *(default)* | The installer includes the password, so setup is one click; Claude Desktop saves it to your OS keychain. |
396
+ | `paste` | The installer leaves the password out — you paste it in yourself, so it never lands in a downloaded file. |
397
+
398
+ Developers can force paste mode with a filter, or by defining `GK_BLOCK_MCP_FORCE_PASTE_SECRET` as `true` in `wp-config.php`:
399
+
400
+ ```php
401
+ add_filter( 'gk/block-mcp/credential/seal-mode', fn() => 'paste' );
402
+ ```
403
+
377
404
  ## Examples
378
405
 
379
406
  **Update a heading by URL**
@@ -415,7 +442,7 @@ Run all suites locally:
415
442
  npm test
416
443
 
417
444
  # PHP (PHPUnit, stub WP bootstrap) — 335 tests
418
- cd wordpress-plugin/gk-block-api && phpunit -c tests/phpunit.xml
445
+ cd wordpress-plugin/gk-block-mcp && phpunit -c tests/phpunit.xml
419
446
  ```
420
447
 
421
448
  The PHP suite uses a minimal WordPress stub layer (no full WP install required) to exercise validation, error paths, mutation engine, ref resolution, HTML auto-transforms, post lifecycle, term listing, media validation, and REST summary/outline.