MCP Gateway
by Timandes
MCP Gateway translates MCP tool callings to traditional HTTP API requests. It provides a configurable way to integrate existing HTTP APIs into the MCP ecosystem.
Last updated: N/A
What is MCP Gateway?
MCP Gateway is a tool that bridges the gap between MCP (Model Context Protocol) tool calls and traditional HTTP APIs. It allows you to expose existing HTTP APIs as MCP tools, making them accessible within MCP-based applications and workflows.
How to use MCP Gateway?
- Create a configuration file (config.yaml) based on the example. 2. Edit the config.yaml file to map HTTP APIs to MCP tools, defining request and response templates. 3. Launch the gateway using the 'uv run mcp-gateway' command, specifying the transport method (SSE or stdio) and port if needed.
Key features of MCP Gateway
MCP to HTTP API translation
Configurable API mapping
SSE and stdio transport support
Request and response templating
Integration with LLMs and MCP Inspector
Use cases of MCP Gateway
Exposing existing REST APIs to LLMs
Integrating HTTP-based services into MCP workflows
Building MCP-compatible applications
Creating custom MCP tools from HTTP APIs
Enabling LLMs to interact with external services through HTTP
FAQ from MCP Gateway
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. The README does not provide a full definition, but it is implied to be a protocol for interacting with models.
How do I change the port the gateway runs on?
How do I change the port the gateway runs on?
Use the --port=<port_no>
parameter in the command line, e.g., uv run mcp-gateway --port=3002
.
What transport options are available?
What transport options are available?
The gateway supports SSE (Server-Sent Events) and stdio (standard input/output) transport.
How do I configure the mapping between MCP tools and HTTP APIs?
How do I configure the mapping between MCP tools and HTTP APIs?
The mapping is defined in the config.yaml
file, where you specify the tool name, description, arguments, request template, and response template for each tool.
Can I contribute to the project?
Can I contribute to the project?
Yes, all kinds of contributions are welcomed.