Skip to main content

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 SettingsMCP ServersAdd Server.
2

Enter Server Details

Configure the MCP server with these settings:
SettingValue
Server URLhttps://payrequest.app/mcp/billing
NamePayRequest Billing
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:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "payrequest-billing": {
      "url": "https://payrequest.app/mcp/billing"
    }
  }
}

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 SettingsConnected Apps or look for the MCP connector option.
3

Add PayRequest Server

Add a new MCP server with:
SettingValue
Server URLhttps://payrequest.app/mcp/billing
NamePayRequest Billing
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:
  1. Go to SettingsAPI in PayRequest
  2. Select the Claude Desktop or ChatGPT tab
  3. 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:
Invoice Statistics:
- Total invoices: 150
- Pending: 23 (€15,750.00 outstanding)
- Paid: 120
- Overdue: 7 (€4,200.00)

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:
EndpointURL
MCP Serverhttps://payrequest.app/mcp/billing
OAuth Discoveryhttps://payrequest.app/.well-known/oauth-authorization-server
Authorizationhttps://payrequest.app/oauth/authorize
Token Endpointhttps://payrequest.app/oauth/token

OAuth Flow

PayRequest MCP uses OAuth 2.0 with PKCE for secure authentication:
  1. Client initiates authorization request with code_challenge
  2. User authenticates with PayRequest
  3. Authorization code returned to client
  4. Client exchanges code for access token using code_verifier
  5. 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.app in 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

PayRequest uses industry-standard OAuth 2.0 with PKCE (Proof Key for Code Exchange) for secure authentication without exposing secrets.
MCP connections only have access to billing data (invoices, statistics). They cannot access payment provider credentials or modify account settings.
You can disconnect MCP clients at any time from Settings → API in your PayRequest dashboard.
All MCP actions are logged in your Activity Log for audit purposes.

Next Steps