MCP is a protocol for connecting an assistant to tools and data sources. To understand the connection, a lab with fictional files is easier to verify than a real account.

In this example, the client is Claude Code and the server is Filesystem, maintained in the Model Context Protocol repository. It supports reading and writing files: the test folder defines the exercise’s scope, but it does not make the server read-only. Filesystem server ↗.

Prepare the lab

This example is for macOS or Linux, with Claude Code and Node.js/npm available. Check the versions in your terminal:

Terminal · check prerequisites
node --version
npm --version
claude --version

Create a dedicated folder with a fictional file. Only use this name if it does not already exist in your environment:

Terminal · create test material
mkdir -p "$HOME/mcp-lab"
cd "$HOME/mcp-lab"
printf 'Local MCP test.\n' > exemplo.txt

Register the server in the client

From the lab directory, register a connection using stdio, a transport in which the client starts the local process. The local scope associates the configuration with the current project. MCP reference for Claude Code ↗.

Terminal · register the example
claude mcp add --transport stdio --scope local arquivos-lab -- \
  npx @modelcontextprotocol/server-filesystem "$HOME/mcp-lab"

The npx command may ask to download the package when the server starts. Check the source before accepting. Then inspect the configuration:

Terminal · verify and start
claude mcp get arquivos-lab
claude

Verify access in the session

Inside Claude Code, open /mcp. Check the connection status and ask the assistant to use the arquivos-labserver: first list the allowed directories, then read exemplo.txt. Inspect the tool call to confirm it used this MCP rather than the assistant’s built-in file reader.

The expected result is the lab folder in the directory list and the fictional sentence in the file read. If it does not connect, investigate Node/npm, the path and startup messages before adding more integrations. If the client sends a list of roots, it can replace the directories set on the command line; check the effective scope using list_allowed_directories.

What this test demonstrates

Successful registration shows that the configuration was saved. An actual tool call shows that the session can use that tool. In another assistant, the configuration and permissions need to be checked again.

To remove just this test configuration, run the following from the same directory:

Terminal · remove the configuration
claude mcp remove arquivos-lab --scope local

This does not delete the lab folder. The commands in this draft were checked against the documentation; the installation was not run to produce this page.

Draft for Davi Wallace’s review. The examples are for learning purposes. This article has not been published yet.