Connect
Connect OpenAI Agents SDK
Give an agent built with the OpenAI Agents SDK (Python) the CoinGraph tools.
Install
Terminalpip install openai-agentsConnect and run
Pythonimport asyncio from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp(name="CoinGraph", params={"url": "https://coingraph.ai/mcp"}) as coingraph: agent = Agent( name="Trader", instructions="Before any trade, check it with CoinGraph and quote the proof id.", mcp_servers=[coingraph], ) result = await Runner.run(agent, "Check Chainlink before I buy $5K. Use CoinGraph and show me the proof.") print(result.final_output) asyncio.run(main())
Check it works #
The output quotes CoinGraph's verdict and a proof id; the run's tool calls show check_token or run_trade_gatekeeper.