Connect ChatGPT and OpenAI Agents
OpenAI clients reach a Model Context Protocol (MCP) server either through a ChatGPT custom connector or through the Agents software development kit (SDK). This page uses BioMed MCP, the UniBio Intelligence server for public biomedical sources, which needs no account:
https://biomedmcp.unibiointelligence.com/mcp
UbiMCP, the connection to UbiBiologics, takes the same configuration with its own address,
https://mcp.unibiointelligence.com/mcp, but also requires a grant before its operations answer. See
Connect an LLM client.
OpenAI changes its product names, model identifiers and plan tiers independently of this site. Where a step below depends on one of those, check it against OpenAI's own documentation.
ChatGPT custom connector
Adding a custom connector requires a plan and account setting that permit it; OpenAI's documentation states which.
- In ChatGPT, open Settings then Connectors.
- Choose Add custom connector.
- Fill in:
- Name:
BioMedMCP - URL:
https://biomedmcp.unibiointelligence.com/mcp - Authentication: OAuth.
- Name:
- Save the connector and enable it in a conversation.
The instructions for other clients are on Connect an LLM client.
OpenAI Agents SDK (Python)
The Agents SDK attaches an MCP server to an agent when the agent is constructed. Use the model identifier and class names from the SDK version you have installed.
pip install openai-agents
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(
params={"url": "https://biomedmcp.unibiointelligence.com/mcp"},
name="biomedmcp",
) as biomedmcp:
agent = Agent(
name="biomedical-researcher",
instructions=(
"You are a biomedical research assistant. "
"Use the connected tools to answer questions about genes, "
"proteins, drugs, diseases, trials and the literature, and "
"cite the records you read."
),
mcp_servers=[biomedmcp],
)
result = await Runner.run(
agent,
"Find human LDLR target evidence and cite the records you read.",
)
print(result.final_output)
import asyncio
asyncio.run(main())
Responses API
Without the Agents SDK, an MCP server is passed to the Responses application programming
interface (API) in the tools parameter. Substitute a current model identifier.
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="<current-model-id>",
input="Summarize FDA adverse event reports for trastuzumab deruxtecan, with citations.",
tools=[{
"type": "mcp",
"server_label": "biomedmcp",
"server_url": "https://biomedmcp.unibiointelligence.com/mcp",
"require_approval": "never",
}],
)
print(response.output_text)
Setting require_approval to "never" lets the model call the tools without a confirmation
step. These tools only read records, but consider whether unattended calls suit your use.
Troubleshooting
The connector is not registered. Confirm that the address ends in /mcp and that it can be
reached from the public internet.
The tools are not called. State in the request that the data is held in an external system, for example "Use the connected tools to look up ...". Requiring a tool call for one turn also works where the client supports it.
A reply reports that a source is unavailable. The server reports an unavailable source rather than omitting it silently. The repository's source list records whether a key is needed or the source is not released.