Cookbook

Build a matchup research agent with the OpenAI Agents SDK

A short Python agent that mounts the DeepChamp MCP server on an OpenAI Agents SDK agent and answers slate and matchup research questions with the free tools.

By DeepChamp research team · Updated

Short answer

To use DeepChamp from the OpenAI Agents SDK, open an MCPServerStreamableHttp connection to the DeepChamp MCP URL, pass it to the Agent in mcp_servers, and call Runner.run. The agent discovers get_daily_slate and get_matchup_context from the server and needs no API key for them.

Install and run

Terminal
pip install openai-agents
python openai_agents_matchup_research.py

The code

openai_agents_matchup_research.py
"""Matchup research: OpenAI Agents SDK plus the DeepChamp MCP server. The free tools need no key."""
import asyncio

from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

MCP_URL = "https://deepchampai.com/mcp"

INSTRUCTIONS = (
    "You write short pre-game research briefings from DeepChamp tool results. Use only what the tools return. Say when the data was current (meta.as_of). Never state odds, picks or outcomes, and never claim a result. End with: Research only, not betting advice. 21+. Help: 1-800-MY-RESET."
)


async def main(question: str = "Which NBA games tonight have rest or travel angles worth checking?") -> None:
    async with MCPServerStreamableHttp(name="deepchamp", params={"url": MCP_URL}, cache_tools_list=True) as server:
        agent = Agent(name="Slate researcher", instructions=INSTRUCTIONS, mcp_servers=[server])
        result = await Runner.run(agent, question)
        print(result.final_output)


if __name__ == "__main__":
    asyncio.run(main())

What to know before you extend it

  • The free tools return the daily slate and matchup context only: no odds, picks or results, and no key is needed. Paid tools appear in the tool list only when their product line is live.
  • The system prompt tells the model to cite the as-of time and to end with the safety line. Keep that: it is the difference between a briefing and a tip.
  • Relay the compliance block from every response to your own users. It carries the 21+ notice and the problem-gambling helpline.
  • Log every call and its as-of time. If you later add signals, log them with the entry price from your own feed and measure them against the closing line.
  • Use the async context manager so the connection is closed when the run ends, and cache the tool list when the server’s tools do not change during a run.

What was checked, and when: on October 31, 2026, against production, the LangChain tool’s REST call returned the free envelope, and the MCP clients of the OpenAI Agents SDK (openai-agents 0.24.0) and the Vercel AI SDK (ai 7.0.105 with @ai-sdk/mcp 2.0.22) connected, listed the four free tools and called get_daily_slate. The Claude Agent SDK file was imported against claude-agent-sdk 0.2.175 and the LangChain file against langchain-core 1.7.3 and langchain-anthropic 1.7.7. The model loops themselves were not run because they need your model key; if a signature has moved in a newer SDK version, the SDK’s own documentation wins.

Common questions

How do I connect the OpenAI Agents SDK to an MCP server?

Create an MCPServerStreamableHttp with the server URL in params, enter it as an async context manager, and pass it in the mcp_servers list of the Agent. The SDK lists the server’s tools and lets the agent call them during Runner.run.

Can a Codex or ChatGPT-based agent use sports research tools?

Yes. An agent built on the OpenAI Agents SDK can mount the DeepChamp MCP server as shown here, and any OpenAI-based agent that can call an HTTPS endpoint can use the REST API instead.

This page is published by DeepChamp AI, so read it as one vendor’s view. Examples use hypothetical numbers and are not live markets, picks or claims about performance.

21+ for U.S. sports betting. Follow the laws and age requirements where you are. DeepChamp AI provides independent sports betting research and analysis. It does not accept or place wagers, hold customer funds for betting, or operate a sportsbook. No wins or profits are guaranteed. If you or someone you know has a gambling problem, call or text 1-800-MY-RESET or visit the National Council on Problem Gambling.