Setting Up MCP
This guide walks you through connecting AI assistants to PayRequest using the Model Context Protocol (MCP) with OAuth authentication.Supported AI Assistants
Claude Desktop
Anthropic’s desktop application with full MCP support
ChatGPT
OpenAI’s ChatGPT with MCP connector support
Prerequisites
Before you begin, ensure you have:- A PayRequest account with active billing data
- Claude Desktop app or ChatGPT Plus subscription
- Your PayRequest dashboard accessible
Claude Desktop Setup
1
Open Claude Desktop Settings
In Claude Desktop, go to Settings → MCP Servers → Add Server.
2
Enter Server Details
Configure the MCP server with these settings:
3
Authenticate with PayRequest
Claude Desktop will open a browser window to authenticate with PayRequest. Log in with your PayRequest account and authorize the connection.
4
Grant Permissions
Review the requested permissions and click Authorize to allow Claude Desktop to access your billing data.
5
Verify Connection
Back in Claude Desktop, you should see “PayRequest” listed under your connected MCP servers. Try asking:
“What are my invoice statistics?”
Claude Desktop Configuration File
For advanced users, you can also configure Claude Desktop via the config file:- macOS
- Windows
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:ChatGPT Setup
1
Open ChatGPT
Go to chat.openai.com and ensure you have a ChatGPT Plus subscription.
2
Access MCP Connectors
In ChatGPT, go to Settings → Connected Apps or look for the MCP connector option.
3
Add PayRequest Server
Add a new MCP server with:
4
Authenticate
ChatGPT will redirect you to PayRequest to log in and authorize the connection.
5
Start Using
Once connected, you can ask ChatGPT about your billing data:
“Show me my overdue invoices”
Finding Your Setup Instructions
The easiest way to set up MCP is from your PayRequest dashboard:- Go to Settings → API in PayRequest
- Select the Claude Desktop or ChatGPT tab
- Follow the on-screen instructions with pre-configured values
Test the Connection
After setup, verify everything works by asking your AI assistant:“What are my invoice statistics?”You should receive a response like:
Available Commands
Once connected, you can ask questions like:- “What are my invoice statistics?”
- “Show me all overdue invoices”
- “List my recent invoices”
- “Send a payment reminder for invoice #INV-2025-042”
OAuth Endpoints (Technical Reference)
For developers building custom MCP clients:OAuth Flow
PayRequest MCP uses OAuth 2.0 with PKCE for secure authentication:- Client initiates authorization request with
code_challenge - User authenticates with PayRequest
- Authorization code returned to client
- Client exchanges code for access token using
code_verifier - Access token used for MCP requests
Troubleshooting
”Permission denied” or “Authentication failed”
- Ensure you’re logged into the correct PayRequest account
- Try disconnecting and reconnecting the MCP server
- Clear your browser cookies and try again
”Invalid client” error
- Make sure you’re using the correct server URL:
https://payrequest.app/mcp/billing - Contact support if the issue persists
Connection timeout
- Verify you can access
https://payrequest.appin your browser - Check your firewall or VPN settings
- Try from a different network
No data returned
- Ensure you have invoices in your PayRequest account
- Verify you authorized the correct PayRequest account
Security
OAuth 2.0 with PKCE
OAuth 2.0 with PKCE
PayRequest uses industry-standard OAuth 2.0 with PKCE (Proof Key for Code Exchange) for secure authentication without exposing secrets.
Scoped Access
Scoped Access
MCP connections only have access to billing data (invoices, statistics). They cannot access payment provider credentials or modify account settings.
Revoke Access
Revoke Access
You can disconnect MCP clients at any time from Settings → API in your PayRequest dashboard.
Activity Logging
Activity Logging
All MCP actions are logged in your Activity Log for audit purposes.
Next Steps
Tools Reference
Learn about all available MCP tools and their parameters
API Documentation
Explore the full PayRequest API for custom integrations