Alibaba terminal agent, Native OAuth
Qwen Code WordPress MCP. httpUrl, not url.
Qwen Code WordPress MCP entries have one trap: in settings.json, httpUrl means Streamable HTTP and url means SSE. GoBuildWP serves Streamable HTTP, so an entry copied from another client's guide with url connects to the wrong transport and fails. Qwen Code runs OAuth itself and can add the server with one qwen mcp add command.
Checked against Qwen Code's documentation on 29 September 2026, entries from GoBuildWP Free 1.18.6
{
"mcpServers": {
"gobuildwp-your-site-com": {
"httpUrl": "https://your-site.com/wp-json/mcp/wppilot-oauth",
"oauth": {
"enabled": true
}
}
}
}- Config
- ~/.qwen/settings.json or .qwen/settings.json
- Remote key
- httpUrl
- Sign in
- /mcp auth <name>
Connect screen
The Qwen Code entries GoBuildWP writes
Both of GoBuildWP's remote entries for Qwen use httpUrl. The OAuth entry is httpUrl with the OAuth URL and an oauth block set to enabled: true, with no client id or endpoints, because Qwen registers itself dynamically. The token entry is httpUrl with an Authorization header. The Application Password entry is the stdio npx bridge.
| OAuth 2.1 | httpUrl with the OAuth URL and oauth.enabled set to true. Qwen discovers the endpoints and registers itself; /mcp auth runs the sign-in on demand. |
|---|---|
| Access token | httpUrl plus headers. qwen mcp add --transport http with --header writes the same thing. |
| Application Password | The npx bridge as a command entry. |
Endpoints on your site: /wp-json/mcp/wppilot-oauth for OAuth, /wp-json/mcp/wppilot for tokens and passwords. Through the optional GoBuildWP Cloud instead, every client uses https://app.gobuildwp.com/mcp with the server name gobuildwp, and a personal Cloud token is read from GOBUILDWP_TOKEN where the client supports environment variables.
qwen mcp add --transport http gobuildwp-your-site-com \
https://your-site.com/wp-json/mcp/wppilot-oauth
# then inside Qwen Code:
# /mcp auth gobuildwp-your-site-com{
"mcpServers": {
"gobuildwp-your-site-com": {
"httpUrl": "https://your-site.com/wp-json/mcp/wppilot",
"headers": {
"Authorization": "Bearer wpp_YOUR-ACCESS-TOKEN"
}
}
}
}First task
A first Qwen task
Use Qwen to review media without changing it.
Use the WordPress MCP server. Read only.
1. wppilot/list-media: the 20 newest images.
2. wppilot/audit-media-alt on the same range.
3. List images over 1 MB or missing alt text,
with their attachment IDs.Setup
Add WordPress to Qwen Code
Qwen Code is a Gemini CLI fork and kept Gemini's httpUrl convention, unlike Antigravity, which moved to serverUrl.
Add with the CLI
qwen mcp add --transport http, the name and the URL. -s chooses user or project scope; --header adds a token; --include-tools and --exclude-tools filter tools.
Or edit settings.json
Under mcpServers, set httpUrl. Keep url out of it unless you mean SSE.
Sign in
The first 401 starts OAuth; /mcp auth with the server name does it on request. The callback listens on localhost port 7777.
Protect the stored token
Treat stored credentials as sensitive. Follow the installed client documentation for credential storage and platform file permissions. Claim encryption only when an exact supported setting and version have been verified.
Decide on trust
trust: true skips confirmations, and only in trusted workspaces. Leave it false for a live site.
Verify the connection before allowing changes
Select Read Only explicitly; the default is Production Safe. Use a dedicated identity with manage_options on a single site, or superadmin on multisite. Match the named tool call, site URL and returned record ID against WordPress.
Use the gobuildwp-your-site-com MCP server in Qwen Code. Do not change anything.
1. Report the active GoBuildWP safety profile.
2. List the abilities this connection can see.
3. Call wppilot/get-site-settings and report the site URL and locale.
4. Call wppilot/list-content for the five newest pages,
then wppilot/get-content on one of them.
5. Name every ability you called and each WordPress ID you read.These setup instructions are not a recorded live-client test. Keep credentials out of repositories, logs and shared files.
Inside Qwen Code
Reading Qwen's /mcp dialog
/mcp opens a dialog with each server's status, tools, prompts, resources and authentication, with a Ready or Disconnected indicator. The status bar shows how many MCP servers are ready. qwen mcp list gives the same list outside a session, and --debug prints verbose connection output.
Qwen gives remote servers five seconds to be discovered and each call up to 600,000 ms by default. Tool names longer than 63 characters are shortened with a run of three underscores in the middle, and invalid characters become underscores, so long WordPress ability names may look different in Qwen than on the site.
includeTools and excludeTools on a server, and mcp.allowed or mcp.excluded globally, control what is offered; an exclusion always wins.
Signs it worked
- /mcp shows the server Ready
- Authentication shows as complete
- The token file is encrypted or locked down
- trust is false
Troubleshooting
Qwen Code errors and their causes
| Symptom | Cause and fix |
|---|---|
| The server connects then fails, or hangs | The entry uses url, which Qwen treats as SSE. Change it to httpUrl. |
| Discovery timeout | Remote discovery waits five seconds. Check the site's response time; a cold host may need a warm-up request. |
| A tool name looks truncated | Qwen shortens names over 63 characters. The call still reaches the right ability. |
| OAuth callback fails | Something else is using port 7777 on localhost. Free it, or set redirectUri in the oauth block. |
Qwen Code beyond the media review
Fixing the images Qwen Code found
The read-only media review returns attachment IDs for oversized images and images with no alt text. Both have a GoBuildWP ability, and both are safe to try on a staging site set to Production Safe because neither throws the original away. For alt text, have Qwen look at each image with wppilot/get-media-image before writing anything, then save a small batch with wppilot/update-image-alt and run wppilot/audit-media-alt again to confirm.
For an image that is far larger than the layout ever shows, wppilot/edit-image can resize it with WordPress's own image editor. Its default mode saves the result as a new attachment and leaves the original untouched; replace mode writes a new file for the same attachment the way the Edit Image screen does and keeps the old file as a backup. Start with the default so nothing already on a page changes, and compare the two before deciding which one the page should use. Swapping the image on the page is then a separate, visible edit you can check in the ledger, rather than a side effect hidden inside the resize.
- "For the three largest images, show each with wppilot/get-media-image and propose a maximum width based on where they appear."
- "Resize image ID 123 to 1600 px wide with wppilot/edit-image in copy mode and give me the new attachment ID."
Why trust stays false on the WordPress entry
Qwen Code's trust setting on a server skips its confirmation prompts for every tool that server offers. On a coding tool that only reads files that might be tolerable; on a WordPress server it means every write the site's profile allows runs without you seeing the arguments. Keep trust false and use includeTools to decide which abilities Qwen can see at all.
Remember that the site has the final word either way. A write Qwen runs without asking is still checked against the WordPress user's capabilities, the safety profile and any confirmation the ability requires (by default the agent supplies that confirmation itself, unless A person approves is on), and it lands in the change ledger. Those are the checks to rely on; Qwen's prompts are the ones that let you catch a mistake before it reaches them.
A Qwen Code setup that cannot write by accident
Qwen Code's tool filters have one property worth using deliberately: an exclusion always wins over an inclusion. Put the WordPress write abilities you never want Qwen to call in mcp.excluded, or in excludeTools on the server, and no includeTools entry in a project file can bring them back by mistake. Reads stay available everywhere, and a session that needs a particular write gets it from an explicit change to the exclusion, not from a forgotten setting.
Pair that with the site's own controls. Production Safe blocks the critical class outright (code execution, filesystem, WP-CLI, database and admin-access abilities) but still lets destructive writes such as deletions run once they are confirmed; Read Only refuses every write. Qwen's filters decide what the model is shown, GoBuildWP decides what runs.
Carrying a Gemini CLI entry, and the Cloud option
Because Qwen Code kept Gemini CLI's httpUrl convention, a WordPress entry from an old Gemini setup usually works as it is, while the same entry in Antigravity would need renaming. Re-authenticate with /mcp auth rather than copying token files between tools; each client should hold its own grant so revoking one does not cut off the other.
GoBuildWP Cloud names Gemini CLI, not Qwen Code, among its tested OAuth apps. Given the shared convention, an httpUrl entry for the Cloud link with oauth enabled is the obvious thing to try, but treat it as unverified until a sign-in completes and a read returns. Without Cloud, Qwen talks to the site directly with no account and no relay.
FAQ
Qwen Code questions
Does Qwen Code support OAuth for remote MCP servers?
Yes. Its default dynamic_discovery provider reacts to a 401, discovers the authorization server and registers itself. /mcp auth runs it on demand.
Why does Qwen Code use httpUrl?
Qwen Code inherited the convention from Gemini CLI: httpUrl for Streamable HTTP, url for SSE, command for stdio.
Is a Gemini CLI WordPress entry usable in Qwen Code?
Yes, since both use httpUrl in settings.json. It is not usable in Antigravity, which requires serverUrl.
Related
Related guides
- Antigravity CLI: the Gemini CLI successor, with serverUrl
- Kimi Code CLI: a url-only entry and a sign-in from /mcp-config
Qwen Code documentation read on 29 September 2026
Connect Qwen Code with httpUrl.
One qwen mcp add, one /mcp auth, and trust left off.