Claude Code + Local MCP — Building My Own Terminal Agent

Haram

@haram

When using Claude Code, a powerful AI agent that runs in the terminal, you sometimes want to give it access to your own file system or custom local tools beyond its built-in features. This is where Model Context Protocol (MCP) comes in handy. By connecting a local MCP server, you can build a powerful, customized assistant perfectly suited for your terminal environment.

The setup process is much simpler than you might think. You don't need to fiddle with complex configuration files; you can register an MCP server for local file system control instantly with just a single command in your terminal.

bash
# 로컬 디렉터리를 탐색하는 파일 시스템 MCP 서버 추가
claude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path/to/folder

Configurations added this way are saved in ~/.claude/settings.json and managed globally at the user level. If you want to share the same MCP server across a team project, you can also commit a .claude/settings.json file to your Git repository. If you're having connection issues or want to verify that things are linked correctly, you can try typing the /mcp command within a Claude Code session, or easily debug by adding the claude --mcp-debug option when executing. 😄

As a quick tip, due to recent security enhancements, project-level MCP servers sourced from untrusted repositories will remain paused until you go through the Workspace Trust check. Since terminal environments can directly interact with system privileges, I recommend making it a habit to briefly verify that your server configurations are trustworthy before running them!