×
‹
›
Logo
  • Go to Home
Book a demo

Search

Basics

Advanced

For developers

Connectors

Contact support

Helpdesk portal

Peliqan documentation
/
Low-code Python (data apps)
/
By protocol (REST, Webhooks, MQTT, MCP…)
/
MCP Server
/
Build a custom MCP Server on Peliqan
/
Build a custom MCP Server on Peliqan with oAuth and Azure SSO

Build a custom MCP Server on Peliqan with oAuth and Azure SSO

How to configure a Custom MCP Server in your Peliqan account with oAuth and SSO to Azure

Use the following script template:

‣
Click to expand script

Update the settings in this Python script:

  • Your Microsoft Azure tenant id
  • Your Peliqan account id
  • Add user mappings: the key is the Azure username, 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 Azure

You need to create two apps in Azure under App registrations:

1. App registration for oAuth authorization flow (with client secret)

  • Client id
  • Client secret
  • Redirect URI for ChatGPT: see ChatGPT Settings > Create app > oAuth > Advanced. For example: https://chatgpt.com/connector/oauth/xxxxxxxxxx
  • Redirect URI for Claude: https://claude.ai/api/mcp/auth_callback
  • Note for ChatGPT: you’ll need to start adding an MCP Server in ChatGPT, and click on Advanced Settings to see the redirect URI from ChatGPT. Once you have it, cancel adding the app in ChatGPT (we’ll complete this step below).

image

2. App registration for the MCP Server resource

  • Application ID URI = https://api.eu.peliqan.io/123/mcp (use the exact URL of this MCP Server)
  • Add a scope under "Expose an API", e.g. "peliqan_scope"
  • Add groups claim under “Token configuration” > Add groups claim > All groups
image

Expose an API:

image

Add groups claim:

image

Add the second app in the first app under "API permissions" > APIs my organization uses > find the second app and add it:

image

Configure 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 checkbnox “I understand”
  • Open Advanced Settings: enter the client id and client secret from your App Registration in Azure (from first app which has a client secret)
  • Click on the “Create” button
  • Test your MCP Server: ask ChatGPT “Ask the Peliqan MCP to say hello.”
image

Configure 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 Azure app.

image