Github-MCP-Server-Demo

jatinnahar15/Github-MCP-Server-Demo

3.1

If you are the rightful owner of Github-MCP-Server-Demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a guide to setting up a Model Context Protocol (MCP) server using Python and Flask to interact with GitHub.

  1. Install Python 3.x

  2. Install Flask and requests: pip install flask requests

  3. Create a GitHub Personal Access Token with repo scope

  4. Create mcp server file. [mcp_github_server.py]

  5. Set your GitHub token securely (in terminal): set GITHUB_TOKEN=ghp_YourTokenHere # on Windows

  6. Run it: python mcp_github_server.py

  7. How to Send Post Request to Mcp Server,

    Send a POST request to http://localhost:5001/command with JSON like:

    BODY: { "name": "create-repo", "input": { "repo_name": "mcp-python-test", "private": true, "description": "Repository created via custom MCP Python server" } }