MCP
Connect OpenAI Agents SDK
Give an agent built with the OpenAI Agents SDK (Python) the CoinGraph tools.
Install and get a key
Connect and run
Pythonimport asyncio, os from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp(name="CoinGraph", params={"url": "https://coingraph.ai/mcp", "headers": {"Authorization": f"Bearer {os.environ['COINGRAPH_KEY']}"}}) 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.
i
Note
Sign-in and what each call costs: Keys & pricing. Every tool with its inputs: Tools.