Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Wrapper

    a wrapper that allows to run mcp servers in wrapped light subprocesses with custom multi environments

    2 stars
    JavaScript
    Updated May 21, 2025

    Table of Contents

    • Overview
    • Features
    • Usage
    • Configuration
    • Configuration Change Note
    • Building
    • Development
    • How It Works
    • Logs
    • Monitoring Logs
    • Requirements

    Table of Contents

    • Overview
    • Features
    • Usage
    • Configuration
    • Configuration Change Note
    • Building
    • Development
    • How It Works
    • Logs
    • Monitoring Logs
    • Requirements

    Documentation

    MCP Wrapper

    A proxy wrapper for MCP (Model Context Protocol) servers.

    Overview

    This project creates a proxy layer that sits between MCP clients and MCP servers. It forwards requests from clients to the real MCP server and returns the responses.

    Features

    • Acts as a bridge between MCP clients and real MCP servers
    • Transparently forwards all MCP protocol operations (tools, resources, prompts)
    • Preserves environment variables and context
    • Handles errors gracefully
    • Detailed logging to a file in the directory specified by MCP_WRAPPER_LOG_PATH environment variable

    Usage

    Configuration

    The MCP wrapper requires command-line arguments and environment variables:

    1. Command-line arguments:

    • First argument: The command to run the real MCP server (e.g., "node")
    • Second argument: The path to the real MCP server script (e.g., "/path/to/real/mcp-server/build/index.js")

    2. Environment variables (via .env file or system environment):

    • MCP_WRAPPER_LOG_PATH: The directory where logs should be stored (e.g., "/Users/username/logs")
    • Any environment variables required by the real MCP server

    Configuration Change Note

    The configuration structure has changed from the original version:

    Before (Original):

    json
    {
      "mcpServers": {
        "my mcp server": {
          "command": "node /path/to/real/mcp-server/build/index.js",
          "env": {
            "HOME_LOG_PATH": "/Users/username/logs",
            "OTHER_ENV_VAR": "value"
          }
        }
      }
    }

    After (Current):

    json
    {
      "mcpServers": {
        "my mcp server": {
          "command": "node",
          "args": [
            "dist/index.js",
            "node",
            "/path/to/real/mcp-server/build/index.js"
          ],
          "env": {
            "MCP_WRAPPER_LOG_PATH": "/Users/username/logs",
            "OTHER_ENV_VAR": "value"
          }
        }
      }
    }

    Note that:

    1. The wrapper itself is now specified in the command field ("node") with its path in args[0] ("dist/index.js")

    2. The real MCP server command and path are now args[1] and args[2]

    3. The environment variable has changed from HOME_LOG_PATH to MCP_WRAPPER_LOG_PATH

    The wrapper is designed to be run automatically by tools like Claude and Cursor, not manually launched.

    Building

    To build the wrapper:

    bash
    npm run build

    This will copy the main.js file to dist/index.js.

    Development

    To watch for changes and automatically rebuild:

    bash
    npm run watch

    How It Works

    1. The MCP client connects to the wrapper server

    2. The wrapper server connects to the real MCP server using the provided command and arguments

    3. Requests from the client are forwarded to the real server

    4. Responses from the real server are returned to the client

    5. All operations are logged to the console and a log file in the MCP_WRAPPER_LOG_PATH directory

    This allows you to add a proxy layer that can:

    • Modify requests or responses
    • Add logging
    • Handle authentication
    • Implement rate limiting
    • Add caching

    Logs

    The MCP wrapper logs all operations to:

    • Console output (for real-time monitoring)
    • Log file at $MCP_WRAPPER_LOG_PATH/mcp-proxy.log (if MCP_WRAPPER_LOG_PATH is set)

    Each log entry includes:

    • Timestamp (ISO format)
    • Operation type (listing tools, calling tools, etc.)
    • Request details
    • Response summary
    • Error information (when applicable)

    Monitoring Logs

    To tail the log file and monitor activity in real-time, run:

    bash
    npm run tail-log

    This will display the existing log content and watch for new entries. Press Ctrl+C to exit.

    Requirements

    • Node.js 14 or higher
    • An MCP client
    • A real MCP server to proxy to
    • Write access to the MCP_WRAPPER_LOG_PATH directory

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k