Integrations
Provides a configuration format for defining MCP tool mappings to HTTP APIs, allowing users to specify server settings and tool definitions through structured YAML files.
MCP Gateway
MCP (Model Context Protocol) Gateway can translate MCP tool callings to traditional HTTP API requests. It can provide a configurable way to get existing HTTP API to MCP territory.
Getting Started
Create config file from config.example.yaml
:
Edit config.yaml
file, map all APIs to MCP tools.
Then start launch it with SSE transport:
Default is 3001.
Server Control
Change Port
Provide parameter --port=<port_no>
in command line will change the port to SSE transport.
Launch gateway with port 3002:
stdio Transport
Provide parameter --transport=stdio
in command line will change the transport to stdio.
E.G.:
It's meaningless to manually launch gateway in stdio transport. You can configure in Cursor or Cline like:
Or MCP Inspector with form values:
Item | Value |
---|---|
Transport Type | STDIO |
Command | uv |
Arguments | run mcp-gateway --transport=stdio |
Configuration File
There is two parts in configuration YAML, server
and tools
. server
defines the basic info for gateway server use. tools
defines the mapping from single MCP tool to HTTP API request.
Server
Item | Description |
---|---|
name | Server name |
config | Key/Value pairs that can be referenced by var {{.config.xxx}} in templates |
Tools
tools
is list of MCP tools mapping. Single tool props. are defined as follows:
Item | Description |
---|---|
name | Tool name (Function name), which is provided to LLM. |
description | Tool description through which LLM can understand what the tool could do. |
args | Arguments of tool (Function arguments). |
requestTemplate | Request mapping to target HTTP API. |
responseTemplate | Response mapping for response of target HTTP API. |
Single argument props. are defined as follows:
Item | Type | Description |
---|---|---|
name | Argument name, which is provided to LLM. | |
description | Argument description through which LLM can understand and decide what value should be filled. | |
required | Boolean | Required argument or not. |
Request template props. are defined as follows:
Item | Description |
---|---|
method | HTTP method |
url | Target HTTP API url template |
headers | HTTP headers |
HTTP headers are defined as follows:
Item | Description |
---|---|
key | Header key |
value | Header value template |
Response template props are defined as follows:
Item | Description |
---|---|
body | Response body template |
Contribution
All kinds of contribution are welcomed.
This server cannot be installed
A server that translates Model Context Protocol (MCP) tool callings to traditional HTTP API requests, allowing existing HTTP APIs to be integrated into MCP territory through configurable mappings.