❄️ Winter Sale: 40% OFF AIWU
WINTER_SECRET
Valid until Mar 1st
Remote MCP with OAuth 2.1: Connect Claude.ai to Your WordPress Site - AIWU – AI Plugin for WordPress
Table of Contents
< All Topics

Remote MCP with OAuth 2.1: Connect Claude.ai to Your WordPress Site

Claude.ai (the web version at claude.ai) connects to remote MCP servers using OAuth 2.1 — a secure authorization flow that doesn’t require you to handle or paste API tokens manually. AIWU supports OAuth 2.1 with PKCE and Dynamic Client Registration, making it fully compatible with Claude.ai’s remote MCP connector. This guide walks through the complete connection process.


Before You Start

  • AIWU Pro with MCP enabled
  • Your site must be publicly accessible via HTTPS (not localhost)
  • A Claude Pro or higher account at claude.ai
  • Time needed: ~5 minutes

How OAuth MCP Differs from Token MCP

Token (URL/Header) auth OAuth 2.1 auth
You generate a token in AIWU, paste it into the client Client and server negotiate access via a secure OAuth flow
Works for Claude Desktop, API clients, Postman Required for Claude.ai web interface
Simpler setup More secure — no token ever transmitted in a URL
Token stored in client config file Short-lived access tokens + refresh tokens, auto-rotated

Step 1: Verify OAuth is Enabled in AIWU

Go to AI Copilot → MCP → Settings.

  • Enable MCP server: On
  • OAuth 2.1: On (should be on by default in AIWU Pro)
  • Dynamic Client Registration: On (required for Claude.ai)
  • PKCE: On

Your OAuth discovery endpoint is automatically available at:

https://yoursite.com/wp-json/aiwu/v1/mcp/.well-known/oauth-authorization-server

Claude.ai uses this URL to discover your authorization endpoints automatically.


Step 2: Connect from Claude.ai

  1. Open claude.ai and sign in
  2. Click your profile icon → Settings
  3. Go to IntegrationsAdd Integration
  4. Select Custom MCP Server
  5. Enter your MCP server URL: https://yoursite.com/wp-json/aiwu/v1/mcp
  6. Click Connect

Claude.ai will automatically detect OAuth support from your discovery endpoint and launch the authorization flow:

  1. A popup opens asking you to authorize Claude to access your WordPress site
  2. You’ll be redirected to your WordPress site’s authorization page
  3. Log in if prompted, then click Authorize
  4. You’re redirected back to claude.ai — the connection is complete
💡 Authorization scopes. When authorizing, you’ll see a permissions screen showing what Claude will be able to access (read posts, create content, etc.). These match the permission levels configured in your AIWU MCP settings.

Step 3: Test the Connection

In a new Claude.ai conversation, start with:

“What are the 5 most recent posts on my WordPress site?”

Claude.ai should use the MCP connection to fetch and return your actual post titles and URLs.

✅ Claude.ai reading live data from your site? OAuth is working. You now have a secure, persistent connection between Claude.ai and your WordPress site — no tokens to manage, no credentials to copy-paste.

Managing OAuth Connections

In AIWU → MCP → OAuth Clients, you’ll see all authorized connections. You can:

  • View which clients are connected and when they last connected
  • Revoke specific client access without affecting other connections
  • Set per-client permission levels (read-only for some clients, full access for others)

Common Issues

Problem: “OAuth authorization popup appears but redirects to an error.”
Fix: Check that your WordPress site is accessible via HTTPS (not HTTP). OAuth requires a secure connection. Also verify the redirect URI in AIWU MCP settings matches your site’s actual URL exactly.

Problem: “Claude.ai says ‘Could not connect to MCP server’.”
Fix: Test that your discovery endpoint is accessible: visit https://yoursite.com/wp-json/aiwu/v1/mcp/.well-known/oauth-authorization-server in a browser — it should return a JSON document. If you get a 404 or Cloudflare block, check firewall rules for this endpoint.

Problem: “Connection works but expires after a few hours.”
Fix: AIWU’s OAuth issues short-lived tokens that are refreshed automatically. If refresh is failing, check that your site doesn’t block the refresh token endpoint. Cloudflare “Challenge Passage” settings can sometimes interrupt token refresh requests.


What’s Next


Last verified: AIWU v.4.9.2 · Updated: 2026-02-25

Scroll to Top