home / mcp / github mcp practice server
GitHub MCP server built with fastMCP
Configuration
View docs{
"mcpServers": {
"j-nowcow-github-mcp-practice": {
"command": "python",
"args": [
"-m",
"mcp_github.server"
],
"env": {
"PYTHONPATH": "/Users/hyunwoo/Desktop/클테코/20250904_githubMCP",
"PYTHUB_TOKEN": "your_github_token_here"
}
}
}
}You can run a GitHub-based MCP Server that exposes GitHub operations as MCP tools and lets an MCP Client orchestrate those tools through a LangGraph workflow. This setup enables automated interactions with GitHub—from reading repository data to creating or updating files and branches—driven by natural language requests processed through the client and the underlying MCP Server.
You will connect your MCP Client to the GitHub MCP Server to access a suite of GitHub-related tools. Start by ensuring the server is running locally or remotely, then perform tasks through natural language requests. The client will query the server for available tools, plan actions with LangGraph, execute the chosen tools on the MCP Server, and return a final response with results and any relevant details such as created issues, commits, or repository state.
Prerequisites: you should have Python installed and a virtual environment management option available.
python -V
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# or on Windows: venv\Scripts\activateTo connect MCP Client Cursor to the GitHub MCP Server, use the following stdio configuration. This starts the server process locally with the appropriate environment and working directory.
{
"mcpServers": {
"github_mcp": {
"command": "python",
"args": ["-m", "mcp_github.server"],
"cwd": "/Users/hyunwoo/Desktop/클테코/20250904_githubMCP",
"env": {
"PYTHUB_TOKEN": "your_github_token_here",
"PYTHONPATH": "/Users/hyunwoo/Desktop/클테코/20250904_githubMCP"
}
}
}
}Keep your GitHub Personal Access Token secure. The example configuration shows token usage in an environment variable named PYTHUB_TOKEN and a specific Python path required for runtime context. Place sensitive values in environment-specific configurations and avoid exposing tokens in logs or code. When testing, use a dedicated token with only the required repository and user permissions.
Check server status and responsiveness.
Retrieve repository information such as owner and repo details.
List pull requests with specified state (e.g., open, closed).
Fetch the diff for a given pull request.
Read the contents of a file in the repository.
Create or update a file in the repository with a commit message and optional branch.
Remove a file from the repository with a commit message.
Create a new branch from a base branch.
Commit changes to multiple files in a single operation.
Query repository status and latest commit information.