Lazy Me and Claude MCP

This post explores simplifying code generation and management with Claude + Model Context Protocol Filesystem and GitHub Integrations

John Stephens

12/28/202411 min read

Introduction

I'm not much of a coder. I tried to be in college and well... let's just say that there is a reason that I am in professional services and not software engineering. Throughout my career there have been many occasions where automating tasks was clearly the way to go but I simply did not have the skills to automate the task more quickly than I could just perform the task manually and move on to the next one. So that is what I did. I put on some headphones and did the boring stuff. With the release of LLMs like Claude or ChatGPT, the math changed dramatically. Now in the time that it takes to hammer out a few sentences describing what I want a script to accomplish I will have something that I can test and often use to automate away some boring task with minimal modification. With that the barriers toward automation of some tasks become really minor... copying and pasting code from your LLM of choice into your IDE of choice and making sure you have the formatting correct, generating the entire script every time so that you paste the appropriate code in to the appropriate sections, learning Git so that you manage your code in a way that makes sense, etc. Though this was a lot easier than writing the code myself it felt like a couple integrations could make the process even more efficient. That is where Model Context Protocol integrations come in to play.

First time hearing about the Model Context Protocol? Here is a quick summary from Anthropic:

"The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools. The architecture is straightforward: developers can either expose their data through MCP servers or build AI applications (MCP clients) that connect to these servers."

For the purposes of this post, Model Context Protocol is a way for you to give Claude access to your local file system and GitHub repositories.

In this post I will provide some guidance on how to configure the filesystem and GitHub integrations based on my experience and provide some examples of how the integrations have helped me get more out of my interactions with Claude.

Challenges Before the Claude MCP Filesystem Integration

Claude Can't Access The Internet

Ok, so I can't just ask Claude to check out the online guide to use as a configuration reference. No big deal. I'll just download the guide, upload it to Claude as an attachment and move forward that way.

Claude currently supports attaching up to 20 files at a time with a maximum size of 30MB/file. As a note, just because a file is under 30MB in size does not mean that Claude will be able to read the entire file.

Copy/Paste Complications

Before the filesystem integration my typical workflow would look something like this:

Prompt Claude to create a script based on a brief list of requirements, Copy the generated code into Visual Studio Code, Install required dependencies, Execute. Errors? Copy them over to Claude to have changes made, copy the changes into Visual Studio code, Execute. Repeat until the desired outcome is achieved or there are no more tokens to burn.

A little tedious, sure, but still lightning fast when compared to the amount of time that it would take for me to write the code myself. That said, I would often find myself asking Claude to generate the entire script after a couple of iterations because I had either copied over something incorrectly, added a function to the script that already existed, or created a formatting issue that I could not easily resolve. Even still, pretty trivial issues until Claude's massive rise in popularity.

Keeping it Concise

If you are currently a Claude user you have no doubt seen the pop-up letting you know that Claude is defaulting to 'Concise Mode' due to high request volume. To work with Claude in concise mode effectively, we need a new approach. Laziness simply will not cut it here. The solutions that Claude offers are not as robust and in my experience attempting to generate the entire script does not go well. I have found that taking a modular programming approach is more effective, but also requires a lot more effort. Now we have all of the minor issues described above with each module. Depending on the number of modules that you are working with this can go from being a minor annoyance to a major drop in productivity.

Overcoming with the Filesystem integration

Internet Access

The filesystem integration will not give Claude access to the internet, but it will save you the step of having to upload the file to your chat. While it is hard to argue that this in itself is a game-changer, the advantage does become a bit more clear as you continue with the chat. As mentioned above in the challenges section, you might have a file that is under the file size limit to upload to Claude, but is too long for Claude to read. You could work around this by parsing the document, copying the relevant sections into a separate file and then uploading that file to Claude and that would likely get the job done, but for me, this is exactly the kind of boring stuff that I am trying to automate away. Why not instead have file generate a script that will parse the document for you, create the document with the relevant content and then use the newly generated document to accomplish the task that you wish to accomplish? The filesystem integration allows you to do just that. As a bonus, you get a script that might be useful for future coding projects.

What if that script doesn't quite work the way that you were hoping? No problem. Let Claude know and have a debug script generated to figure out what went wrong.

Overcoming Concise Mode Limitations with Modular Programming

So how do you use Claude for code generation when resources are constrained? My response would be to use modular programming (breaking the program down into smaller parts) and troubleshooting those parts separately. While this can help you to use your tokens more effectively, it does introduce some other challenges such as making sure you have the appropriate folder structure in place for your code and you are importing modules appropriately.

Before MCP this meant that I had to have Claude generate the code for each module, copy the code for each module into a file in the appropriate location and work on each of them separately (ideally in separate chats). Here's an example from the development of a small project called "Mesh-Me" developed to generate the configuration required to create a BGP-enabled VTI overlay network using Cisco ASAs:

Challenges Before the GitHub Integration

As stated in the introduction, I am not a coder. While I understand the basics of using Git, it is not something that I use very frequently so I never really got beyond the basics of cloning a repository, committing changes, and pushing changes to GitHub. If we start to talk about branches or more in-depth CI/CD concepts I can generally follow what is being said, but it's not something that is really a part of my job and it just doesn't stick. Before the Claude MCP GitHub integration, working with Git usually looked like the below example... stumbling through verifying that changes to the appropriate files were seen with git status, adding the appropriate file, typing "get" rather than "git" at least one time, commit, push.

Overcoming Challenges with the GitHub Integration

Learning the basics of Git isn't really all that tough, but if you don't use it consistently or just want to automate that away, this one is for you. With the Claude MCP GitHub integration Claude can push your code to GitHub and even write a readme for you based on Claude's understanding of the code! The only problem is, at the time of writing this article, Claude thinks that the API implementation is broken.

