Service that extends the functionality of an existing REST API with MCP
Project description
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:
-
Build the Docker image:
docker build -t mcp-proxy:<version> . -
Prepare the configuration file
Define the endpoints you want to expose to MCP clients. By default, MCProxy will look forconfig.json. -
Mount the configuration file
Mount it into your Docker container, Kubernetes pod, or deployment. -
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_yahelb05_mcp_proxy-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_yahelb05_mcp_proxy-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9fea82b8fc2bb56928b0729473e5e874e919f29fafcd15e4f9df0e3ef9c5fbb
|
|
| MD5 |
f583403489f22bf74ca9fd14fe1d91a4
|
|
| BLAKE2b-256 |
43475a3b9c7d8686928f80f7bd138f633d1a7b3a2821c56dcbbc161af81330a4
|
File details
Details for the file iflow_mcp_yahelb05_mcp_proxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_yahelb05_mcp_proxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b76ae4453262ffe67be246bd7e1d29eae4cd94b6562bedc9e8e72573f5e01291
|
|
| MD5 |
dadc57a0fbcd43c3abca8e5ea90d6567
|
|
| BLAKE2b-256 |
3bcfa4f87735f7b3e412a2e348a52d19774a94ef3d0adfc815e4e976bd8d3537
|