Skip to main content
Glama

MCP ChatGPT Multi-Server Suite

by bobhuff0

MCP ChatGPT App - Multi-Server Suite

A comprehensive TypeScript ChatGPT App suite using the Model Context Protocol (MCP) SDK with Express. This project includes four powerful MCP servers for different use cases.

🎯 Available MCP Servers

  1. 📊 Stock Market MCP (Port 3000) - Real-time top movers from Alpha Vantage

  2. 💱 Currency Converter MCP (Port 3001) - Convert between 160+ world currencies

  3. 🌍 World Time MCP (Port 3002) - Convert time across global timezones

  4. 📏 Units Converter MCP (Port 3003) - Convert measurements across 10 categories

Features

  • 🚀 MCP Server Integration: Uses @modelcontextprotocol/sdk to expose tools

  • 🎨 Beautiful UI: Dark mode with DaisyUI, Tailwind CSS, and Anime.js animations

  • 📱 Responsive Design: Works on desktop and mobile

  • 🔄 Real-time Data: Live data from various APIs

  • 🌐 Ngrok Ready: Easy to expose via ngrok for external access

  • Multi-Server Support: Run all servers simultaneously or individually

Prerequisites

Setup

  1. Install dependencies:

    npm install
  2. Set up environment variables:

    # Copy the example file cp .env.example .env # Edit .env and add your Alpha Vantage API key # Or set it as a system environment variable export ALPHA_VANTAGE_API_KEY=your_api_key_here
  3. Build the TypeScript project:

    npm run build

Running the Servers

Quick Start - All Servers

Start all four servers at once:

./start-all-servers.sh

This starts:

Stop all servers:

./stop-all-servers.sh

Individual Servers

Start servers individually using their dedicated scripts:

./start.sh # Stock Market (Port 3000) ./start-currency.sh # Currency Converter (Port 3001) ./start-time.sh # World Time (Port 3002) ./start-units.sh # Units Converter (Port 3003)

Using NPM Scripts

Development mode (with auto-reload):

npm run dev # Stock Market npm run dev-currency # Currency Converter npm run dev-time # World Time npm run dev-units # Units Converter

Production mode:

npm run start # Stock Market npm run start-currency # Currency Converter npm run start-time # World Time npm run start-units # Units Converter

Exposing with ngrok

To make your servers accessible externally (e.g., for ChatGPT integration):

ngrok http 3000 # Stock Market ngrok http 3001 # Currency Converter ngrok http 3002 # World Time ngrok http 3003 # Units Converter

ngrok will provide you with a public URL that you can use to access your server.

Architecture

1. Stock Market MCP Server (src/server.ts)

MCP Tools:

  • topMovers - Fetches top gainers, losers, and most actively traded stocks

Endpoints:

  • GET / - Serves the web interface

  • POST /mcp - MCP JSON-RPC endpoint

  • GET /mcp/tools/list - Lists available tools

  • POST /mcp/tools/call - Calls MCP tools

Frontend: public/index.html

2. Currency Converter MCP Server (src/currency-server.ts)

MCP Tools:

  • convertCurrency - Convert between currencies

  • getSupportedCurrencies - List all supported currencies

  • getExchangeRates - Get all rates for a base currency

Features:

  • 160+ world currencies

  • Real-time exchange rates

  • Free API (no key required)

Frontend: public-currency/index.html

3. World Time MCP Server (src/time-server.ts)

MCP Tools:

  • convertTime - Convert time between timezones

  • getCurrentTime - Get current time in a timezone

  • getSupportedTimezones - List all supported timezones

  • getWorldClocks - Get time in multiple timezones

Features:

  • 30+ major world timezones

  • DST detection

  • UTC offset calculation

Frontend: public-time/index.html

4. Units Converter MCP Server (src/units-server.ts)

MCP Tools:

  • convertUnits - Convert between different units

  • getSupportedUnits - List units by category

  • getCategories - List all unit categories

Features:

  • 10 categories (length, weight, temperature, volume, area, speed, pressure, energy, power, data)

  • 70+ different units

  • Automatic category detection

