This MCP server acts as a REST API bridge between HTTP clients and MCP-compliant tool servers. It allows you to discover and execute Multiple Command Protocol (MCP) tools through simple HTTP endpoints, making it particularly useful for integrating MCP tools with custom GPTs through Actions.
NGROK_AUTH_TOKEN=your_ngrok_auth_token
NGROK_DOMAIN=your_ngrok_domain
MCP_CONFIG_FILE=/path/to/mcp_settings.json # Optional, defaults to mcp_settings.json
mcp_settings.json
configuration file:{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
go run main.go
The server provides the following REST endpoints:
GET /openapi.json
- Get the OpenAPI specificationGET /mcp/servers
- List all available servers and their toolsGET /mcp/{serverName}
- Get details about a specific serverGET /mcp/{serverName}/tools/{toolName}
- Get details about a specific toolPOST /mcp/{serverName}/tools/{toolName}/execute
- Execute a toolcurl -X GET https://your-ngrok-domain.ngrok.io/mcp/servers
curl -X GET https://your-ngrok-domain.ngrok.io/mcp/filesystem/tools/readFile
curl -X POST https://your-ngrok-domain.ngrok.io/mcp/filesystem/tools/readFile/execute \
-H "Content-Type: application/json" \
-d '{"parameters": {"path": "example.txt"}}'
To use this server with a custom GPT:
Add the OpenAPI specification URL as an Action in your GPT configuration:
https://your-ngrok-domain.ngrok.io/openapi.json
Your GPT can now discover and use the MCP tools through the API endpoints.
You can configure multiple MCP servers in your mcp_settings.json
file:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
},
"another-server": {
"command": "python",
"args": ["-m", "my_mcp_server", "--option", "value"]
}
}
}
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.