The Model Context Protocol (MCP) lets your AI agent take actions in the real world — reading files, running shell commands, querying databases, or calling custom scripts — without any changes to the model itself. When the model decides to use a tool, the Claude Code CLI executes it locally on your machine and feeds the result back into the conversation. The remote model on your LM Studio server only sees a JSON payload describing the tool call; all execution happens on your local workstation.Documentation Index
Fetch the complete documentation index at: https://reliatrack.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How MCP tools work
When you send a message to your agent, the CLI includes a description of every installed MCP tool in the request. The model reads these descriptions and, when appropriate, responds with a structured tool-call instruction. The CLI intercepts that instruction, runs the corresponding command on your machine, and sends the output back to the model as a follow-up message. This cycle repeats until the model produces a final answer.Because tool execution is local, adding MCP tools does not require any changes to your LM Studio server or the model it is running. You only configure tools on the machine running the Claude Code CLI.
Prerequisites
- Claude Code CLI installed and connected to your local model (see Connect Claude Code CLI to your local model)
- The command or binary you want to expose as a tool must be installed and available in your shell’s
PATH
Understand the add command syntax
All MCP tools are registered with the same command:
<name>is the identifier the model uses to refer to the tool.<command>is the binary or script to execute when the tool is invoked.- Additional arguments after the command are passed to the binary each time it runs.
mcp add once per tool.Add a filesystem tool
A filesystem tool lets the agent read, list, and write files on your machine. If you have an MCP-compatible filesystem server available (for example, one installed via npm), register it like this:Replace
/path/to/allowed/directory with the root directory you want to grant the agent access to. The server restricts all file operations to that path.Add a shell tool
A shell tool lets the agent run arbitrary commands on your machine. Use this for tasks like running tests, building projects, or querying system state.
Add a custom script as a tool
You can wrap any script or executable as an MCP tool. For example, to expose a Python script that queries an internal API:The script must implement the MCP stdio protocol — it reads JSON tool-call requests from stdin and writes JSON responses to stdout.
Add a web fetch tool
A web fetch tool allows the agent to retrieve content from URLs, useful for reading documentation or checking external resources during a task:
List installed MCP tools
To see every tool currently registered with the CLI, run:The output shows each tool’s name and the command it maps to:
Remove a tool
To unregister a tool, pass its name to The tool is removed immediately. Running
mcp remove:claude mcp list afterwards confirms it is gone.Verify a tool is working
Start a new Claude session and ask the agent to use the tool directly. For example, to verify the filesystem tool:If the tool is correctly installed, the agent invokes it, receives the file listing, and includes that information in its response. You can watch the tool call appear in the CLI output as the agent works.