vr
← Writing

MCP Servers 101: Teaching Claude Code to Talk to Your Tools

Connecting an assistant to personal files and small local tools, with a concrete configuration example.

In this note

Claude Code can already work with files, git history, and a terminal. MCP adds a common way to connect other tools: a personal notes folder, a sample database, or a small program you’ve written yourself.

The useful part is the connection. Instead of copying information into a prompt, you give the assistant a tool that can retrieve it.


What Are MCP Servers?

MCP stands for Model Context Protocol. A server describes the tools it exposes, accepts calls from a client, and returns results the assistant can use.

An MCP might let an assistant:

  • Read and search a collection of personal notes
  • Inspect the structure of a sample database
  • Look up information through a public API
  • Call a small local script with structured inputs

The assistant reads the tool descriptions to decide what to call. The server does the actual work.

A quick example

Without a connected tool:

“Find the note where I compared two local models.”

The assistant can only use information it already has access to. You may need to find the note and paste it into the conversation.

With a notes tool connected:

“Find the note where I compared two local models.”

The assistant can search the folder, read the matching files, and return the relevant passage. The tool provides the missing connection.


How the Connection Works

For a local stdio server, Claude Code launches a process and exchanges messages through its standard input and output. No separate web server is needed for that setup.

Remote MCP servers can use HTTP instead. They run elsewhere and may need authentication. The protocol is the same idea; the connection and credentials are different.

Three things are worth keeping in mind:

  • Tools can change things. Some servers expose write or delete operations as well as reads. Review the tool set and the client’s permission settings.
  • Credentials determine access. A server that uses a token can only do what that token permits. Use narrowly scoped credentials when a server needs them.
  • Extra tools add overhead. Only keep servers connected when they are useful for the task at hand.

A Local Filesystem Example

The MCP filesystem reference server is a concrete way to see the protocol in action. Claude Code already has file tools, so this is an example of MCP configuration rather than a prerequisite for ordinary file access.

Use a disposable folder with a few sample Markdown files. The example assumes Node.js and Claude Code are already installed.

1. Prepare a sample folder

On macOS or Linux:

mkdir -p ~/mcp-demo
cd ~/mcp-demo

Add a couple of notes to that folder, such as model-comparison.md and reading-list.md.

2. Register the server

From that folder:

claude mcp add --transport stdio --scope local notes -- npx -y @modelcontextprotocol/server-filesystem "$(pwd)"

The command follows Claude Code’s local-server syntax. Everything after -- is the command used to launch the server. Local scope keeps this configuration associated with the current project rather than every project on the machine.

The filesystem server includes write operations. Its allowed directories can also follow the client’s MCP roots, so inspect the active directories rather than assuming the path argument is the only boundary.

3. Check the connection

claude mcp list
claude mcp get notes

Open Claude Code from the sample folder and try:

“List the Markdown files in this folder, then summarise model-comparison.md.”

A successful result means the assistant can discover and call the server’s tools.


What the Configuration Contains

At its simplest, a local MCP entry records a command and its arguments. For an equivalent project configuration, replace the sample path below with your folder’s absolute path:

{
  "mcpServers": {
    "notes": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/absolute/path/to/mcp-demo"
      ]
    }
  }
}

The configuration tells the client how to start a process. The process supplies the tool descriptions and handles requests.

For a server you’ve written yourself, the command might instead be node, with the path to your entry file in args. That is the same connection pattern used in the SQL Server MCP example.


Keeping the Tool Set Small

It’s tempting to connect every available server. A better starting point is one server that answers a question you actually have.

A notes folder might need search and read operations. A database explorer might need a list of tables, a schema description, and a read-only query. A narrowly defined tool is easier to reason about than a large collection of overlapping capabilities.

Keep the result useful too. A short answer with the relevant fields is easier for the assistant to work with than an enormous dump of unrelated data.


Managing the Connection

claude mcp list
claude mcp get notes
claude mcp remove notes --scope local

List shows the configured servers, get inspects one entry, and remove deletes its registration. Removing the registration does not delete the notes in your folder.

The pattern is simple: connect a tool when it provides information or an action the assistant is missing. Keep its access specific, its descriptions clear, and its output focused.