LESSON 2 of 5//Agentic CLI & MCP
Installing and running MCP servers
MCP servers are installed via npm (for Node.js servers) or other package managers. They run as local processes that communicate with AI applications through standard input/output (stdio) or HTTP.
Installing MCP serverszsh // interactive
# Install the official filesystem MCP server
➜~npm install -g @modelcontextprotocol/server-filesystem
# Install the SQLite MCP server
➜~npm install -g @modelcontextprotocol/server-sqlite
# Run a server directly with npx (no install needed)
➜~npx @modelcontextprotocol/server-filesystem /path/to/dir
Configuration (Claude Desktop example)zsh // interactive
# Edit the Claude Desktop config file
➜~code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# The config maps server names to commands:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/Users/dev/projects"]
}
}
}
!
Security note
MCP servers have real access to your system. Only install servers from trusted sources, and limit directory access to specific project folders — never expose your entire home directory.
PRACTICE//Try the commands from this lesson
INTERACTIVE_TERMINAL//sandbox
Practice terminal — try the commands from this lesson!
Type 'help' for available commands. Tab completion not available in simulator.
Try: