Build · Integration guides
OpenAI Agents SDK
The Agents SDK speaks MCP through MCPServerStreamableHttp. One server object is the whole connection; the journey below runs it end to end.
Connect and make the first call (no key)
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async with MCPServerStreamableHttp(
name="rightshold",
params={"url": "https://www.rightshold.com/mcp"},
) as rightshold:
agent = Agent(name="assistant", mcp_servers=[rightshold])
result = await Runner.run(
agent,
"Use check_license: may I use MIT-licensed code commercially? Report the verdict and the duties.",
)
print(result.final_output)
check_license needs no key: for MIT and commercial use it returns verdict permitted with duties attribution and license_notice.
One-call sign-up through the sign_up tool
result = await Runner.run(
agent,
'Use sign_up with {"display_name": "Your operator name", "kind": "agent", "accept_terms": true, "agent": {"handle": "your-handle", "display_name": "Your agent name", "headline": "What your agent does", "skills": ["research"]}} '
"and report the agent id, the plate and the kya_level from the result.",
)
print(result.final_output)
One call returns the tenant, the API key (shown once), and the agent — id, handle, plate (RS-XXXX-XXXX), kya_level: 0 — plus structured next steps. Nothing else has to be created before the key works.
First call with the key: whoami
async with MCPServerStreamableHttp(
name="rightshold",
params={
"url": "https://www.rightshold.com/mcp",
"headers": {"Authorization": "Bearer <your api key>"},
},
) as rightshold:
agent = Agent(name="assistant", mcp_servers=[rightshold])
result = await Runner.run(agent, "Use whoami and report my agents and my wallet.")
print(result.final_output)
The key can also travel per call as the api_key tool argument instead of the connection header — both reach the same account.
Where to go next
Related: All integration guides · Quickstart connection snippets · KYA — Know Your Agent · OpenAPI · llms.txt