Frontend: public-units/index.html

Common Features

All servers include:

  • Express Server: Serves the frontend and handles API requests

  • MCP Protocol: Full MCP JSON-RPC 2.0 implementation

  • CORS Enabled: Ready for cross-origin requests

  • Beautiful UI: Dark mode with DaisyUI, Tailwind CSS, and Anime.js

  • ChatGPT Ready: Compatible with ChatGPT Actions

API Usage Examples

Stock Market MCP

curl -X POST http://localhost:3000/mcp/tools/call \ -H "Content-Type: application/json" \ -d '{"name":"topMovers","arguments":{"limit":5}}'

Currency Converter MCP

curl -X POST http://localhost:3001/mcp/tools/call \ -H "Content-Type: application/json" \ -d '{"name":"convertCurrency","arguments":{"from":"USD","to":"EUR","amount":100}}'

World Time MCP

curl -X POST http://localhost:3002/mcp/tools/call \ -H "Content-Type: application/json" \ -d '{"name":"getCurrentTime","arguments":{"timezone":"America/New_York"}}'

Units Converter MCP

curl -X POST http://localhost:3003/mcp/tools/call \ -H "Content-Type: application/json" \ -d '{"name":"convertUnits","arguments":{"from":"meter","to":"foot","value":100}}'

MCP JSON-RPC Format

All servers support the MCP protocol via POST to /mcp:

curl -X POST http://localhost:3001/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "convertCurrency", "arguments": {"from": "USD", "to": "EUR", "amount": 100} } }'

Technologies Used

  • Backend:

    • TypeScript

    • Express.js

    • @modelcontextprotocol/sdk

    • Axios

    • Alpha Vantage API

  • Frontend:

    • HTML5

    • Tailwind CSS

    • DaisyUI

    • Anime.js

    • Vanilla JavaScript

📚 Documentation

For detailed information about each server:

Troubleshooting

API Key Issues

If you see a warning about ALPHA_VANTAGE_API_KEY not set:

  • This only affects the Stock Market server

  • Make sure you've set the environment variable

  • Check that your .env file is in the project root

  • Verify the API key is valid at https://www.alphavantage.co/

Port Already in Use

If a port is already in use, you can either:

  1. Stop the process using that port: lsof -i :3000 then kill <PID>

  2. Set a different port: PORT=3005 npm run dev

Build Errors

If you encounter build errors:

rm -rf dist node_modules npm install npm run build

CORS Issues

All servers are configured with CORS enabled. If you still experience issues, check your browser console for specific CORS errors.

Server Won't Start

Make sure all dependencies are installed and TypeScript is built:

npm install npm run build ./start-all-servers.sh

🤝 Contributing

Feel free to submit issues, fork the repository, and create pull requests for any improvements.

📄 License

ISC

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A comprehensive suite of four MCP servers providing real-time stock market data, currency conversion between 160+ currencies, world timezone conversion, and unit conversion across 10 measurement categories. Features beautiful web interfaces and ChatGPT integration capabilities.

  1. 🎯 Available MCP Servers
    1. Features
      1. Prerequisites
        1. Setup
          1. Running the Servers
            1. Quick Start - All Servers
            2. Individual Servers
            3. Using NPM Scripts
          2. Exposing with ngrok
            1. Architecture
              1. 1. Stock Market MCP Server (src/server.ts)
              2. 2. Currency Converter MCP Server (src/currency-server.ts)
              3. 3. World Time MCP Server (src/time-server.ts)
              4. 4. Units Converter MCP Server (src/units-server.ts)
              5. Common Features
            2. API Usage Examples
              1. Stock Market MCP
              2. Currency Converter MCP
              3. World Time MCP
              4. Units Converter MCP
              5. MCP JSON-RPC Format
            3. Technologies Used
              1. 📚 Documentation
                1. Troubleshooting
                  1. API Key Issues
                  2. Port Already in Use
                  3. Build Errors
                  4. CORS Issues
                  5. Server Won't Start
                2. 🤝 Contributing
                  1. 📄 License

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/bobhuff0/MCPAddIn'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server