Token导航 LogoToken导航TokenDH.com
Joseph GitHub MCP Server logo
开发工具stdio官方级别未说明来源级核验

Joseph GitHub MCP Server

MCP Server

A GitHub MCP server demo with create repository functionality

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
Python开发工具GitHub

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Joseph19820124

提供方

Joseph19820124

最后核验

2026/5/18 04:04

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

GitHub MCP服务器

提供GitHub存储库管理功能的模型上下文协议(MCP)服务器。

特性

  • 创建存储库:使用可自定义的设置创建新的GitHub存储库

先决条件

  • Python 3.8或更高版本
  • 具有存储库创建权限的GitHub个人访问令牌

安装

  1. 克隆此存储库:
git clone https://github.com/Joseph19820124/joseph-github-mcp-server.git
cd joseph-github-mcp-server
  1. 安装依赖项:
pip install -r requirements.txt
  1. 设置您的GitHub令牌:
export GITHUB_TOKEN="your_github_personal_access_token"

用法

运行MCP服务器

python main.py

服务器将启动并通过stdin/stdout监听MCP请求。

可用工具

创建存储库

创建一个新的GitHub存储库。

参数:

  • name (必填):存储库名称
  • description (可选):存储库描述
  • private (可选):存储库是否应该是私有的(默认值:false)

请求示例:

{
  "method": "tools/call",
  "params": {
    "name": "create_repository",
    "arguments": {
      "name": "my-new-repo",
      "description": "A sample repository",
      "private": false
    }
  },
  "id": "1"
}

示例响应:

{
  "content": [
    {
      "type": "text",
      "text": "{\n  \"success\": true,\n  \"repository\": {\n    \"id\": 123456789,\n    \"name\": \"my-new-repo\",\n    \"full_name\": \"username/my-new-repo\",\n    \"html_url\": \"https://github.com/username/my-new-repo\",\n    \"clone_url\": \"https://github.com/username/my-new-repo.git\",\n    \"ssh_url\": \"git@github.com:username/my-new-repo.git\",\n    \"private\": false,\n    \"description\": \"A sample repository\"\n  }\n}"
    }
  ],
  "id": "1"
}

GitHub令牌设置

要使用此MCP服务器,您需要一个具有以下权限的GitHub个人访问令牌:

  1. 前往GitHub设置>开发者设置>个人访问令牌
  1. 生成具有以下作用域的新令牌:

- repo (用于访问存储库) - user (供用户参考)

  1. 将令牌设置为环境变量:
export GITHUB_TOKEN="your_token_here"

发展

项目结构

joseph-github-mcp-server/
├── main.py              # Main MCP server implementation
├── requirements.txt     # Python dependencies
├── README.md           # This file
└── pyproject.toml      # Project configuration

测试

您可以通过发送JSON-RPC请求来测试服务器:

  1. 启动服务器:
python main.py
  1. 发送测试请求:
echo '{"method": "tools/list", "id": "1"}' | python main.py

MCP(模型上下文协议)

该服务器实现了模型上下文协议,这是一个将人工智能应用程序与外部数据源和工具连接的开放标准。该协议通过stdio使用JSON-RPC 2.0进行通信。

支持的MCP方法

  • tools/list:列出可用工具
  • tools/call:执行特定工具

工具架构

create_repository 工具遵循MCP工具模式:

{
  "name": "create_repository",
  "description": "Create a new GitHub repository",
  "inputSchema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Repository name"
      },
      "description": {
        "type": "string",
        "description": "Repository description",
        "default": ""
      },
      "private": {
        "type": "boolean",
        "description": "Whether the repository should be private",
        "default": false
      }
    },
    "required": ["name"]
  }
}

许可证

MIT许可证

贡献

欢迎拉取请求。对于重大更改,请先打开一个问题来讨论您想要更改的内容。

目录标签

目录标签

Python开发工具GitHubdeveloper-toolsmcprepository-managementGitHub管理本地部署仓库创建MCP协议

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP