Skip to main content
Glama

MCProxy 🚀

MCProxy is an MCP server proxy designed to reduce Model Context Protocol (MCP) context window bloat while preserving LLM client permissions. It strips heavy metadata and JSON schemas from backend tool definitions during the discovery phase, forcing LLM clients to fetch full schemas dynamically on-demand via a deduplicated Master Server.

Disclosure: This project contains code generated mostly by Gemini, with human editing. It is not intended to be production-ready and is not feature-complete and compatible with all scenarios.

Features

  • Context Compression: Strips heavy descriptions, nested properties, and large enums from backend tools, reducing token overhead significantly while preserving client-side policies and call-time permissions.

  • Master Metadata Routing: Exposes a single get_tool_details helper tool on a master endpoint (/mcp) so individual backend servers stay uncluttered.

  • Multi-Transport Support: Manages backend servers running over Stdio, Server-Sent Events (SSE), and modern Streamable HTTP.

  • Fleet Management Web UI: Includes an embedded dashboard at /status displaying live server statuses and a simple one-click Restart action for individual downed or unauthenticated backends.

  • Nix & Home Manager Native: Easily deployable and configurable declaratively using Nix derivations and Home Manager modules.


Related MCP server: mcp-compressor

Project Structure

src/
├── types.ts           # TypeScript interfaces and state types
├── backendManager.ts  # MCP SDK client/server lifecycle, transport factories, & caching
├── index.ts           # Express routing, Fleet Manager UI logic, & entry point
└── views/
    └── status.ejs     # EJS template for the Fleet Status dashboard

Getting Started & Development

Prerequisites

  • Node.js (v22+)

  • Nix (optional, but recommended for development and deployment)

Local Development (via Nix DevShell)

Clone the repository and enter the Nix development environment:

nix develop
npm install

Start the proxy locally using tsx:

npm run dev

Configuration (mcpServers.json)

MCProxy is configured via a JSON file (or generated via Nix) defining your backend MCP servers. It supports environment variable interpolation using the ${VAR_NAME} syntax.

{
  "filesystem": {
    "transport": "stdio",
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/code"]
  },
  "github": {
    "transport": "sse",
    "url": "https://mcp.internal.mycompany.com/github/sse",
    "headers": {
      "Authorization": "Bearer ${GITHUB_TOKEN}"
    }
  }
}

Nix & Home Manager Integration

This repository includes a flake.nix and module.nix to integrate MCProxy seamlessly into your Home Manager setup.

Enable the Service

In your Home Manager configuration, enable the proxy, define your backend servers, and pipe the auto-generated configuration directly into your system-wide MCP client setup (programs.mcp):

{ config, pkgs, inputs, ... }: {

  services.mcproxy = {
    enable = true;
    port = 11262;
    servers = {
      filesystem = {
        transport = "stdio";
        command = "npx";
        args = [ "-y" "@modelcontextprotocol/server-filesystem" "/home/user/code" ];
      };
    };
  };

  # Automatically exposes the Master and Proxied Streamable HTTP endpoints
  programs.mcp = {
    enable = true;
    servers = config.services.mcproxy.generatedConfig;
  };
}

Status Dashboard

Once running, MCProxy exposes a built-in web management portal at: http://127.0.0.1:11262/status.

  • Live Monitoring: View whether your backend servers are RUNNING, STARTING, or encountering an ERROR (such as a 401 Unauthorized token expiration).

  • Individual Restarts: If a backend server drops or requires an updated OAuth token, resolve the issue externally and click Restart right from the UI to re-initialize that specific backend without restarting the entire proxy fleet.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    A proxy server that wraps existing MCP servers to significantly reduce token consumption by compressing tool descriptions into a two-step interface. It enables users to integrate extensive toolsets without exceeding context limits or incurring high API costs.
    Last updated
    105
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    A token-efficient MCP server that reduces context window bloat by lazy loading tool descriptions and proxying calls through three simple tools, with a dashboard for managing connections.
    Last updated
    11
    8
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A proxy MCP server that reduces token usage by caching tool definitions locally and loading them on demand, supporting multiple backend MCP servers.
    Last updated
    5
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

  • An MCP server for Arcjet - the runtime security platform that ships with your AI code.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danimalquackers/mcproxy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server