Skip to content

Commit dae1ce0

Browse files
committed
docs: update MCP config filterability docs
Update MCP.md with config-section model, per-feature show_in_rest/show_in_mcp flags, and new model config examples. Sync CURRENT.md and ROADMAP.md.
1 parent 313560a commit dae1ce0

3 files changed

Lines changed: 42 additions & 15 deletions

File tree

docs/CURRENT.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Current: Live Working State
22

33
## Working
4-
- Phase 5A: Block Editor integration — Blocks feature service, per-CPT block registration, default templates @since 2026-07-06
4+
- Phase 5A: Block Editor integration — Blocks feature service, per-CPT block registration, default templates @since 2026-07-08
55
- Phase 5D: Documentation — fill README placeholders, add model examples @since 2026-07-05
66

77
## Next
@@ -111,6 +111,7 @@
111111
- MetaController PUT route: `update_item` + `update_item_permissions_check` at `PUT /saltus-framework/v1/meta/{post_type}/{post_id}` with serialized meta merging; UpdateMetaFields MCP tool and MetaControllerTest + UpdateMetaFieldsTest added — 1 commit @since 2026-07-07
112112
- Test suite: 226 tests, 639 assertions (bumped from 214/605 by +12 tests, +34 assertions for new MCP tool, MetaController PUT, and count updates) @since 2026-07-07
113113
- ModelsController: use `check_method` for description property access to prevent PHP 8.2+ dynamic property deprecation notices @since 2026-07-07
114+
- MCP namespace config filterability: added MCPConfig utility class with 3 WordPress filters (saltus/framework/mcp/namespace, saltus/framework/mcp/ability_category, saltus/framework/mcp/ability_prefix); added mcp_route() helper to RestTool base; refactored 21 source files from hardcoded strings to MCPConfig calls; added MCPConfigTest with 13 test cases — 6 commits, 236 tests, 655 assertions @since 2026-07-08
114115

115116
## Known Issues
116117
- `composer test` passes; Composer still prints a dependency deprecation notice from `justinrainbow/json-schema` under PHP 8.5.4.

docs/MCP.md

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For client implementation guidance, see [MCP-CLIENTS.md](MCP-CLIENTS.md). For th
1111
- Supported path: WordPress-native MCP/Abilities
1212
- Standalone stdio server: removed
1313
- SSE transport: out of scope
14-
- Current ability count: 17
14+
- Current ability count: 18
1515
- REST namespace: `saltus-framework/v1`
1616
- Ability namespace: `saltus/*`
1717

@@ -109,7 +109,9 @@ Saltus reuses WordPress capability checks such as:
109109
| Settings updates | `manage_options` |
110110
| Term creation | taxonomy edit/manage capability |
111111

112-
REST routes are also gated by model configuration. For model-scoped Saltus REST/MCP features, set `saltus_rest` in the model options.
112+
REST routes are also gated by model configuration. The master `show_in_rest` option acts as both the WordPress core registration gate and the Saltus REST gate. Each Saltus feature (meta, settings, duplicate, export, reorder) can be independently enabled or disabled using a `show_in_rest` flag in its own config section within the model's `config` key. The `models` and `health` capabilities are always enabled when `show_in_rest` is not false for that model (or always, for health).
113+
114+
Similarly, MCP tools are gated by the `mcp_tools` master option at the model level, and each feature can be independently gated with `show_in_mcp` in its config section. When `mcp_tools` is absent or false, no MCP tools are generated for that model. When `mcp_tools` is true, all features are enabled for MCP unless a feature's `show_in_mcp` is explicitly `false`.
113115

114116
Enable all Saltus REST-backed capabilities for a model:
115117

