Predictive Hacks

Mastering Claude’s Model Context Protocol: Unlock Its Full Potential

Anthropic Claude

Anthropic introduced the Model Context Protocol, a new way of connecting AI assistants to powerful tools or giving them the ability to save and interact with the computer. In this tutorial, I will show you how to enable these capabilities and unlock the power of Claude.

Download Claude Desktop

Firstly you need to download Claude Desktop. You can find it in Anthropic’s official website.

model context protocol claude anthropic

Create the config file

if you are using mac you can run the following in your terminal

open Library/Application\ Support/Claude 

Then, in that folder we need to create a file called claude_desktop_config.json you can do this by running:

touch  Library/Application\ Support/Claude/claude_desktop_config.json

Now, you are ready to add your ‘tools’ for Claude.

Adding the Servers/Tools

Now its time to find what which or “Servers” as Anthropic calls them, to add to Claude. You can find the full list by heading over to Model Context Protocol repo.

model context protocol claude anthropic

For this tutorial, we will add two servers: Puppeteer, which can scrape websites, and Filesystem, which allows Claude to write files to our file system. Clicking on a server will redirect you to its page, where you can find the Claude Desktop configuration needed to use it, as shown in the photo below.

Next, you only need to copy and paste it in the claude_desktop_config.json file we created before. Notice that if you have multiple servers, you have to add them under the “mcpServers” as shown below:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/vbonaros/Desktop/claude_files"
      ]
    }
  }
}


Now you are ready to use them. Open Claude Desktop app and you should see on the bottom right corner that you have new MCP tools available.

Claude

Lets ask to visit predictivehacks.com and take a screenshot of the website.

Claude

As you can see, you can now use the chat as normal, but it will have access to the servers/tools we have configured. With this setup, the possibilities are endless! Imagine querying databases, scraping websites, saving data, and all of that by simply chatting with an LLM.

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Leave a Comment

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Python

Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.