Back to MCP directory
publicPublicdnsLocal runtime

-Creating-a-MCP-Server-for-Claude-AI-Assistant-to-interact-with-GitHub-and-demonstrate-its-Use-

项目通过创建MCP服务器,实现Claude AI助手与GitHub的交互,展示如何利用MCP技术提升开发工作流程。

article

README

🚀 为Claude AI助理创建与GitHub交互的MCP服务器并演示其使用

本项目旨在为Claude AI助理创建一个与GitHub交互的MCP服务器,并展示其具体使用方法。通过搭建该服务器,能让Claude AI助理直接与GitHub仓库进行交互,实现查询代码、读写文件等功能,有效提升开发工作流程的效率。

🚀 快速开始

需求

可选择任何具有API的应用程序,如Spotify、GitHub、Twitter等,本项目选择了GitHub。

概述

Anthropic推出的Model Context Protocol (MCP) 服务器是一款强大的工具,它能将您的AI助理与GitHub仓库连接起来。设置MCP服务器后,您可以直接查询代码、读取/写入文件、生成见解,进而提升开发工作流程。

先决条件

在开始之前,请确保系统上安装了以下内容:

  1. Node.js 和 npm(Node Package Manager)
  2. 最新版本的Claude Desktop
  3. 带有适当权限的GitHub账户

执行步骤

  1. 生成GitHub个人访问令牌
  2. 在Claude AI助理中安装GitHub MCP服务器
  3. 配置MCP服务器
  4. 通过编辑config.json文件更新Claude Desktop配置
  5. 重启Claude Desktop
  6. 验证GitHub集成:检查Claude AI如何能够访问您的GitHub仓库并进行操作,例如:
    • 显示您所有的GitHub存储库
    • 解释项目
    • 展示项目结构
    • 创建一个新的存储库并在其上执行更多操作等等。

✨ 主要特性

  • 实现Claude AI助理与GitHub仓库的连接,可直接在AI助理中对GitHub仓库进行操作。
  • 能够查询代码、读取/写入文件、生成见解,提升开发工作流程的效率。

🔧 技术细节

本项目使用了以下技术: | 属性 | 详情 | |------|------| | 模型类型 | Claude AI Assistant:3.7 Sonnet | | 开发环境 | Node.js:22.14.0;npm:10.9.2;Visual Studio Code | | 核心工具 | Model Context Protocol (MCP) 服务器;GitHub 服务器 |

📄 附件

附带了完成此任务的截图文件夹。 Claude_Accessing_Preeti_GitHub_Repositories Claude_Creating_A_New_Repository_in_my_GitHub_Account

📞 联系方式/制作人

  • 制作人:Preeti Shrivastava
  • GitHub 用户名:Preeti75
  • GitHub 账户:github.com/Preeti75
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