home / mcp / universal menu mcp server

Universal Menu MCP Server

Provides an interactive decision menu for ChatGPT Apps SDK, surfacing contextual next steps on every assistant turn.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "arhgap11b-appsdk-universal-menu": {
      "url": "http://127.0.0.1:2091/mcp",
      "headers": {
        "PORT": "2091",
        "DEFAULT_TITLE": "Universal Menu",
        "SMITHERY_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You can surface an interactive decision menu inside ChatGPT conversations using the Universal Menu MCP Server. It renders contextual next-step options with every assistant turn, either from pre-computed menu items or a lightweight default set, and streams responses to keep interactions fast and fluid.

How to use

Install the MCP server locally or run it via Smithery to expose an HTTP endpoint. Connect your MCP client to the server and enable the connector so the model presents the available next steps at the start or end of each reply. The server exposes a get_menu tool that returns the current menu items (or defaults) and a do_action tool that processes a chosen option and refreshes the menu.

How to install

Prerequisites you need on your machine: Node.js 18+ (Node 20+ recommended) and a working HTTPS tunnel if you plan to connect from ChatGPT.

# 1) Install dependencies
npm install

# 2) (Optional) prepare local HTTP mode
cp .env.example .env

Smithery-based local development and deployment follow a build-and-dev loop. Use the Smithery workflow to bundle assets, start the dev server, and publish when ready.

# 1) Build the project (bundles widget, compiles TS, and prepares Smithery artifact)
npm run build

# 2) Start the widget watcher while iterating on web/src
npm run dev:web

# 3) Run the MCP server via Smithery (requires API key)
export SMITHERY_API_KEY=YOUR_API_KEY
npm run dev

Configuration and runtime notes

If you want to self-host or tunnel manually, you can also run a local HTTP server that exposes the MCP endpoint.

npm run build
npm start
# POST http://127.0.0.1:2091/mcp with Accept: application/json, text/event-stream

Deployment and practical usage

For quick demos, you can expose an HTTPS tunnel to your local server. The setup supports common hosting options like Fly.io, Render, Railway, Cloud Run, Azure Container Apps, or Kubernetes ingress that supports streaming responses.

ngrok http 2091

Widget preview and testing

Preview the widget locally and verify the menu rendering. The widget is delivered as an iframe resource and can be tested in a simple static preview environment.

# Preview server (example)
npm run build
nohup python3 -m http.server 3333 --directory web >/tmp/menu.preview.log 2>&1 &
# Open http://127.0.0.1:3333/preview.html

Troubleshooting tips

If the MCP client does not receive the menu, verify the HTTP endpoint is reachable and the MCP tools are enabled in the conversation flow. Check that the development or production environment variables are correctly set and that the streaming transport is enabled in your client.

Available tools

get_menu

Returns the current menu items to present to users, using either supplied items or defaults.

do_action

Processes a selected menu item, performs follow-up logic, and updates the menu for the next turn.