OpenAI Agents SDK mcp使用案例

参考:

OpenAI Agents SDK 官方支持mcp协议

https://openai.github.io/openai-agents-python/mcp/

https://github.com/openai/openai-agents-python/tree/main/examples/mcp
在这里插入图片描述

安装:

0.0.7版本

pip install openai-agents

在这里插入图片描述

使用:

windows电脑运行,MCPServerStdio修改了指令成windows格式,客户端模型因为国内,申请的国内服务商https://github.com/chatanywhere/GPT_API_free

代码说明