Skip to main content

OpenAI SDK Integration

How to integrate OpenAI with Aluvia's MCP server for enhanced AI capabilities.

Setup Guide

1

Get your Aluvia Token

  1. Go to the Aluvia Dashboard
  2. Navigate to the Credentials page
  3. Copy your Aluvia Token (it looks like: 2dceb1aa0***************************)
💡Tip

Your Aluvia Token is required for MCP authentication.

2

Configure your MCP server

from openai import OpenAI

client = OpenAI()

resp = client.responses.create(
model="gpt-4o",
tools=[
{
"type": "mcp",
"server_label": "Aluvia",
"server_url": "https://mcp.aluvia.io",
"server_headers": {
"Authorization": "Bearer YOUR_ALUVIA_TOKEN"
},
"require_approval": "never",
},
],
input="Can you list my Aluvia connectivity credentials and test one of them?",
)

print(resp.output_text)
3

Test it works

  1. Ask your AI assistant: "Can you list my Aluvia connectivity credentials?"
  2. The AI will connect to your Aluvia account through the MCP server
  3. You should see your connectivity credentials listed and ready to use