halilsafakkilic/github-mcp-server
If you are the rightful owner of github-mcp-server 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 project is a server using the MCP (Model Context Protocol) standard to list GitHub user repositories, supporting multiple communication protocols.
GitHub Explorer MCP Server
This project is a server using the MCP (Model Context Protocol) standard to list GitHub user repositories. It can operate over different communication protocols (stdio, Streamable HTTP and SSE).
Features
- GitHub user repository listing
- Support for stdio, Streamable HTTP and SSE (Server-Sent Events) protocols
- Customized FastMCP configuration
- Basic File logging system
Installation
Requirements to run this project:
# Install dependencies using uv
uv sync
Server Usage
You can start the server in two different modes:
Stdio Mode
uv run server
Streamable Http Mode
uv run server_shttp
SSE (Server-Sent Events) Mode
uv run server_sse
Example Query
You can query the server using MCP Inspector:
Can you give me the list of repos of user halilsafakkilic on GitHub?
Inspector Usage
Configuration Setup
Before using the Inspector or client examples, you need to create a proper configuration file:
-
Copy the configuration template file:
cp mcp_configs.json.dist mcp_configs.json
-
Edit the
mcp_configs.json
file and update the path in theserver_stdio
section:"server_stdio": { "command": "uv", "args": [ "--directory", "/YOUR/ABSOLUTE/PROJECT/PATH", # Replace with your actual project path "run", "server" ] }
Replace
/YOUR/ABSOLUTE/PROJECT/PATH
with the absolute path to your project directory.
To test the server with MCP Inspector:
# Using stdio
npx -y @modelcontextprotocol/inspector uv run server
# Using stdio with config file
npx -y @modelcontextprotocol/inspector --config mcp_configs.json --server server_stdio
# Using Streamable HTTP
npx -y @modelcontextprotocol/inspector --config mcp_configs.json --server server_shttp
# Using SSE
npx -y @modelcontextprotocol/inspector --config mcp_configs.json --server server_sse
SSE + Streamable HTTP Health Check
To check the health of the SSE or Streamable HTTP server, you can use the following command:
curl -X GET http://localhost:8080/health
Client Usage
This project includes example clients for both stdio and SSE protocols.
Stdio Client
The client_stdio.py
demonstrates how to connect to the server using the stdio protocol:
uv run client_stdio.py
Streamable HTTP Client
The client_shttp.py
demonstrates how to connect to the server using Streamable HTTP protocol:
# Run the Streamable HTTP client (make sure server_shttp.py is running)
uv run client_shttp.py
SSE Client
The client_sse.py
demonstrates how to connect to the server using SSE protocol:
# Run the SSE client (make sure server_sse.py is running)
uv run client_sse.py
Project Structure
server.py
: Main server for stdio protocolserver_sse.py
: Main server for SSE protocolclient_stdio.py
: Example client using stdio protocolclient_sse.py
: Example client using SSE protocolapp/
: Application logic and serviceslib/
: Custom library fileslogs/
: Logging directorymcp_configs.json
: MCP configuration settings for Inspector and example usage
API Tools
Currently, there is one API tool available:
get_user_repos
A tool that lists the public repositories of a GitHub user.
Parameters:
username
: GitHub username
Example usage:
Action: get_user_repos
Parameter (username): halilsafakkilic
License
This project is licensed under the MIT License.