Search

Connectors

Contact support

Helpdesk portal

Build a custom MCP Server on Peliqan with Google oAuth

If you want to enforce permissions per user in your custom MCP Server, you have to use oAuth. This can be done for example by using SSO (single sign on) with Google. If you want to build a custom MCP Server without oAuth (using an API key instead), click here.

Contents

How to build a Custom MCP Server on Peliqan with SSO using Google oAuth

Use the following script template:

Click to expand script

Update the settings in this Python script:

  • Your Peliqan account id
  • Add user mappings: the key is the Google user name or email, the value is the personal API key of the user in Peliqan (see User Settings > API keys)

Add two API endpoints and link them both to the above API handler script:

  • POST /mcp
  • GET /mcp/*/*

Set both endpoints to “public”:

image
image

App registration in Google Console

Create an app in Google Cloud Console: https://console.cloud.google.com/ under “API & Services” > oAuth consent screen.

Create an internal app and copy the client_id and client_secret:

  • Authorized redirect URI: For Claude, add following Authorized redirect URI in your app: https://claude.ai/api/mcp/auth_callback
  • App type (audience): "internal"
  • oAuth 2.0 client type: Web application
  • Data access: you do not have to add scopes here

Configure your MCP Server using oAuth in ChatGPT

In ChatGPT click on your account name (bottom left corner), click Settings.

In Settings, go to Apps, and click “Create App”:

image
  • Fill in the URL of your MCP Server URL: https://api.eu.peliqan.io/{your_peliqan_account_id}/mcp
  • Select “oAuth” for Authentication
  • Check the checkbox “I understand”
  • Open Advanced Settings: enter the client id and client secret from your App in Google Cloud Console.
  • Click on the “Create” button
  • Test your MCP Server: ask ChatGPT “Ask the Peliqan MCP to say hello.”
image

Configure your MCP Server using oAuth in Claude

In Claude, go to Customize > Connectors. Click the “+” icon and select “Add custom connector”.

Enter the URL of your custom MCP Server, expand the “Advanced” section and enter the client_id and client_secret from your Google app.

image