Skip to main content

MCProxy - MCP Proxy for RESTful APIs

MCProxy easley and almost seamlessly generates and deploys a proxy between your existing API and the clients.
It won't replace the existing interface with the existing API, but it will extend the functionality of your system with MCP.


What's MCP?

MCP (Model Context Protocol) is a standardized communication protocol that enables AI tools and services to interact seamlessly, where servers expose operations (“tools”) with defined input/output schemas and clients can discover, invoke, and use them dynamically.
In this ecosystem, an MCP Server acts as a gateway, exposing AI capabilities, workflows, or APIs—often with streaming outputs—while an MCP Client, typically an AI agent or application, discovers and calls these tools to perform tasks.

MCProxy acts as an MCP Server proxy layer that wraps your existing REST API, enabling AI clients to interact with your services using the MCP protocol without changing your underlying API.


Deployment

Deploying MCProxy is straightforward:

  1. Build the Docker image:
    docker build -t mcp-proxy:<version> .

  2. Prepare the configuration file
    Define the endpoints you want to expose to MCP clients. By default, MCProxy will look for config.json.

  3. Mount the configuration file
    Mount it into your Docker container, Kubernetes pod, or deployment.

  4. Expose MCProxy
    Make the service accessible via your preferred routing or ingress method.

💡 You can check the examples in ./dev/ for inspiration on configuration and setup.

Once deployed, MCP clients can connect to MCProxy and access exactly the data you’ve allowed — no extra coding required.


Environment Variables

Variable Description Default
CONFIG_FILE Full path to the configuration file. ./config.json

Configuration JSON Schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "API Endpoints Schema",
  "type": "object",
  "required": [
    "version",
    "endpoints"
  ],
  "properties": {
    "version": {
      "type": "string",
      "description": "Version of the schema or API definition"
    },
    "endpoints": {
      "type": "array",
      "description": "List of API endpoints",
      "items": {
        "type": "object",
        "required": [
          "name",
          "description",
          "url",
          "method"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique name of the endpoint"
          },
          "description": {
            "type": "string",
            "description": "A short description of the endpoint"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Base URL of the endpoint"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE",
              "PATCH"
            ],
            "description": "HTTP method to use"
          },
          "path_params": {
            "type": "array",
            "description": "List of path parameters",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "query_params": {
            "type": "array",
            "description": "List of query parameters",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

Example for a configuration file: ./dev/deployment/docker/endpoints.json


Testing

Set up the environment, including:

  • Nginx as the reverse proxy (BSD 2-Clause License)
  • mendhak/http-https-echo as the RESTful API (MIT License)
  • The MCProxy server
cd ./dev/deployment/docker
docker compose up -d

To test the default configuration, you can use the available scripts, for example:

cd ./dev/scripts
python3 test_list_tools.py

Note: Both Nginx and http-https-echo are used only in the example Docker Compose setup and are not bundled with this project.


⚠️ Disclaimer:

The creators of MCProxy are not responsible for any unintended exposure of data through the endpoints you configure. It is your responsibility to ensure that the endpoints you expose do not leak sensitive or unwanted information.

Metadata

Release files for iflow-mcp_yahelb05-mcp-proxy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_yahelb05-mcp-proxy 0.1.0
File Size Uploaded
iflow_mcp_yahelb05_mcp_proxy-0.1.0.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_yahelb05-mcp-proxy 0.1.0
File Interpreter ABI Platform
iflow_mcp_yahelb05_mcp_proxy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / iflow_mcp_yahelb05_mcp_proxy-0.1.0.tar.gz

Download URL iflow_mcp_yahelb05_mcp_proxy-0.1.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b9fea82b8fc2bb56928b0729473e5e874e919f29fafcd15e4f9df0e3ef9c5fbb
BLAKE2b-256 checksum
How to use checksums
43475a3b9c7d8686928f80f7bd138f633d1a7b3a2821c56dcbbc161af81330a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_yahelb05_mcp_proxy-0.1.0-py3-none-any.whl

Download URL iflow_mcp_yahelb05_mcp_proxy-0.1.0-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b76ae4453262ffe67be246bd7e1d29eae4cd94b6562bedc9e8e72573f5e01291
BLAKE2b-256 checksum
How to use checksums
3bcfa4f87735f7b3e412a2e348a52d19774a94ef3d0adfc815e4e976bd8d3537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page