GPT-MCP-Proxy MCP server

Bridges HTTP clients with tool servers, enabling tool discovery and execution via REST endpoints, featuring automatic HTTPS exposure and OpenAPI 3.1.0 specification for seamless integration with custom GPTs and AI-assisted applications.
Back to servers
Provider
wricardo
Release date
Mar 05, 2025
Language
Go
Stats
2 stars

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.

Features

  • List available MCP servers and their tools
  • Get detailed information about specific tools
  • Execute tools with custom parameters
  • OpenAPI 3.1.0 specification
  • Automatic public HTTPS exposure via ngrok

Installation

Prerequisites

  • Go 1.20 or later
  • ngrok account and authtoken
  • MCP-compliant tools

Setup

  1. Set the required environment variables:
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
  1. Create an mcp_settings.json configuration file:
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}
  1. Run the server:
go run main.go

Usage

API Endpoints

The server provides the following REST endpoints:

  • GET /openapi.json - Get the OpenAPI specification
  • GET /mcp/servers - List all available servers and their tools
  • GET /mcp/{serverName} - Get details about a specific server
  • GET /mcp/{serverName}/tools/{toolName} - Get details about a specific tool
  • POST /mcp/{serverName}/tools/{toolName}/execute - Execute a tool

Example Usage

Listing Available Servers

curl -X GET https://your-ngrok-domain.ngrok.io/mcp/servers

Getting Tool Details

curl -X GET https://your-ngrok-domain.ngrok.io/mcp/filesystem/tools/readFile

Executing a Tool

curl -X POST https://your-ngrok-domain.ngrok.io/mcp/filesystem/tools/readFile/execute \
  -H "Content-Type: application/json" \
  -d '{"parameters": {"path": "example.txt"}}'

Integrating with Custom GPTs

To use this server with a custom GPT:

  1. Add the OpenAPI specification URL as an Action in your GPT configuration:

    • URL: https://your-ngrok-domain.ngrok.io/openapi.json
  2. Your GPT can now discover and use the MCP tools through the API endpoints.

Configuration Options

Multiple MCP Servers

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"]
    }
  }
}

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later