- Home
- MCP servers
- GitHub
GitHub
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-peterparker57_github-mcp-server": {
"command": "node",
"args": [
"/path/to/github-mcp-server/dist/index.js"
],
"env": {
"DEFAULT_OWNER": "default-owner",
"GITHUB_OWNER_1": "your-github-username",
"GITHUB_TOKEN_1": "your-github-token"
}
}
}
}This MCP server enables GitHub integration by connecting to GitHub accounts, managing repositories, and performing common file and commit operations directly through the MCP client. It supports account management, repository lifecycle, file reads/writes, and directory synchronization to streamline collaboration with GitHub from your MCP environment.
How to use
You use this server by first configuring MCP to load the GitHub MCP server, then starting the server through your MCP client. Once connected, you can manage accounts, create and rename repositories, push and pull files, synchronize directories, and create or list commits. All actions are exposed as MCP tools you can invoke from your client, enabling GitHub workflows within your MCP environment.
How to install
Prerequisites: you need Node.js and npm installed on your machine. Ensure you are in a project directory where your MCP setup reads its settings.
# Install the GitHub MCP server package
npm install @modelcontextprotocol/server-github
Configuration
Add the server to your MCP settings to enable GitHub integration. The following configuration runs a local Node process that loads the GitHub MCP server and provides environment credentials for GitHub access.
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp-server/dist/index.js"],
"env": {
"GITHUB_TOKEN_1": "your-github-token",
"GITHUB_OWNER_1": "your-github-username"
},
"disabled": false,
"alwaysAllow": []
}
}
}
Available actions and how to use them
This server exposes actions for accounts, repositories, files, and commits. Use these endpoints from your MCP client to perform common GitHub operations without leaving your MCP workflow.
Environment variables
Configure one or more GitHub accounts by setting token and owner pairs. Default owner can be set to define a fallback account.
Available tools
list_accounts
List available GitHub accounts configured in the server.
select_account
Select a GitHub account to use for subsequent operations.
create_repository
Create a new GitHub repository with specified metadata.
clone_repository
Clone a GitHub repository to a local directory.
rename_repository
Rename an existing GitHub repository.
push_file
Push a file to a GitHub repository with a commit message.
pull_file
Pull a file from a GitHub repository to a local path.
sync_directory
Two-way synchronization between local and remote directories.
create_commit
Create a commit with multiple file changes.
list_commits
List commits for a repository and optional filters.