# Chit-chat with Claude and GitHub: The Lazy Developer's Dream Come True

### Introduction

Integrating AI assistants with development tools represents one of the most exciting frontiers in modern software engineering. This blog post explores how to combine Claude for Desktop with GitHub's Model Context Protocol (MCP) server to create a powerful, natural language interface for managing your GitHub repositories. By following this guide, you'll be able to create repositories, manage branches, and push cod all through simple conversation with Claude, streamlining your development workflow and making GitHub more accessible than ever before.

### Pre-requisites

The process is simple, and the basic setup and prerequisites are detailed in [this](https://blogs.codingfreaks.net/beginners-tutorial-configure-and-launch-your-first-mcp-with-claude-for-desktop#heading-pre-requisites) blog post.

To proceed with configuring the GitHub MCP server with Claude for Desktop, there are some additional prerequisites specific to GitHub that you need to address. One of the key requirements is generating a [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) (PAT). This token is essential for authenticating and authorizing access to your GitHub account and repositories. It acts as a secure way to interact with GitHub's API and perform various actions programmatically.

Before you begin, ensure that you have created a PAT and have it readily available for use during the setup process. If you are unfamiliar with what a Personal Access Token is or how to create one, you can find detailed instructions by clicking [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). This guide will walk you through the steps of generating a PAT, explaining its purpose and how it can be used to enhance the security and functionality of your GitHub interactions.

### Configuration

In the "**claude\_desktop\_config.json**" file, please add the following configuration related to the GitHub MCP server. Ensure that you have generated the GitHub Personal Access Token and place it in "GITHUB\_PERSONAL\_ACCESS\_TOKEN".

`{ "mcpServers": { "github": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-github" ],`  
`"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_abcde…." } } } }`

Save the file and start or restart Claude for Desktop. After launching successfully, you can view the available MCP tools by clicking the Hammer icon at the bottom of the chat window.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742318574618/763fad97-30b6-4420-ae68-9ae275c595f2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742318547998/e3cb1564-1b1d-48e7-83d9-19a67f191ead.png align="center")

### Create Repository

Let’s ask Claude to create a repository with the name of helloworld-mcp .

***Chat message :*** create\_repository in github with the name of helloworld-mcp

***Response :***

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742317433776/ec6b1ea1-e19c-42d8-85df-d5bfd5eaf3e2.png align="center")

Wait for few seconds and now you can see, GitHub MCP server + Claude for Desktop created a new public repository.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742317558541/aa95eb7e-25d6-4208-b209-3d86cc94e3ba.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742317592903/e45405e1-ac68-48ba-90d5-f295c68125c5.png align="center")

Let’s try few more options,,,

We will ask Claude to create a new branch called “dev” based on main branch and we will make it as default branch.

### Create Dev Branch

***Chat message :*** create a branch called dev based on main branch and set the dev branch as default for this repo

***Response :***

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742319377197/893d0782-8be2-4e0b-b2de-c0d23be49a74.png align="center")

**Unfortunately**, *Claude said, there is no specific to make the dev branch as default and I made it manually*.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742319331742/f9c7baaf-6811-4418-b01b-c86acb8ac0cc.png align="center")

Let’s ask Claude to create a hello world program in C# in dev branch.

### Create Helloworld program in C-sharp

**Chat message :** create a new helloworld program in c# and push this into helloworld-mcp into dev branch

**Response :**

[![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742319597073/56bcf38b-0e2c-4124-84e3-1fd42459016b.png align="center")](https://github.com/muralidharand/helloworld-mcp)

[![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742319626714/50122915-4e64-4d08-b8e1-a7ae4c24d45e.png align="center")](https://github.com/muralidharand/helloworld-mcp)

### GitHub MCP Server options

**add\_issue\_comment :** Add a comment to an existing issue

**create\_branch :** Create a new branch in a GitHub repository

**create\_issue :** Create a new issue in a GitHub repository

**create\_or\_update\_file :** Create or update a single file in a GitHub repository

**create\_pull\_request :** Create a new pull request in a GitHub repository

**create\_repository :** Create a new GitHub repository in your account

**fork\_repository :** Fork a GitHub repository to your account or specified organization

**get\_file\_contents :** Get the contents of a file or directory from a GitHub repository

**get\_issue :** Get details of a specific issue in a GitHub repository.

**list\_commits :** Get list of commits of a branch in a GitHub repository

**list\_issues :** List issues in a GitHub repository with filtering options

**push\_files :** Push multiple files to a GitHub repository in a single commit

**search\_code :** Search for code across GitHub repositories

**search\_issues :** Search for issues and pull requests across GitHub repositories

**search\_repositories :** Search for GitHub repositories

**search\_users :** Search for users on GitHub

**update\_issue :** Update an existing issue in a GitHub repository

### Conclusion

We've explored how to integrate GitHub MCP server with Claude for Desktop, enabling natural language interactions with GitHub repositories. The setup requires a GitHub Personal Access Token and proper configuration in the `claude_desktop_config.json` file. Our examples demonstrated creating repositories, managing branches, and pushing code through simple conversations with Claude.

The GitHub MCP server offers many additional capabilities we didn't cover, including issue management, pull request creation, and repository searching. This integration streamlines development workflows by allowing developers to use natural language instead of remembering specific commands or navigating multiple interfaces.

As AI assistants continue to evolve, integrations like this one point toward a future where the gap between natural language and code continues to narrow, making development more accessible and efficient for everyone.
