VM

vitolin/mcpwrapped

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 3 forks 质量 67 趋势 13MIT

A small MCP Proxy

概览

mcpwrapped is a lightweight MCP (Model Context Protocol) proxy that sits between an MCP client and server. It allows you to filter available tools, preventing context window clutter by only exposing the tools you explicitly want to use. - : Whitelist specific tools using the --visible_tools flag - : Forwards all other MCP protocol messages (resources, prompts, etc.) unchanged - : Works with any MCP client that supports command-based server configuration mcpwrapped wraps your existing MCP server command. You pass the filtering flags first, followed by the actual command to run the server. To use it with Claude Desktop, update your claude_desktop_config.json: In this example, only the read_file tool from the filesystem server would be visible to Claude, hiding write_file, list_directory, etc. mcpwrapped acts as a transparent proxy that: 1. Spawns the actual MCP server with the provided command 2. Intercepts messages from the server 3.

README

以下为原文 README 节选,完整内容请查看原文。

mcpwrapped

mcpwrapped is a lightweight MCP (Model Context Protocol) proxy that sits between an MCP client and server. It allows you to filter available tools, preventing context window clutter by only exposing the tools you explicitly want to use.

Features

  • Tool Filtering: Whitelist specific tools using the --visible_tools flag
  • Transparent Proxy: Forwards all other MCP protocol messages (resources, prompts, etc.) unchanged
  • Easy Integration: Works with any MCP client that supports command-based server configuration

Installation

npm install -g mcpwrapped

Usage

mcpwrapped wraps your existing MCP server command. You pass the filtering flags first, followed by the actual command to run the server.

Basic Syntax

mcpwrapped --visible_tools=tool1,tool2  [actual_args...]

Example: Claude Desktop Configuration

To use it with Claude Desktop, update your claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "mcpwrapped",
      "args": [
        "--visible_tools=read_file",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop"
      ]
    }
  }
}

In this example, only the read_file tool from the filesystem server would be visible to Claude, hiding write_file, list_directory, etc.

Configuration Flags

Flag Description Example
‑‑visible_tools Comma-separated list of tool names to expose ‑‑visible_tools=read,write

How It Works

┌─────────────┐         ┌──────────────┐         ┌─────────────┐
│ MCP Client  │ ◀──────▶│  mcpwrapped  │ ◀──────▶│ MCP Server  │
│ (Claude)    │         │  (Proxy)     │         │             │
│             │         │              │         │             │
└─────────────┘         └──────────────┘         └─────────────┘
                              │
                              └── Filters tool_list to only include
                                  tools specified in --visible_tools

mcpwrapped acts as a transparent proxy that:

  1. Spawns the actual MCP server with the provided command
  2. Intercepts messages from the server
  3. Filters the tools list in initialization messages to only include allowed tools
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "filesystem": { "command": "mcpwrapped", "args": [ "--visible_tools=read_file", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop" ] } } }