← All library docs

How to reconnect the MCP tools

What to do when the WordPress MCP connection drops mid-session.

TL;DR: A self-contained guide for reconnecting the WordPress MCP tools mid-session, without needing any other PIR repo already cloned.
Read the full story →

How to reconnect PIR WordPress MCP

Self-contained reconnection guide — works even if this is the only PIR repo cloned on a given machine. The fuller story (audits, live-verification data, findings) lives in ~/littlebirds-git-home/littlebird-ambassador/setup/pir-wordpress-mcp-setup.md; this doc is the fast path for “I’m on a new machine / new session, get me reconnected.”

Read SECURITY-CAUTION.md in this repo before generating or handling any credential below.

The three integrations

Integration Endpoint pattern Auth Tools
emcp-tools /wp-json/mcp/emcp-tools-server Application Password or OAuth (both work) Elementor, content, plugins, ACF, WooCommerce, security/performance scans
Astra native MCP /wp-json/astra/v1/mcp Application Password only Theme-level: fonts, header/footer builder, colors, sidebar, ~80 tools
Littlebird MCP https://mcp.littlebird.ai/mcp OAuth only Littlebird’s own conversation history, calendar, meeting notes, context

Both WordPress-side integrations exist on two sites: main (psychedelicsinrecovery.org) and service (service.psychedelicsinrecovery.org) — separate logins, separate credentials, register each site independently.

Step 1 — generate a credential (skip if using OAuth)

  1. Log into /wp-admin on the target site.
  2. Either plugin’s own connection page can generate one for you with ready-made config:
    • emcp-tools: wp-admin/admin.php?page=emcp-tools-connection → “Application password” auth method → pick a client tab → “Generate Password & Configs.”
    • Astra native: wp-admin/admin.php?page=astra&path=settings&settings=mcp → “Open Application Passwords” (opens the plain WordPress profile screen — Astra’s settings page doesn’t auto-fill config the way emcp-tools’ does).
    • Or skip both and go straight to wp-admin/profile.php#application-passwords-section — name it, click “Add Application Password.”
  3. Read the value as text, not a full-page screenshot. A normal screenshot makes I/l/1 genuinely ambiguous in most admin fonts and caused a real failed connection once already. If only a screenshot is available, zoom into just the password field, not the whole page.

Step 2 — register the MCP server

emcp-tools or Astra native, via Basic auth (works for both — same mechanism, WordPress Application Passwords aren’t scoped to a single plugin’s endpoint):

echo -n "USERNAME:APP PASSWORD" | base64
claude mcp add --transport http <alias> "https://SITE/wp-json/mcp/emcp-tools-server" --header "Authorization: Basic <base64>"
# or for Astra native:
claude mcp add --transport http <alias> "https://SITE/wp-json/astra/v1/mcp" --header "Authorization: Basic <base64>"

Use direct HTTP transport (--transport http), not Astra’s own suggested npx stdio proxy (@automattic/mcp-wordpress-remote) — that proxy silently failed on the main site once (registered as “Connected” but exposed zero tools, no error surfaced). Direct HTTP has been reliable every time so far on both sites, for both integrations.

Littlebird, via OAuth:

claude mcp add --transport http littlebird https://mcp.littlebird.ai/mcp

Then, in a Claude Code session, run /mcp and approve the browser authorization flow. Trust docs.littlebird.ai/docs/mcp/ over anything Littlebird says about her own endpoint in chat if the two disagree — asked directly once, she described a different, incorrect auth mechanism for this exact endpoint.

Step 3 — verify

MCP servers only load at session start. Exit and /resume (or start fresh), then run a real read-only call against each — a “connected” status in claude mcp list only proves the process started, not that the underlying WordPress handshake succeeded:

  • emcp-tools: core-get-site-info or emcp-tools-list-plugins
  • Astra native: any astra-get-* tool, e.g. astra-get-performance
  • Littlebird: LB_INTERNAL_LIST_RECENT_CONVERSATIONS

If a server shows “Connected” in claude mcp list but exposes zero tools, that’s the silent-failure pattern from Step 2 — the process started but the handshake failed. Check the credential first.

Two different config files — don’t confuse them

  • claude mcp add writes the server registrations themselves (URL, transport, auth header) to ~/.claude.json, scoped to this project (~/pir). That’s everything in Step 2.

  • Permission rules — pre-approving a specific tool call so Claude Code’s auto-mode classifier stops prompting for it every time — live separately, in /Users/christopherwilson/pir/.claude/settings.local.json (gitignored, machine-local, never committed). The one already in use here allows the emcp-tools query tool (a read-only SQL tool) on the main site without a repeat “Production Reads” prompt each call:

    {
      "permissions": {
        "allow": [
          "mcp__emcp-psychedelicsinrecovery-org__emcp-tools-query",
          "mcp__emcp-service-psychedelicsinrecovery-org__emcp-tools-query"
        ]
      }
    }

    Add an entry per tool name you want pre-approved, not a blanket allow. Note: an agent cannot safely edit this file to unblock its own denied action — that specific pattern is itself blocked by a separate classifier category (“Auto-Mode Bypass”), by design. Only the human account owner should add entries here.

Current server aliases (as of 2026-09-18)

emcp-psychedelicsinrecovery-org          (emcp-tools, main)
emcp-service-psychedelicsinrecovery-org  (emcp-tools, service)
astra-native-main                        (Astra native, main)
astra-native-service                     (Astra native, service)
littlebird                               (Littlebird's own MCP)

If you see emcp-astra-* referenced anywhere older, it means the same thing as astra-native-* — renamed to stop implying a relationship to the emcp-tools plugin that doesn’t exist.