mcpField
G
GitHub MCP Server

GitHub MCP Server

Local
github.com/Joseph19820124Version Control0Updated 73w ago

About GitHub MCP Server

GitHub MCP Server is a Python MCP server for users who need to create GitHub repositories from MCP-enabled applications. Its documented tool supports repository names, descriptions, and visibility settings.

Key features

  1. 01Create GitHub repositories
  2. 02Set repository name and description
  3. 03Choose public or private visibility

Use cases

  1. 01Create a repository from an MCP client
  2. 02Set repository description and visibility during creation

MCP support

It implements MCP over JSON-RPC on stdio and exposes `create_repository` as a tool. MCP clients can list and call the tool.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

GitHub MCP Server

A Model Context Protocol (MCP) server that provides GitHub repository management functionality.

Features

  • Create Repository: Create new GitHub repositories with customizable settings

Prerequisites

  • Python 3.8 or higher
  • GitHub Personal Access Token with repository creation permissions

Installation

  1. Clone this repository:
git clone https://github.com/Joseph19820124/joseph-github-mcp-server.git
cd joseph-github-mcp-server
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your GitHub token:
export GITHUB_TOKEN="your_github_personal_access_token"

Usage

Running the MCP Server
python main.py

The server will start and listen for MCP requests via stdin/stdout.

Available Tools
create_repository

Creates a new GitHub repository.

Parameters:

  • name (required): Repository name
  • description (optional): Repository description
  • private (optional): Whether the repository should be private (default: false)

Example Request:

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

Example Response:

{
  "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\": \"[email protected]:username/my-new-repo.git\",\n    \"private\": false,\n    \"description\": \"A sample repository\"\n  }\n}"
    }
  ],
  "id": "1"
}

GitHub Token Setup

To use this MCP server, you need a GitHub Personal Access Token with the following permissions:

  1. Go to GitHub Settings > Developer settings > Personal access tokens

  2. Generate a new token with the following scopes:

    • repo (for repository access)
    • user (for user information)
  3. Set the token as an environment variable:

export GITHUB_TOKEN="your_token_here"

Development

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

You can test the server by sending JSON-RPC requests:

  1. Start the server:
python main.py
  1. Send a test request:
echo '{"method": "tools/list", "id": "1"}' | python main.py

MCP (Model Context Protocol)

This server implements the Model Context Protocol, which is an open standard for connecting AI applications with external data sources and tools. The protocol uses JSON-RPC 2.0 over stdio for communication.

Supported MCP Methods
  • tools/list: List available tools
  • tools/call: Execute a specific tool
Tool Schema

The create_repository tool follows the MCP tool schema:

{
  "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"]
  }
}

License

MIT License

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.