
md-adnan70/mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Step-by-step guide for setting up GitHub MCP server with Claude Desktop
概要
This guide provides step-by-step instructions for setting up the GitHub MCP (Model Context Protocol) server with Claude Desktop, enabling seamless integration between Claude and your GitHub repositories. The Model Context Protocol (MCP) is an open protocol that enables AI assistants to securely connect to local and remote resources. The GitHub MCP server allows Claude Desktop to interact with GitHub repositories, enabling features like reading files, creating repositories, managing issues, and more. Before starting, ensure you have: - Claude Desktop installed on your computer - Node.js (version 16 or higher) installed - A GitHub account - Git installed on your system 1. Open your terminal or command prompt 2. Install the GitHub MCP server globally using npm: 1. Go to GitHub and sign in to your account 2. Click on your profile picture in the top right corner 3. Select "Settings" from the dropdown menu 4. In the left sidebar, click on "Developer settings" 5.
README
以下は原文 README の抜粋です。原文を見る。
GitHub MCP Server Setup Guide
This guide provides step-by-step instructions for setting up the GitHub MCP (Model Context Protocol) server with Claude Desktop, enabling seamless integration between Claude and your GitHub repositories.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that enables AI assistants to securely connect to local and remote resources. The GitHub MCP server allows Claude Desktop to interact with GitHub repositories, enabling features like reading files, creating repositories, managing issues, and more.
Prerequisites
Before starting, ensure you have:
- Claude Desktop installed on your computer
- Node.js (version 16 or higher) installed
- A GitHub account
- Git installed on your system
Step 1: Install the GitHub MCP Server
-
Open your terminal or command prompt
-
Install the GitHub MCP server globally using npm:
npm install -g @modelcontextprotocol/server-github -
Verify the installation:
mcp-server-github --version
Step 2: Create a GitHub Personal Access Token
- Go to GitHub and sign in to your account
- Click on your profile picture in the top right corner
- Select “Settings” from the dropdown menu
- In the left sidebar, click on “Developer settings”
- Click on “Personal access tokens” → “Tokens (classic)”
- Click “Generate new token” → “Generate new token (classic)”
- Give your token a descriptive name (e.g., “Claude Desktop MCP”)
- Select the following scopes:
repo(Full control of private repositories)user:email(Access to user email addresses)read:user(Read access to user profile info)workflow(Update GitHub Action workflows)
- Click “Generate token”
- Important: Copy the token immediately and save it securely. You won’t be able to see it again.
Step 3: Configure Claude Desktop
For macOS:
- Open Finder and navigate to
~/Library/Application Support/Claude/ - Create or edit the
claude_desktop_config.jsonfile - Add the following configuration:
{
"mcpServers": {
"github": {
"command": "mcp-server-github",
"args": [],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
}
}
}
For Windows:
- Navigate to
%APPDATA%\Claude\ - Create or edit the
claude_desktop_config.jsonfile - Add the same configuration as above
For Linux:
- Navigate to
~/.config/Claude/ - Create or edit the
claude_desktop_config.jsonfile - Add the same configuration as above
Step 4: Replace the Token
In the configuration file, replace your_github_token_here with the actual token you generated in Step 2.
Example:
{
"mcpServers": {
"github": {
"command": "mcp-server-github",
"args": [],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Step 5: Restart Claude Desktop
- Completely quit Claude Desktop
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"github": {
"command": "mcp-server-github",
"args": [],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
}
}
}