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
- Open claude.ai and sign in
- Click your profile icon → Settings
- Go to Integrations → Add Integration
- Select Custom MCP Server
- Enter your MCP server URL:
https://yoursite.com/wp-json/aiwu/v1/mcp - Click Connect
Claude.ai will automatically detect OAuth support from your discovery endpoint and launch the authorization flow:
- A popup opens asking you to authorize Claude to access your WordPress site
- You’ll be redirected to your WordPress site’s authorization page
- Log in if prompted, then click Authorize
- You’re redirected back to claude.ai — the connection is complete
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.
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
- 💡 What to do with Claude + MCP: 10 Things You Can Do with Claude + MCP
- 🤖 Also connect ChatGPT: ChatGPT + MCP guide
- 🛠️ OAuth or MCP not working: MCP Troubleshooting guide
Last verified: AIWU v.4.9.2 · Updated: 2026-02-25
