Connect the Claude Code app to WordPress: Search Insights and Content Review
The Claude Code app does not see the environment variables of a terminal tab. If you run claude mcp add with --header "Authorization: Bearer $VARIABLE" while the variable is empty, the config gets only the word Bearer with no token, and the site answers 401 (the code baza_helper_si_auth). The steps below avoid the variable: the token or the address goes straight into the command.
Connect Search Insights
- Open Baza Helper > Search Insights, the block with the tokens, and switch on MCP address and Routes for assistants.
- Press Make a token, give it a name such as Claude Code and an expiry, and copy it. The token is shown once.
- Right under the token the plugin shows two ready commands with the real token in them. Run the first if the entry already exists, because otherwise the second says “already exists”. You can add the option
-s localfor the scope.
claude mcp remove baza-search
claude mcp add --transport http baza-search <MCP address> --header "Authorization: Bearer <token>"- Run
claude mcp listand check thatbaza-searchsays Connected. - Restart the session of the app, then ask it to call
search_statusfirst.
Do not show the output of claude mcp get: it prints the token. The button Test the connection calls the status route of the site and answers ok, or 401 for an empty or invalid token.
Connect Content Review without a password
Open Content Review > Setup, the card Connector without a password (ChatGPT, Claude Code app), which was called “ChatGPT connector (without a Custom GPT)” before. It makes a long secret MCP address that needs no headers, no variables and no password. Under the new address the plugin shows two commands:
claude mcp remove baza-content-review
claude mcp add --transport http baza-content-review "<address>"- Run the first command if the entry exists, then the second one with your address.
- Run
claude mcp listand check thatbaza-content-reviewis Connected. - Restart the session, then ask: “List my funnels” or “Show the latest 3 posts”.
The command claude mcp get prints the address, so do not show its output. The Claude tab in step 2 of Setup now points the app to this connector, or to the private file ~/.config/baza/cr.env from step 1.
If you see 401 or Not connected
- 401: the token is empty, wrong or expired. Make a new token and run
claude mcp remove baza-searchand the add command again with the token written in the line, not in a variable. - “already exists”: run the remove command first, with
-s localif the entry is in the local scope. - Not connected: restart the session of the app, then check
claude mcp listagain. - Check the address: it must be the https address of the site shown by the plugin, copied whole.
- Press Test the connection in Search Insights: ok means the token works, 401 means it does not.
A file for scripts
For scripts such as curl, keep the token in the file ~/.config/baza-search-token with permissions 600 and read it from the file, not from a variable of the terminal tab:
chmod 600 ~/.config/baza-search-token
TOKEN=$(cat ~/.config/baza-search-token)Questions
Why not use an environment variable for the token?
The Claude Code app does not see the variables of your terminal tab. An empty variable writes “Bearer” with no token into the config, and the site answers 401.
Can I connect ChatGPT on the web or claude.ai?
Search Insights does not connect to the web versions of ChatGPT and claude.ai through OAuth yet. For ChatGPT, use the connector described in AI assistant API: funnels, internal links and ChatGPT in the browser.
Where is the token shown?
Only once, when you make it. If you lose it, make a new token and revoke the old one. More on setup in Search Insights Setup: Step by Step and Content Review Setup: Connect an AI Assistant.
