Use Composer through Secure MCP Tunnel and ChatGPT
ChatGPT connects to remote MCP servers. When the Composer endpoint must remain private, OpenAI Secure MCP Tunnel provides an outbound-only path without opening inbound firewall ports or publishing the private server URL.
The tunnel is optional. Composer and the WordPress MCP Adapter also support direct compatible MCP clients.
Architecture and trust boundaries
ChatGPT or another supported OpenAI product
|
OpenAI-hosted tunnel endpoint
|
outbound HTTPS polling
|
tunnel-client inside your network
|
private Composer MCP endpoint
|
WordPress authentication + smartcloud_agent capability
tunnel-client authenticates to the OpenAI tunnel control plane and forwards MCP JSON-RPC between the hosted tunnel endpoint and the private WordPress server. WordPress still authenticates the dedicated <agent-user> and Composer still enforces its own draft-only capability, contract, ownership, and validation checks.
Prerequisites
Complete Direct MCP Setup first and verify the Composer server from inside the private network.
You also need:
- a tunnel created in OpenAI Platform tunnel settings,
- Tunnels Read + Manage to create or edit it,
- Tunnels Read + Use to run or select it,
- a runtime API key stored only on the tunnel host,
- outbound HTTPS access to
api.openai.com:443, - access to ChatGPT developer mode under the current plan and workspace policy.
Platform tunnel permissions and ChatGPT workspace permissions are separate. Associate the tunnel with every Platform organization and ChatGPT workspace that should be allowed to discover it.
Install and configure tunnel-client
Download the current tunnel-client from Platform tunnel settings or the official OpenAI release repository. Follow the latest-release link rather than hard-coding a binary version in an operational runbook.
For a WordPress host where WP-CLI is available, the most direct private setup is an stdio profile. The command must select Composer's dedicated MCP server; a different server ID may expose a different tool catalog even when Composer is installed and current.
export CONTROL_PLANE_API_KEY="<runtime-api-key>"
tunnel-client init \
--sample sample_mcp_stdio_local \
--profile <connector-profile> \
--tunnel-id <tunnel-id> \
--mcp-command "wp --path=<wordpress-root> mcp-adapter serve --server=smartcloud-agent-composer --user=<agent-user>"
tunnel-client doctor --profile <connector-profile> --explain
tunnel-client run --profile <connector-profile>
The WordPress root and agent identity are installation-specific. Public examples
must retain placeholders; use the real values only in the protected runtime
profile. The selected WordPress user must have the smartcloud_agent role.
For an already-running private HTTP MCP endpoint, initialize a separate HTTP profile instead:
tunnel-client init \
--profile <connector-profile> \
--tunnel-id <tunnel-id> \
--mcp-server-url "<mcp-endpoint>"
Configure WordPress authentication through the tunnel client's supported
MCP-side authentication mechanism or a private local proxy. Do not place the
WordPress application password in the Config Set, command line, or source
control. Keep the process running as a supervised service only after doctor
reports healthy and ready.
Before scanning tools in ChatGPT, inspect the running tunnel process or its
local /ui and confirm that it targets smartcloud-agent-composer. A successful
health check proves that the daemon is alive; it does not prove that the profile
selected the intended WordPress MCP server. The discovered tools should use the
smartcloud-agent-composer-* prefix and include Blueprint, design-context,
validation, draft, and preview operations.
Create the ChatGPT custom MCP app/plugin
OpenAI's interface and plan availability can change; follow the current developer-mode guide and plugin connection guide.
The current flow is:
- Enable Developer mode in the location allowed by the ChatGPT workspace policy.
- Open the ChatGPT Plugins/Apps page and create a developer-mode app.
- Enter a clear name and description such as SmartCloud Agent Composer and Governed WordPress Gutenberg draft creation and preview.
- Choose Tunnel as the connection type.
- Select the associated tunnel or enter its
<tunnel-id>. - Scan tools and complete authentication if prompted.
- Review every discovered tool and its write/modify annotation before creating the app.
Custom MCP write support and developer-mode availability depend on the ChatGPT plan and workspace policy. Do not describe the connection as an OpenAI-verified integration unless it has completed the applicable OpenAI review.
Test safely
Start a new chat, enable only the Composer app, and use a bounded prompt:
Load the active Composer blueprint for <page-type>, inspect the theme design
context and approved patterns, validate a minimal plan, create one agent-owned
WordPress draft, and return its preview. Do not publish, delete normal content,
upload media, or change plugins, themes, users, or configuration.
Verify:
- ChatGPT selects the Blueprint, design-context, pattern, validation, draft, and preview tools in the expected order;
- WordPress contains a draft rather than a published item;
- the preview validation report is clean;
- the Composer audit log records the authenticated actor and outcome;
- unsupported publishing or deletion requests do not produce an executable Composer tool.
Troubleshooting
- Tunnel absent in ChatGPT: confirm workspace association and Tunnels Read + Use permission.
- Tool scan fails: keep
tunnel-client runactive, inspect its local/ui, and rundoctor --explain. - Transport works but WordPress rejects calls: fix the dedicated WordPress identity or MCP-side authentication; do not grant administrator access.
- Old or unrelated tools appear: first verify that the tunnel profile launches
--server=smartcloud-agent-composer, then restart the supervised tunnel process. Refresh the app's actions after reviewing the tool-definition diff. If the current ChatGPT plan does not allow a published app to be updated, recreate and republish it. - Calls time out: confirm outbound access to the OpenAI control plane and local reachability from the tunnel host to
<mcp-endpoint>. - Composer validation fails: treat this as a contract or active-theme mismatch, not a tunnel failure.
Only trusted MCP servers should be connected. Prompt injection and overbroad tool permissions remain application-level risks even when the network path is private.
