Getting Started with Model Context Protocol (MCP) Servers

Claude recently introduced the MCP (or Model Context Protocol) which is an open standard for establishing unified context interaction between AI models and development environments. This allows AI models to more easily understand and interact with and process code.

For this example, let's see how we can use an MCP Server to create a file named "HelloWorld.md" with the content "Hello World, my name is Xavier".

Note: MCP Servers are currently local only (remote are in progress)

Installing Claude

To install Claude, we simply go to https://claude.ai/download and install it for our operating system. Once it is installed, we login to the application.

Installing the MCP

For filesystem operations, Antrophic created the Filesystem MCP. So let's enable it by opening up the Developer Settings panel within Claude and edit the claude_desktop_config to create an MCP Server configuration.

Once this file is opened (for me my path is /Users/xaviergeerinck/Library/Application\ Support/Claude/claude_desktop_config.json) we can configure it with:

{
    "mcpServers": {
        "filesystem": {
            "command": "/Users/xaviergeerinck/.bun/bin/bunx",
            "args": [
                "@modelcontextprotocol/server-filesystem",
                "/Users/xaviergeerinck/Desktop",
                "/Users/xaviergeerinck/Downloads"
            ]
        }
    }
}
Note: Bun I used bun to start this. You can also use node through npx or pnpx. The directories you see are the one the MCP Server is allowed to utilize.
Warning: Bun is installed at user level, so ensure you provide the full path as shown above, otherwise you might get spawn bun ENOENT on Claude startup.

Restarting Claude, now shows my MCP Tools being available (see the Hammer icon):

Demo

When I now ask Claude to write my file, it will correctly do so.

When I now open that file, I can correctly see my content:

Super exciting to see how easy this was! APIs can be integrated in a brink by simply implementing the available OpenAPI specs with a custom MCP. For more information, check out their official quickstart guide: https://modelcontextprotocol.io/quickstart/