
petercha90/mcp-lazy-load
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
🫠 コンテキストウィンドウを食べるMCPツール? 1つのコマンドで、すべてのAIエージェント間での需要を遅延ロードします.
概要
█████╗ ██╗ ████╗ ████╗ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ MCP のコンテキスト ウィンドウ トークンの使用量を 90% 以上減らします。 1つのコマンド設定。 - MCP サーバは、起動時にすべてのツール定義をコンテキストウィンドウに読み込みます。 5-10サーバでは、コンテキストウィンドウの30〜50%を消費できます。 ツールをオンデマンドにロードする単一の軽量プロキシを介してすべてのMCPサーバーをプロキシします。 ツールのキャッシュを事前にビルド(推奨): - add コマンドは、エージェントの既存の MCP 設定を読み込み、全てのサーバー定義を ~/.mcp-lazy/servers.json に保存し、エージェントのコンフィグを mcp-lazy プロキシエントリのみに置き換えます。 - 最初のエージェントセッションが即座に開始するように、ツールキャッシュを初期ビルドします.
概要(AI 翻訳)
██╗ ██╗ █████╗ █████╗ ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔══██╗╚══███╔╝╚██╗ ██╔╝ ███████║ ███╔╝ ███╔╝ ╚████╔╝ ██╔══██║ ██╔══██║ ███╔╝ ███╔╝ ███████╗██║ ███████╗██║ ██║███████╗ ██║███████╗ ╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝╚══════╝
mcp-lazy 🫠
お問い合わせ
MCP のコンテキスト ウィンドウ トークンの使用率を 90% 以上減らして下さい 遅延ローディングを使って。 1つのコマンド設定。
- MCP サーバは、起動時にすべてのツール定義をコンテキストウィンドウに読み込みます。 5-10サーバでは、コンテキストウィンドウの30〜50%を消費できます。 mcp-lazyは、オンデマンドのツールをロードする単一の軽量プロキシを介してすべてのMCPサーバーをプロキシします。
[82 tools exposed at startup]
【T1】
クイックスタート
あなたの代理店のための1つを選んで下さい:
ツールのキャッシュを事前にビルド(推奨):
- [
addコマンドは、エージェントの既存の MCP 設定を読み込み、すべてのサーバー定義を~/.mcp-lazy/servers.json] に保存し、エージェントのコンフィグを mcp-lazy プロキシエントリのみに置き換えます。 - [[
init] ツールキャッシュをあらかじめビルドして、最初のエージェントセッションが即座に開始します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
███╗ ███╗ ██████╗██████╗ ██╗ █████╗ ███████╗██╗ ██╗ ████╗ ████║██╔════╝██╔══██╗ ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝ ██╔████╔██║██║ ██████╔╝█████╗██║ ███████║ ███╔╝ ╚████╔╝ ██║╚██╔╝██║██║ ██╔═══╝ ╚════╝██║ ██╔══██║ ███╔╝ ╚██╔╝ ██║ ╚═╝ ██║╚██████╗██║ ███████╗██║ ██║███████╗ ██║ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝
mcp-lazy 🫠
Reduce MCP context window token usage by 90%+ with lazy loading. One command setup.
- MCP servers load all tool definitions into the context window at startup — even before you use them. With 5-10 servers, this can consume 30-50% of your context window. mcp-lazy proxies all your MCP servers through a single lightweight proxy that loads tools on-demand.
82 tools exposed at startup
👇 Just 2 with mcp-lazy
Quick Start
Pick one for your agent:
npx mcp-lazy add --cursor # Cursor
npx mcp-lazy add --antigravity # Antigravity
npx mcp-lazy add --opencode # Opencode
npx mcp-lazy add --all # or all at once
Then pre-build the tool cache (recommended):
npx mcp-lazy init
-
The
addcommand reads your agent’s existing MCP config, saves all server definitions to~/.mcp-lazy/servers.json, and replaces the agent config with only the mcp-lazy proxy entry. -
initpre-builds the tool cache so your first agent session starts instantly. Without it, the first session will be slightly slower while mcp-lazy discovers tools from all servers.Tip: Installed a new MCP server? Just re-run
npx mcp-lazy add --— no extra steps.
How It Works
Without mcp-lazy:
Agent → MCP Server A (50 tools) + Server B (30 tools) + Server C (20 tools)
= 100 tools loaded at startup (~67,000 tokens)
With mcp-lazy:
Agent → mcp-lazy proxy (2 tools only, ~350 tokens)
↓ on-demand
Server A / B / C (loaded only when needed)
URL servers (Notion, Slack, etc.) via mcp-remote bridge
The proxy exposes just 2 tools:
- mcp_search_tools — Search available tools by keyword
- mcp_execute_tool — Execute a tool (lazy-loads the server on first call)
What add Does
- When you run
npx mcp-lazy add --, it:
- Reads your agent’s existing MCP server config
- Extracts all server definitions (stdio and URL-based)
- Converts URL servers (OAuth-requiring services like Notion, Slack) to stdio commands using
npx mcp-remote - Saves everything to
~/.mcp-lazy/servers.json - Replaces the agent config with only the mcp-lazy proxy entry
- The proxy reads from
~/.mcp-lazy/servers.jsonat runtime — that’s where all your server definitions live after setup.
Supported Agents
| Agent | Status |
インストール
npx mcp-lazy add --cursor # Cursor