@@ -119,29 +121,52 @@ return [
119121
'name' => 'book',
120122
'options' => [
121123
'show_in_rest' => true,
122-
'saltus_rest' => true,
124+
'mcp_tools' => true,
123125
],
124126
];
125127
```
126128

127-
Enable only selected capabilities:
129+
Enable REST for all features but block MCP for specific features:
128130

129131
```php
130132
return [
131133
'type' => 'cpt',
132134
'name' => 'book',
133135
'options' => [
134136
'show_in_rest' => true,
135-
'saltus_rest' => [
136-
'models' => true,
137-
'meta' => true,
138-
'settings' => true,
137+
'mcp_tools' => true,
138+
],
139+
'config' => [
140+
'meta' => [
141+
'show_in_rest' => true,
142+
'show_in_mcp' => false,
143+
],
144+
'settings' => [
145+
'show_in_rest' => true,
146+
],
147+
'features' => [
148+
'duplicate' => [
149+
'show_in_rest' => true,
150+
],
151+
'single_export' => [
152+
'show_in_rest' => true,
153+
],
154+
'drag_and_drop' => [
155+
'show_in_rest' => true,
156+
],
139157
],
140158
],
141159
];
142160
```
143161

144-
If `show_in_rest` is explicitly `false`, Saltus does not expose model-scoped REST/MCP routes for that model. The health ability is framework-scoped and remains independent of per-model `saltus_rest` opt-in.
162+
If `show_in_rest` is explicitly `false`, Saltus does not expose model-scoped REST or MCP routes for that model. The health ability is framework-scoped and remains independent of per-model opt-in.
163+
164+
Config section keys:
165+
- `meta` — top-level key in `config`
166+
- `settings` — top-level key in `config`
167+
- `duplicate` — nested under `config.features.duplicate`
168+
- `single_export` — nested under `config.features.single_export`
169+
- `drag_and_drop` — nested under `config.features.drag_and_drop`
145170

146171
## Available Abilities
147172

@@ -204,7 +229,7 @@ The `get_health` ability calls `GET /saltus-framework/v1/health`. It reports:
204229
- cache enabled state
205230
- rate limit enabled state
206231

207-
The health route requires `edit_posts` by default. It is not tied to a specific CPT model and does not require `saltus_rest` model opt-in.
232+
The health route requires `edit_posts` by default. It is not tied to a specific CPT model and does not require model opt-in.
208233

209234
## Runtime Controls
210235

@@ -276,16 +301,16 @@ Audit retention cleanup runs through the daily `saltus_framework_mcp_audit_clean
276301
|-------------|----------|
277302
| WordPress with Abilities API | Saltus registers `saltus/*` abilities |
278303
| WordPress without Abilities API | Saltus skips native ability registration |
279-
| REST disabled for a model | Model-scoped Saltus MCP routes are unavailable for that model |
280-
| `show_in_rest` set to `false` | Model-scoped Saltus REST/MCP routes are unavailable |
304+
| `mcp_tools` not set or `false` | No MCP tools are generated for that model |
305+
| `show_in_rest` set to `false` | Model-scoped Saltus REST and MCP routes are unavailable for that model |
281306
| No WordPress-native MCP client | Saltus abilities are registered, but no client consumes them |
282307

283308
## Troubleshooting
284309

285310
| Symptom | Check |
286311
|---------|-------|
287312
| No `saltus/*` abilities appear | Confirm the WordPress build provides the Abilities API and the plugin is active |
288-
| A model is missing from MCP results | Confirm the model has `show_in_rest` enabled and `saltus_rest` configured |
313+
| A model is missing from MCP results | Confirm the model has `show_in_rest` and `mcp_tools` enabled, and required feature-level `show_in_mcp` flags |
289314
| A write operation fails | Confirm the current WordPress user has the needed post, taxonomy, or settings capability |
290315
| Calls are throttled | Check `saltus/framework/mcp/rate_limit/*` filters |
291316
| Results look stale | Clear transients or disable MCP cache while testing |

docs/ROADMAP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
- Phase 3 hardening complete: caching, rate limiting, audit trail, structured error codes, health monitoring
99
- PHPStan Level 7 clean across the configured analysis set as of 2026-07-02, including the asset loading helper path
1010
- MCP v1 refactoring complete: per-tool REST dispatch, RestBackedToolInterface, ToolContributor, @phpstan-type AbilityDefinition
11+
- MCP namespace/category/prefix now filterable via MCPConfig utility class (saltus/framework/mcp/namespace, saltus/framework/mcp/ability_category, saltus/framework/mcp/ability_prefix)
1112
- Legacy refactoring: inline REST controller logic extracted into shared service classes (SaltusSingleExport, MetaFieldProvider, ReorderPostsService, SettingsManager) wired into both REST controllers and MCP tools — resolved 2026-07-03
1213
- Conditional registration fix: `is_needed()` gate bypass for RestRouteProvider/ToolContributor registries via two-pass approach in `Core`, ensuring REST routes always appear in WP-REST index even before `REST_REQUEST` is defined — resolved 2026-07-06
13-
- 226 PHPUnit tests passing (639 assertions), PHPStan Level 7 clean across the configured analysis set
14+
- 236 PHPUnit tests passing (655 assertions), PHPStan Level 7 clean across the configured analysis set
1415
- **v2.0.0 released 2026-06-30** — MCP, REST API, and Phase 3 shipped
1516

1617
## Top Priority: WordPress 7.0 MCP/Abilities Integration

0 commit comments

Comments
 (0)