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, Azure or Peliqan OAuth.
If you want to build a custom MCP Server without OAuth (using an API key instead), click here.
Use the following API handler script template in Peliqan:
Update the settings in this Python script:
The above template maps individual users from the SSO to Peliqan API keys. You can also grant permissions based on the groups that the user belongs to, e.g. groups in Azure Entra Id. Here’s some example code on how to do that:
Add two API endpoints and link them both to the above API handler script:
POST /mcpGET /mcp/*/*