AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Mcp Tool Search

mcp-kgt24k-mcp-tool-search · by KGT24k

MCP proxy server — 85-96% token savings via lazy tool loading & fuzzy search across 100+ MCP servers. npm i mcp-tool-search

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add mcp-kgt24k-mcp-tool-search

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-kgt24k-mcp-tool-search)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Mcp Tool Search? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MCP Tool Search

[](https://www.npmjs.com/package/mcp-tool-search) [](https://www.npmjs.com/package/mcp-tool-search) [](https://www.npmjs.com/package/mcp-tool-search) [](LICENSE) [](https://nodejs.org/) [](src/__tests__)

Reduce MCP tool-definition context overhead by ~85–96%.

MCP Tool Search is a proxy server that replaces dozens of MCP tool schemas in your model's context window with just 4 lightweight tools. Instead of loading every tool definition upfront, the model searches for tools on-demand and calls them through the proxy.

Before: 50 tool schemas loaded → ~10,000 context tokens consumed every turn
After:  4 proxy tools loaded   →    ~600 context tokens (constant)

Problem

Every MCP server you add dumps its full tool schemas into the model's context window. With 5+ servers and 40+ tools, that's 8,000–20,000+ tokens of schema definitions the model must process on every single turn — even when it doesn't use any of them.

Solution

MCP Tool Search sits between your MCP client and your backend servers:

  1. Catalog Builder pre-scans all your MCP servers and snapshots their tool definitions to a local JSON file
  2. Proxy Server exposes only 4 tools — the model searches, inspects, and calls tools through the proxy
  3. Lazy Connections — backend servers are spawned on first use and kept alive for 5 minutes
MCP Client ←→ MCP Tool Search Proxy ←→ Backend MCP Servers
                     ↓                    (lazily spawned)
               catalog.json             Context7, GitHub, etc.
               (pre-built snapshot)

The 4 Proxy Tools

| Tool | Purpose | |------|---------| | search_tools | Fuzzy-search across all backend tools by keyword or capability | | get_tool_schema | Retrieve the full input schema for a specific tool | | call_tool | Execute a tool on its backend server through the proxy | | list_servers | List all cataloged servers and their connection status |

Quick Start

npx mcp-tool-search --help
# Or: npm install -g mcp-tool-search && mcp-build-catalog && mcp-tool-search

Installation

Option A: npm (recommended)

npm install -g mcp-tool-search

Option B: From source

git clone https://github.com/KGT24k/mcp-tool-search.git
cd mcp-tool-search
npm install
npm run build

Setup

1. Configure backend servers

MCP Tool Search reads your MCP client's server configuration to discover backend tools. It uses the same .mcp.json format as Claude Code.

2. Build the tool catalog

# If installed globally:
mcp-build-catalog

# If from source:
npm run catalog

This connects to each configured MCP server, snapshots their tool definitions, and writes catalog.json. The proxy itself is automatically excluded from the catalog.

3. Add the proxy to your MCP client

Choose your client below for the correct configuration:

Claude Code

Add to your .mcp.json in the project root (or ~/.mcp.json for global config):

{
  "mcpServers": {
    "mcp-tool-search": {
      "command": "npx",
      "args": ["-y", "mcp-tool-search"]
    }
  }
}

Or if installed from source:

{
  "mcpServers": {
    "mcp-tool-search": {
      "command": "node",
      "args": ["/path/to/mcp-tool-search/dist/index.js"]
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcp-tool-search": {
      "command": "npx",
      "args": ["-y", "mcp-tool-search"]
    }
  }
}

Cursor

Add to your Cursor MCP settings (.cursor/mcp.json in your project or global config):

{
  "mcpServers": {
    "mcp-tool-search": {
      "command": "npx",
      "args": ["-y", "mcp-tool-search"]
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "mcp-tool-search": {
      "command": "npx",
      "args": ["-y", "mcp-tool-search"]
    }
  }
}

4. Disable direct backend servers

Remove or disable your other MCP server entries in .mcp.json — the proxy handles all tool calls to them now.

Environment Variables

| Variable | Default | Purpose | |----------|---------|---------| | MCP_TOOL_SEARCH_CATALOG | ./catalog.json | Path to the catalog file | | MCP_TOOL_SEARCH_METRICS | (none) | Path to write JSON metrics (for monitoring dashboards) |

Token Savings

The proxy's token footprint is constant — 4 tools regardless of how many backend servers exist.

| Backend Tools | Direct Tokens | Proxy Tokens | Savings | |---|---|---|---| | 10 | ~2,000 | ~600 | 70% | | 25 | ~5,000 | ~600 | 88% | | 50 | ~10,000 | ~600 | 94% | | 100 | ~20,000 | ~600 | 97% | | 200 | ~40,000 | ~600 | 99% |

See [BENCHMARKS.md](BENCHMARKS.md) for detailed methodology and measurements.

Security

MCP Tool Search uses an allowlist-based environment filter when spawning backend servers. Only explicitly safe environment variables (PATH, HOME, NODE_PATH, etc.) are forwarded to child processes. API keys, tokens, and secrets from your shell environment are never leaked to backend servers unless explicitly configured in the catalog's per-server env block.

Additional security measures:

  • Connection cap: Max 20 concurrent server connections (oldest idle connection evicted when limit reached)
  • Connect timeout: 15-second timeout on server spawn
  • Idle cleanup: Connections auto-close after 5 minutes of inactivity
  • No shell execution: Server commands passed as arrays to child_process.spawn(), never through shell interpretation
  • TypeScript strict mode: Full type safety with no any casts in core logic
  • Minimal dependencies: Only 2 runtime deps (@modelcontextprotocol/sdk, zod)

> Note: catalog.json stores per-server env vars from your MCP config (including API tokens that backend servers need to function). Treat this file as sensitive — it is excluded from git (.gitignore) and npm publishing (.npmignore + "files" allowlist) by default. Do not share or commit it.

Trade-offs

  • Latency: Each tool call requires a search + schema lookup step (~2 extra LLM turns for first use of a tool)
  • Discovery: The model must search for tools instead of seeing them all upfront — minor overhead for small catalogs
  • Connection startup: Servers are lazily spawned, so first calls to a new server have connection overhead

When to use the proxy

  • Use it when you have 5+ MCP servers or 20+ total tools
  • Use it when you need cross-client compatibility (Cursor, Windsurf, VS Code, etc.)
  • Use it when you want to aggregate tools from multiple servers behind one endpoint
  • Skip it when you have 1–2 servers with few tools

vs. Anthropic's Built-in Tool Search

Claude Code includes a built-in defer_loading mechanism for tool schema optimization. Here's how MCP Tool Search differs:

| Feature | MCP Tool Search | Anthropic defer_loading | |---------|----------------|------------------------| | Works with Cursor, Windsurf, VS Code | ✅ | ❌ Claude-only | | Cross-server aggregation | ✅ Single endpoint | ❌ Per-server | | Streamable HTTP transport | ✅ Remote clients | ❌ Stdio only | | Fuzzy search with typo tolerance | ✅ Levenshtein | Basic regex/BM25 | | Pre-built catalog (offline) | ✅ | ❌ Runtime only |

If you only use Claude Code, Anthropic's built-in solution may be sufficient. If you use multiple MCP clients or need cross-server tool federation, MCP Tool Search fills that gap.

Compatibility

Tested with:

Should work with any MCP client that supports the stdio transport.

Project Structure

mcp-tool-search/
├── src/
│   ├── types.ts          # Shared type definitions
│   ├── catalog.ts        # Catalog loader + fuzzy search engine
│   ├── pool.ts           # Lazy server connection pool with timeouts
│   ├── index.ts          # Main proxy MCP server
│   └── build-catalog.ts  # Catalog builder CLI
├── dist/                 # Compiled JavaScript (after build)
├── catalog.json          # Generated tool catalog (git-ignored)
├── package.json
├── tsconfig.json
└── README.md

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run tests
npm test

# Watch mode
npm run dev

# Rebuild catalog
npm run catalog

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository and clone your fork
  2. Install dependencies: npm install
  3. Build: npm run build
  4. Run tests: npm test (all 81 tests must pass)
  5. Make your changes on a feature branch
  6. Submit a PR with a clear description of what changed and why

Guidelines

  • Follow the existing TypeScript style (strict mode, no any in core logic)
  • Add tests for new features or bug fixes
  • Keep dependencies minimal -- any new runtime dependency needs strong justification
  • Run npm audit and ensure 0 vulnerabilities before submitting
  • Update documentation if your change affects the public API or setup process

Reporting Issues

Found a bug or have a feature request? Open an issue on GitHub.

For security vulnerabilities, please use GitHub Security Advisories instead of public issues.

Changelog

See [CHANGELOG.md](CHANGELOG.md) for a detailed history of all releases.

Security

Using many MCP servers? Audit your configs first.

Config Guard scans your .mcp.json for 20 types of security vulnerabilities — typosquatting, known CVEs, secret leaks, rug pulls, and more. Zero dependencies, fully offline.

pip install mcp-config-guard && config-guard

MCP Tool Search saves tokens. Config Guard saves you from CVEs.

License

[MIT](LICENSE) — Copyright (c) 2026 AEGIS Forge Team

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.