The Plaid MCP server supports three authentication methods:
- OAuth 2.1 (Recommended for ChatGPT)
- Bearer Token (Legacy/simple deployments)
- Test Mode (Automated testing only)
For ChatGPT integration - See CHATGPT-SETUP.md for complete guide.
-
Generate OAuth credentials:
echo "MCP_OAUTH_CLIENT_ID=$(openssl rand -hex 8)" >> .env.local echo "MCP_OAUTH_CLIENT_SECRET=$(openssl rand -hex 16)" >> .env.local
-
Start server:
npm run build npm run start:sse
-
Add to ChatGPT:
- Settings → Connectors → Add Connector
- Enter your ngrok URL (without
/sse) - Select OAuth authentication
- Paste Client ID and Secret
- Authorize in browser
echo "MCP_OAUTH_ENABLED=false" >> .env.localFor simple deployments without OAuth complexity.
-
Generate token:
echo "MCP_AUTH_TOKEN=$(openssl rand -hex 32)" >> .env.local
-
Disable OAuth:
echo "MCP_OAUTH_ENABLED=false" >> .env.local
-
Restart server:
npm run build npm run start:sse
Include in all requests:
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:3001/sseBypasses all authentication for automated testing. Never use in production!
# Run tests
npm run test
# Or manually
MCP_TEST_MODE=true npm run start:sse| Variable | Description | Example |
|---|---|---|
MCP_OAUTH_CLIENT_ID |
OAuth 2.1 client ID | a1b2c3d4e5f6g7h8 |
MCP_OAUTH_CLIENT_SECRET |
OAuth 2.1 client secret | i9j0k1l2m3n4o5p6... |
MCP_OAUTH_ENABLED |
Enable OAuth (default: true) |
true or false |
MCP_AUTH_TOKEN |
Legacy bearer token | a1b2c3d4e5f6... |
MCP_TEST_MODE |
Bypass auth for testing | true or false |
curl http://localhost:3001/healthShows current authentication mode: oauth2.1, bearer, or disabled.
- OAuth: Complete authorization flow in browser (see CHATGPT-SETUP.md)
- Bearer: Include
Authorization: Bearer TOKENheader in requests
- Check
MCP_OAUTH_CLIENT_IDmatches in.env.localand ChatGPT - Restart server after changing credentials
- Verify server is running:
curl http://localhost:3001/health - Check ngrok URL is HTTPS (not HTTP)
- Test discovery:
curl http://localhost:3001/.well-known/oauth-authorization-server
# Add OAuth credentials (keep bearer token temporarily)
echo "MCP_OAUTH_CLIENT_ID=$(openssl rand -hex 8)" >> .env.local
echo "MCP_OAUTH_CLIENT_SECRET=$(openssl rand -hex 16)" >> .env.local
# Restart and test
npm run start:sse
# After confirming OAuth works, remove bearer token from .env.local- CHATGPT-SETUP.md - Complete ChatGPT integration
- DEPLOYMENT.md - Production deployment