Load only the Claude Code tools each project needs

Using one global MCP for Claude Code across work and personal projects can load tools that are not needed. This wastes and can make tools intended for one project type available in another.

A small zsh wrapper checks the current folder path or the when Claude Code starts. It then selects a separate MCP for work, personal, web, or another defined project type.

Keeping unrelated tools out of the session reduces token use and separates different project environments. The same approach can be adapted to other shells.

Key points

  • Create separate Claude Code s for work, personal, and web projects.
  • Use a zsh wrapper to inspect the current folder path or .
  • Automatically select the matching MCP when Claude Code starts.
  • Exclude unnecessary tools to reduce and unwanted tool exposure.
  • Adapt the same selection rules to other shells if needed.
Read original