# Direct MCP Setup for Agent Composer

Composer registers a dedicated server at `<wordpress-url>/wp-json/mcp/smartcloud-agent-composer`. The separate official WordPress MCP Adapter supplies the transport that compatible MCP clients use to discover and invoke Composer's registered WordPress Abilities.

The client supplies natural-language reasoning and content generation. Composer acts as the constrained WordPress execution layer: it checks the active Config Set and Blueprint, validates the operation, and creates a draft for human review rather than designing or publishing a website.

The minimum setup is WordPress 6.9 or newer, PHP 8.1 or newer, an active Composer plugin, one validated and active Config Set, the active WordPress MCP Adapter, HTTPS for remote HTTP access, and a dedicated user with the `smartcloud_agent` role.

Do not use an administrator account for execution. Store the dedicated account's application password or token in the MCP client's secret store, not in Config Set JSON, source control, screenshots, logs, or prompts.

Before connecting, verify the active Config Set and endpoint under **SmartCloud -> Agent Composer -> Overview**. Then inspect the server with an MCP-compatible inspector or client and confirm that tool schemas and authentication errors are understandable.

The governed drafting sequence is:

1. load the requested page Blueprint;
2. load the active design context;
3. list approved patterns;
4. read approved references or search existing media only when needed;
5. validate the proposed sections without saving;
6. create an agent-owned draft with a unique idempotency key;
7. load the preview and return validation results for human review.

When a writable field is a relation, follow the workflow returned by `get-content-field-contract`: resolve each human title or slug with `search-relation-targets`, take only the returned `matches[].id` values, write them with `update-content-fields`, and verify the stored order with `inspect-content-fields`. `list-content-drafts` lists editable or adoptable content and must not be used to discover relation IDs.

When taxonomy access is enabled, call `get-taxonomy-contract`, then `search-taxonomy-terms`. Reuse an exact `matches[].term_id`; call `create-taxonomy-term` only when no suitable public term exists and creation is explicitly confirmed. Assign the policy-approved IDs to the agent-owned draft with current concurrency tokens through `assign-taxonomy-terms`, then read them back with `inspect-taxonomy-terms`. A new term requires a natural public name, durable slug, standalone archive description, and the Blueprint's content language.

Draft updates require the current `modified_gmt` and revision token. If another editor saved first, reload and review the conflict instead of forcing an overwrite.

Composer exposes no publishing, normal-content deletion, general-purpose media upload, theme or plugin management, or user-management operation. Existing Media Library search and assignment remain constrained by the active contract. Optional remote raster ingestion additionally requires its dedicated capability, an enabled Site Contract policy, an exact approved HTTPS host, an admitted image MIME type, and the configured byte limit; it rejects redirects and unsafe URL/network forms. A safe acceptance test must end with a WordPress Draft and a human-readable preview.

Official transport source: https://github.com/WordPress/mcp-adapter
