Skip to main content

A CLI proxy for MCP servers with configurable tool transformations

Project description

MCP Tool Transform Proxy

A Python CLI that proxies remote MCP servers while applying configurable tool transformations (name, description, arguments). Sits transparently between MCP clients (like Claude Desktop) and remote MCP servers.

Installation

pip install mcp-transform-proxy

Quick Start

  1. Create a configuration file:
{
  "mcpServers": {
    "myserver": {
      "url": "https://my-mcp-server.example.com/mcp",
      "tools": {
        "original_tool": {
          "description": "Enhanced description with context about when to use this tool"
        }
      }
    }
  }
}
  1. Run the proxy:
mcp-transform-proxy --config config.json

Configuration

Full Configuration Example

{
  "proxy": {
    "name": "MyToolProxy",
    "transport": "stdio",
    "port": 8080
  },
  "mcpServers": {
    "weather": {
      "url": "https://weather-api.example.com/mcp",
      "transport": "sse",
      "tools": {
        "get_weather": {
          "name": "check_weather",
          "description": "Check current weather. Use when user asks about weather.",
          "arguments": {
            "units": {
              "default": "metric",
              "hide": true
            },
            "location": {
              "name": "city",
              "description": "City name to check"
            }
          }
        },
        "internal_tool": {
          "enabled": false
        }
      }
    }
  }
}

Configuration Reference

Proxy Settings

Field Type Default Description
name string "MCP Transform Proxy" Name of the proxy server
transport "stdio" | "http" "stdio" Transport mode
port integer 8080 HTTP port (only used with http transport)

Server Settings

Field Type Required Description
url string Yes URL of the upstream MCP server
transport "streamable-http" | "sse" No Transport for upstream connection
tools object No Tool transformations (keyed by tool name)

Tool Transformations

Field Type Default Description
name string null Rename the tool
description string null Replace tool description
enabled boolean true Set to false to hide the tool
arguments object {} Argument transformations

Argument Transformations

Field Type Default Description
name string null Rename the argument
description string null Replace argument description
default any null Set a default value
hide boolean false Hide argument from clients

Tool Name Prefixing

FastMCP's composite proxy automatically prefixes tool names with the server name. For example, if you have a server named weather with a tool get_forecast, the prefixed name will be weather_get_forecast.

When configuring tool transforms, use the original tool name (without prefix) in your config - the proxy handles prefixing internally.

CLI Options

Usage: mcp-transform-proxy [OPTIONS]

Options:
  -c, --config PATH      Path to JSON config file (required)
  -t, --transport TEXT   Override transport mode (stdio or http)
  -p, --port INTEGER     Override HTTP port
  --version              Show version
  --help                 Show this message and exit

Development

# Clone the repository
git clone https://github.com/bbrowning/mcp-transform-proxy.git
cd mcp-transform-proxy

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .

# Run type checker
mypy src

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_transform_proxy-0.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_transform_proxy-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_transform_proxy-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_transform_proxy-0.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for mcp_transform_proxy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c779847e7e4a14dc0f2abf1164fafbfd9f370f39a9a50867ad2eba1481f2610d
MD5 6866df78cd0e8c9e0dcce6e027c6a890
BLAKE2b-256 fcbb8a7635ac8c15449eb3f18749ccb7c8e51e8afa14b6dc91483af16459cede

See more details on using hashes here.

File details

Details for the file mcp_transform_proxy-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_transform_proxy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb638bd5df9ce3290d101678896d1adf1cc82998bc33c0154fc138ce9a73d460
MD5 c6962d1739dd737b0439918bb832b7c3
BLAKE2b-256 40b454ed02895e118cb9d222c509ec6117aadcf0ca6e2c1984236461cb247eb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page