MCP Catalogs
Homelazy-mcp screenshot

lazy-mcp

by voicetreelab·87·Score 46

Lazy MCP proxy server that loads tools on-demand to reduce context window usage and token consumption.

developer-toolsai-llmproductivity
12
Forks
6
Open issues
4 mo ago
Last commit
2d ago
Indexed

Overview

Lazy MCP is a sophisticated proxy server that implements hierarchical tool organization with lazy loading capabilities. It intercepts MCP tool requests and only activates servers when specific tools are actually needed, significantly reducing context pollution and token consumption. The server exposes two meta tools: 'get_tools_in_category' for browsing tool hierarchies and 'execute_tool' for on-demand tool execution. This approach can save substantial tokens, as demonstrated in their example where it reduced context usage by 17% (34,000 tokens).

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Reducing context window usage in large LLM applications with numerous MCP tools
you:Implementing permission controls for sensitive tools through Claude Code hooks
you:Organizing and categorizing multiple MCP servers into a coherent hierarchy
you:How does lazy loading save tokens?
you:Can I control which tools require permission?

When to choose this

Choose Lazy MCP when you need many MCP tools but face context window limitations, or when you require fine-grained permission control for sensitive operations across multiple MCP servers.

When NOT to choose this

Don't choose Lazy MCP if you have minimal MCP tools that fit within your context window, or if you can't afford the added complexity of a proxy layer.

Tools this server exposes

2 tools extracted from the README
  • get_tools_in_categoryget_tools_in_category(path)

    Navigate the tool hierarchy to explore available tools and categories

  • execute_toolexecute_tool(tool_path, arguments)

    Execute tools by their hierarchical path with lazy loading support

Comparable tools

mcp-proxynomic-mcpmcp-x

Installation

Installation

  1. Clone the repository:
git clone https://github.com/voicetreelab/lazy-mcp.git
cd lazy-mcp
  1. Build the proxy server:
make build
  1. Configure by setting up your hierarchy structure:
./build/structure_generator --config config.json --output testdata/mcp_hierarchy
  1. Add to Claude Code:
claude mcp add --transport stdio mcp-proxy build/mcp-proxy -- --config config.json
  1. Set up permission hooks if needed (see README for details).

FAQ

How does lazy loading save tokens?
Lazy MCP only activates MCP servers when specific tools are actually requested, rather than loading all tools at startup. This keeps unused tool instructions out of the context window, significantly reducing token consumption.
Can I control which tools require permission?
Yes, Lazy MCP supports multiple permission control methods: Claude Code native hooks, token-based hooks, and an OpenCode plugin. These allow you to define sensitive tools that require confirmation before execution.

Compare lazy-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.