Master the essential terminal commands — the indispensable tool for working with MCP Servers.
The terminal is a text interface that lets you control your computer by typing commands instead of clicking icons. Although it may seem intimidating at first, the terminal is the most powerful tool available to a developer. All MCP Servers are started, tested, and debugged from the terminal — mastering it is essential for this course.
O terminal (also called a console, shell, or command line) is a text-based interface for interacting with the operating system. While a graphical interface limits you to the options visible on the screen, the terminal gives you direct access to everything that the system can do. In the macOS, use Terminal or iTerm2. On Windows, use PowerShell or WSL (Windows Subsystem for Linux). On Linux, any terminal emulator works (GNOME Terminal, Konsole, Alacritty, etc.).
Think of the terminal as the more powerful remote control of your computer. The graphical interface is like the buttons on a TV remote—it limits you to a few predefined functions. The terminal is like having access to the TV's engineering menu: you can do absolutely anything, as long as you know the right command. And in the world of MCP, everything happens in the terminal.
Navigating the file system is the most fundamental terminal skill. Just as you click folders in a file explorer, in the terminal you use commands to enter directories, list their contents, and find where you are. You’ll use these commands constantly when working with MCP Servers.
The essential navigation commands are:
cd pasta — Enters a directory (Change Directory)ls — Lists files and folders (Mac/Linux). On Windows: dirpwd — Shows the current directory (Print Working Directory)cd ~ — Goes to the user's home directorycd .. — Goes up one level (parent directory)Execute pwd to see your current directory. You usually start in the home folder: /home/seuusuario (Linux) or /Users/seuusuario (Mac).
Execute ls to list files and folders. Use ls -la to see hidden files and details such as size and modification date.
Use cd Documents to enter the Documents folder. Use cd .. to go back. Combine: cd ../outra-pasta go back and enter another folder in one go.
pwd before actingcd ~ to quickly return to homeIn addition to navigating, you need to know how to create, copy, move, and delete files and folders from the terminal. These operations are essential for organizing your MCP projects, creating configuration files, and managing your servers’ source code.
The essential file manipulation commands are:
mkdir pasta — Creates a new folder (Make Directory)touch arquivo — Creates an empty file (Mac/Linux). Windows: echo. > arquivocp origem destino — Copies a filemv origem destino — Moves or renames a filerm arquivo — Deletes a file (permanently!)Practice by creating the structure of an MCP project:
mkdir meu-mcp-server
cd meu-mcp-server
touch server.py README.md
mkdir src tests
Use extreme caution with rm -rf! This command permanently deletes folders and all their contents, without a trash bin, confirmation, or any possibility of recovery. Never run rm -rf / or rm -rf ~ — this can destroy your entire system. Always check the path with pwd e ls before deleting anything.
To create and modify MCP Servers, you need to edit code files. There are text editors in the terminal (such as nano and vim) and graphical editors with terminal integration (such as VS Code). For this course, we recommend VS Code as the main editor and the nano as a quick alternative in the terminal.
The three most useful editing tools for the course:
nano arquivo — A simple terminal editor. Ctrl+O to save, Ctrl+X to exit. Ideal for quick edits.code arquivo — Opens in VS Code. Requires VS Code to be installed and the command code configured in the PATH.cat arquivo — Displays a file's contents in the terminal without editing it. Useful for quickly checking settings.:q!)As your projects grow, finding files and searching for specific text in your code becomes essential. The terminal offers powerful search tools that are much faster than any graphical interface — especially useful for debugging MCP Servers and finding configurations.
The three essential search tools:
find . -name "*.py" — Searches for files by name. The dot (.) means "starting from the current directory".grep "texto" arquivo — Searches for text inside files. Use -r to search recursively through folders.| — The pipe chains commands: the output of one becomes the input of the next. Example: ls | grep "server".Practical examples for MCP projects:
grep -r "fastmcp" .
— Finds all references to FastMCP in the project
find . -name "*.json"
— Lists all JSON files (MCP configuration)
cat config.json | grep "server"
— Shows lines containing "server" in the configuration
Developers who master the terminal are, on average 30% more productive than those that rely exclusively on graphical interfaces, according to Stack Overflow research. The command grep is used alone billions of times per day around the world. Modern tools like ripgrep (rg) are even faster — searching projects with millions of lines in milliseconds.
Mastering terminal keyboard shortcuts transforms your work speed. Instead of typing every character in a long path, you can autocomplete with Tab. Instead of retyping a command, you can retrieve it from your history. These shortcuts may seem small, but they save hours over the course of a project.
The four shortcuts every MCP developer needs to know:
Autocompletes file, folder, and command names. Press twice to see all options.
Browse command history. Retrieve any previous command without retyping it.
Cancels the current command. Essential for stopping running MCP Servers.
Clears the terminal screen. Equivalent to the command clear.
Bonus shortcuts that make your workflow even faster:
sudo !! reruns the last command with sudo.Next Module: 2.4 — Installing Claude Desktop