Skip to main content

Connect ChatGPT and OpenAI Agents

The OpenAI ecosystem speaks MCP through the Agents SDK and through ChatGPT custom connectors. This page covers both.

ChatGPT custom connector

ChatGPT supports MCP servers as custom connectors for Pro, Team, Enterprise, and Edu plans.

  1. In ChatGPT, open Settings then Connectors.
  2. Choose Add custom connector.
  3. Fill in:
    • Name: UbiMCP
    • URL: https://mcp.unibiointelligence.com/mcp
    • Authentication: OAuth.
  4. Save and enable the connector in a conversation.

For a shorter client-by-client setup page, see Install UbiMCP.

OpenAI Agents SDK (Python)

The Agents SDK can attach any MCP server to an agent at construction time.

pip install openai-agents
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
async with MCPServerStreamableHttp(
params={"url": "https://mcp.unibiointelligence.com/mcp"},
name="ubi-mcp",
) as ubi_mcp:
agent = Agent(
name="biologics-researcher",
instructions=(
"You are a biologics research assistant. "
"Use UbiMCP to answer questions about targets, "
"diseases, drugs, gene annotation, expression, and FDA data."
),
mcp_servers=[ubi_mcp],
)
result = await Runner.run(
agent,
"What are the top three targets for IPF in Open Targets?",
)
print(result.final_output)

import asyncio
asyncio.run(main())

Responses API direct call

If you are using the Responses API without the Agents SDK, attach MCP servers via the tools parameter:

from openai import OpenAI

client = OpenAI()

response = client.responses.create(
model="gpt-4.1",
input="Use UbiMCP to summarize FDA adverse event signals for trastuzumab deruxtecan.",
tools=[{
"type": "mcp",
"server_label": "ubi-mcp",
"server_url": "https://mcp.unibiointelligence.com/mcp",
"require_approval": "never",
}],
)
print(response.output_text)

Troubleshooting

Connector fails to register. Confirm the URL ends in /mcp and is reachable from the public internet.

Tools never get called. Phrase the prompt so the model knows the data lives in an external system, for example "Use UbiMCP to ..." or "Look up in Open Targets via the connected tools ...". You can also lower the model's tendency to answer from memory by setting tool_choice to "required" for one turn.