Skip to main content

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.

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.

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
1

Understand the add command syntax

All MCP tools are registered with the same command:
claude mcp add <name> <command> [args...]
  • <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.
The configuration is saved persistently — you only need to run mcp add once per tool.
2

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:
claude mcp add filesystem npx @modelcontextprotocol/server-filesystem /path/to/allowed/directory
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.
3

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.
claude mcp add shell bash
Granting shell access means the model can execute any command your user account can run. Only enable this tool in environments you control and trust. Consider using a more restricted tool for production workflows.
4

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:
claude mcp add internal-api python3 /home/user/scripts/query_api.py
The script must implement the MCP stdio protocol — it reads JSON tool-call requests from stdin and writes JSON responses to stdout.
5

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:
claude mcp add fetch npx @modelcontextprotocol/server-fetch
6

List installed MCP tools

To see every tool currently registered with the CLI, run:
claude mcp list
The output shows each tool’s name and the command it maps to:
filesystem   npx @modelcontextprotocol/server-filesystem /home/user/projects
shell        bash
fetch        npx @modelcontextprotocol/server-fetch
internal-api python3 /home/user/scripts/query_api.py
7

Remove a tool

To unregister a tool, pass its name to mcp remove:
claude mcp remove internal-api
The tool is removed immediately. Running claude mcp list afterwards confirms it is gone.
8

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:
claude "List the files in my current directory using 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.
If the agent does not invoke the tool, try asking more explicitly: “Use the filesystem MCP tool to list files in /home/user/projects.” Clear instructions help the model choose the right tool, especially when multiple tools are installed.

Next steps

Now that your agent has tools, explore Choose the right AI model to pick a model that handles complex multi-step tool chains reliably.