关于 openai-mcp-client
一个 OpenAI MCP 客户端,通过 GitHub MCP 服务与用户的 GitHub 账户交互。支持简单模式(直接调用工具)和 AI 模式(通过 OpenAI 自然语言查询)。
主要功能
- 01GitHub MCP 服务集成
- 02OpenAI 自然语言查询
- 03简单和 AI 两种操作模式
- 04GitHub 仓库和代码管理
- 05自动化工作流执行
适用场景
- 01通过自然语言管理 GitHub 仓库
- 02自动化代码提交和拉取请求
- 03AI 辅助的开发工作流
- 04查询和分析代码提交历史
MCP 相关
客户端通过标准输入输出传输连接到 GitHub MCP 服务,向其发送工具调用请求。
详细介绍
openai-mcp-client
- 安装 GitHub 的 MCP 服务:
npm install -g @modelcontextprotocol/server-github
你需要配置两个变量:
- 生成一个 GitHub 个人访问令牌
- 获取 MCP 服务可执行文件的路径(用于 StdioClientTransport 命令):
which mcp-server-github
你可以在简单模式下运行应用,它将从 GitHub MCP 服务调用单个工具:
node client.js
或者你可以将其与 OpenAI 集成,这样你就可以通过 AI 驱动的查询与你的 GitHub 个人资料交互。下面是示例:
示例 1:
node client-with-openai.js "How many commits does my openai-mcp-client repo have that is under my username leartbeqiraj1?"
示例 2:
node client-with-openai.js "Please do the following: * make a simple html page. * create a repository called 'openai-created-this-repo'. * Push the html page to the 'openai-created-this-repo' repository. * Add a little css to the html page and then push it up. * Make an issue suggesting we add some more content on the html page. * Now make a branch called feature and make that fix and push the change. * Make a pull request against main with these changes."
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。