While I do appreciate the effort that Claude puts in to try to work through the issue, we actually end up further away from resolving the problem. Luckily, I was able to work with Claude to come up with a prompt that will result in a successful push to GitHub and here it is:

Please create and populate a GitHub repository following these steps:

1. Create repository "my-new-repo" (private: false, autoInit: false)

2. Add README.md with the following content: [content here]

3. Add script.py with the following content: [content here]

Please add files one at a time using create_or_update_file. I understand there will be errors about content.encoding and content.content being required - these can be ignored. Please verify after each step that the files were created successfully.

Here is an example of a slightly modified version of the prompt that I used to successfully create a new repo in GitHub, create a readme file, and upload a script:

Reviewing this now, there are some changes that would likely improve the prompt. For example, adding the python script before adding the readme will likely result in a much more detailed readme. I also haven't tested creating a branch, but that is a problem for another post.

Closing Thoughts

Moving into 2025 I can't help but feel like I am way behind in writing this post. The focus when it comes to AI seems to have shifted to agents in a huge way. Occasionally I still see some posts about LLM benchmarks, but at least for me they appear to be the exception to the rule. Taking a step back from agents specifically I think that there is going to be a lot of value that is unlocked by facilitating AI integration. One quick example that I will provide is an app called Claude Engineer that I stumbled across on X.

https://github.com/Doriandarko/claude-engineer.git

The app offers a suite of tools that integrate with Anthropic's API that "enables Claude to generate and manage its own tools, continuously expanding its capabilities through conversation."

As a test I decided that I would ask Claude engineer to fix the peer to peer configuration functionality of the Mesh-Me project. At the time, the Hub/Spoke and Full Mesh options seemed to be working well with all of the relevant configuration being produced but for whatever reason tunnel-group configuration was not being produced when the user chose to generate peer-to-peer configuration. To prompt Claude engineer I shared the file path on my local machine and essentially just wrote out what I have explained above. I did not mention what modules should be looked at or what I thought was incorrect... just that the tunnel group configuration was not being produced. After a short period of "Thinking..." Claude engineer reported that the job was done. I launched the app to do a quick test and sure enough, issue resolved. Now the only thing to do was to check how much it cost me...

20 cents. Not too bad for a solution that came from basically no effort on my part. I am confident that I am only scratching the surface of what Claude Engineer can do, but a deep dive is a bit out of scope of this post. The point is, we might already be past the point where LLM subscriptions really make sense. Agents and apps like Claude Engineer leverage APIs so whether it makes sense to have a subscription seems like a legitimate question, but one for another post.

Claude MCP Setup

MacOS

1) Install Claude Desktop. The installer can be found here: https://claude.ai/download

2) Install uv/uvx by entering in the following command in your terminal: curl -LsSf https://astral.sh/uv/install.sh | sh

3) Enter the following command in your terminal to install node.js: brew install node

4) Generate a Personal Access Token for the GitHub integration. Here's how to get that done:

Go to Personal access tokens (in GitHub Settings > Developer settings)

  • Select which repositories you'd like this token to have access to (Public, All, or Select)

  • Create a token with the repo scope ("Full control of private repositories")

    • Alternatively, if working only with public repositories, select only the public_repo scope

  • Copy the generated token

Finally, we will need to modify the claude_desktop_config.json file with the MCP integrations that we would like to use. To modify the file, you will need to open Developer Settings in the Claude Desktop app (Claude > Settings... > Developer Config). If you are using only the filesystem and GitHub integrations, your claude_desktop_config.json file should look something like this:

Windows

1) Install Claude Desktop. The installer can be found here: https://claude.ai/download

2) Install node.js. The installer can be found here: https://nodejs.org/en/download

3) Verify your node installation directory by entering the following command into the command prompt (doesn't seem to work in Powershell): where node

You will need this install location for the claude_desktop_config.json file configuration later

4) Find your global npm packages location (also needed later for the claude_desktop_config.json file) with npm root -g

5) Install the required packages globally:

npm install -g @modelcontextprotocol/server-filesystem

npm install -g @modelcontextprotocol/server-github

6) Verify installation:

npm list -g @modelcontextprotocol/server-filesystem

npm list -g @modelcontextprotocol/server-github

7) Generate a Personal Access Token. To do so, go to Personal access tokens (in GitHub Settings > Developer settings)

  • Select which repositories you'd like this token to have access to (Public, All, or Select)

  • Create a token with the repo scope ("Full control of private repositories")

    • Alternatively, if working only with public repositories, select only the public_repo scope

  • Copy the generated token

8) Modify the claude_desktop_config.json file. In the Claude Desktop app, go to File > Settings... > Developer and click Edit Config. Open the claude_desktop_config.json file to edit. If you are using only the filesystem and GitHub integrations, your claude_desktop_config.json file should look something like this:

One Step Closer to Eliminating Copy/Paste

What if we output the script errors to a file and ask Claude to modify the code based on the results of the debugging? Before the text shown below I asked Claude to save the output from the PDF Parser Script and the Debugging script to the working directory. Now rather than copying and pasting errors into the chat I can simply ask Claude to review the output files and make changes accordingly. Now the workflow has been cut down to Chatting with Claude and executing the script(s).

After manually generating the individual files, making changes to any of them was a simple as describing the change that I wanted to make and allowing Claude to do the rest. No uploading of files, no need to specify what file or files needed to be changed, just making the request is enough. Prompt Claude to do this from the start of the chat and Claude will generate the files for you.

Now that we have explored what the filesystem integration can do to help you work with Claude more effectively, let's take a look at what the GitHub Integration has to offer.