Back to MCP directory
publicPublicdnsLocal runtime

agent-with-mcp-server

一个使用OpenAI Agents库与MCP服务器交互的简单代理程序,支持计算数字和或讲笑话功能。

article

README

🚀 使用MCP服务器的代理

本项目是一个简单的代理程序,借助OpenAI代理的Python库实现与MCP服务器的交互。它具备两项实用功能,一是计算两个数字的和,二是为你讲笑话。

🚀 快速开始

启动MCP服务器

首先需要运行MCP服务器,具体操作说明请参阅server/README.md文件。

启动代理

在服务器启动后,你就可以启动代理了。有关代理的操作说明,请参阅agent/README.md文件。

💻 使用示例

示例响应

示例响应

📄 许可证

此项目遵循MIT许可证。如需了解详细信息,请查阅LICENSE文件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client