bysparfenyuk· 1 MCP server
$git clone https://github.com/sparfenyuk/mcp-proxyInstalls into the current project.
Install mcp-proxy by running `git clone https://github.com/sparfenyuk/mcp-proxy`, then use it for the current task and follow its documentation at https://github.com/sparfenyuk/mcp-proxy.
| 1 | # mcp-proxy |
| 2 | |
| 3 |  |
| 4 |  |
| 5 |  |
| 6 | [](https://codecov.io/gh/sparfenyuk/mcp-proxy) |
| 7 | |
| 8 | - [mcp-proxy](#mcp-proxy) |
| 9 | - [About](#about) |
| 10 | - [1. stdio to SSE/StreamableHTTP](#1-stdio-to-ssestreamablehttp) |
| 11 | - [1.1 Configuration](#11-configuration) |
| 12 | - [1.2 Example usage](#12-example-usage) |
| 13 | - [2. SSE to stdio](#2-sse-to-stdio) |
| 14 | - [2.1 Configuration](#21-configuration) |
| 15 | - [2.2 Example usage](#22-example-usage) |
| 16 | - [Named Servers](#named-servers) |
| 17 | - [Installation](#installation) |
| 18 | - [Installing via PyPI](#installing-via-pypi) |
| 19 | - [Installing via Github repository (latest)](#installing-via-github-repository-latest) |
| 20 | - [Installing as container](#installing-as-container) |
| 21 | - [Troubleshooting](#troubleshooting) |
| 22 | - [Extending the container image](#extending-the-container-image) |
| 23 | - [Docker Compose Setup](#docker-compose-setup) |
| 24 | - [Command line arguments](#command-line-arguments) |
| 25 | - [Example config file](#example-config-file) |
| 26 | - [Testing](#testing) |
| 27 | |
| 28 | ## About |
| 29 | |
| 30 | The `mcp-proxy` is a tool that lets you switch between server transports. There are two supported modes: |
| 31 | |
| 32 | 1. stdio to SSE/StreamableHTTP |
| 33 | 2. SSE to stdio |
| 34 | |
| 35 | ## 1. stdio to SSE/StreamableHTTP |
| 36 | |
| 37 | Run a proxy server from stdio that connects to a remote SSE server. |
| 38 | |
| 39 | This mode allows clients like Claude Desktop to communicate to a remote server over SSE even though it is not supported |
| 40 | natively. |
| 41 | |
| 42 | ```mermaid |
| 43 | graph LR |
| 44 | A["Claude Desktop"] <--> |stdio| B["mcp-proxy"] |
| 45 | B <--> |SSE| C["External MCP Server"] |
| 46 | |
| 47 | style A fill:#ffe6f9,stroke:#333,color:black,stroke-width:2px |
| 48 | style B fill:#e6e6ff,stroke:#333,color:black,stroke-width:2px |
| 49 | style C fill:#e6ffe6,stroke:#333,color:black,stroke-width:2px |
| 50 | ``` |
| 51 | |
| 52 | ### 1.1 Configuration |
| 53 | |
| 54 | This mode requires providing the URL of the MCP Server's SSE endpoint as the program’s first argument. If the server uses Streamable HTTP transport, make sure to enforce it on the `mcp-proxy` side by passing `--transport=streamablehttp`. |
| 55 | |
| 56 | Arguments |
| 57 | |
| 58 | | Name | Required | Description | Example | |
| 59 | | ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | |
| 60 | | `command_or_url` | Yes | The MCP server SSE endpoint to connect to | http://example.io/sse | |
| 61 | | `--headers` | No | Headers to use for the MCP server SSE connection | Authorization 'Bearer my-secret-access-token' | |
| 62 | | `--transport` | No | Decides which transport protocol to use when connecting to an MCP server. Can be either 'sse' or 'streamablehttp' | streamablehttp | |
| 63 | | `--client-id` | No | OAuth2 client ID for authentication | your_client_id | |
| 64 | | `--client-secret`| No | OAuth2 client secret for authentication | your_client_secret | |
| 65 | | `--token-url` | No | OAuth2 token endpoint URL for authentication | https://auth.example.com/oauth/token | |
| 66 | |
| 67 | Environment Variables |
| 68 | |
| 69 | | Name | Required | Description | Example | |
| 70 | | ------------------ | -------- | --- |