Search

Connectors

Contact support

Helpdesk portal

Build a custom MCP Server on Peliqan

Peliqan has an out-of-the-box MCP Server. However, you can also build custom MCP Servers in Peliqan. You can use the Peliqan MCP Server template to get started. You can extend this template by adding your own “tools”, these are Python functions decorated with @mcp.tool().

Contents

How to build a Custom MCP Server in Peliqan

  1. Install the “MCP Server” script from the app templates:
  2. image
  3. Add an API endpoint (method POST) and link it to the “MCP Server” script (this is the API handler script). Click here for more info on how to publish an API endpoint in Peliqan.
  4. image
  5. Update the credentials (API key) in your script and store in the Peliqan Secret Store.

Configure your MCP Client

ChatGPT

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

Go to Settings > Apps > Advanced Settings > Enable “Developer mode”.

Go to Settings > Apps > Create App.

Enter the URL of your MCP API endpoint, including the API key:

image

If you make updates to your MCP Server (e.g. you add tools), make sure to click the “Refresh” button on the detail screen of your app and check if the new actions are available for your app.

Claude

You can use Claude.ai (in the browser) or Claude Desktop, but you need a Paid plan (e.g. Claude Pro) to add a Remote MCP Server.

Go to Settings > Connectors > Add custom connector.

Enter the URL of your MCP API endpoint, including the API key:

image

Microsoft Copilot

In Copilot Studio, add an Agent and add a Tool of type “MCP Server” to the agent.

Select None or API key for the MCP Server authentication type (depending on how you implemented authorization in your custom MCP Server).

Publish your agent in Copilot Studio to make it available in Copilot chat. Next, you can access your Agent in Copilot chat and use it to access your MCP Server.

Troubleshooting in Copilot Studio

If you don’t have permissions to publish you agent, follow the below steps to allow a user to publish an agent:

Click to expand

If you get an error “A custom connector with display name xxx already exists”, follow the below steps:

Click to expand

Add intent detection

Intent detection (logging the original intent of the user) is useful to improve your MCP implementation. See example code below. Without intent detection you will only be able to log tool invokations, without knowing what the user (using the MCP) wanted to achieve.

Click to expand code

Build a custom MCP server with SSO using Microsoft Azure Entra (oAuth)

If you want to enforce permissions per user in your MCP Server, you have to use oAuth. This can be done for example in combination with SSO (single sign on) on Microsoft Azure (Entra ID).

More info on how to build a custom MCP Server with oAuth and SSO to Azure:

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