MCP ChatGPT Multi-Server Suite
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.
README
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
- 📊 Stock Market MCP (Port 3000) - Real-time top movers from Alpha Vantage
- 💱 Currency Converter MCP (Port 3001) - Convert between 160+ world currencies
- 🌍 World Time MCP (Port 3002) - Convert time across global timezones
- 📏 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
- Node.js (v16 or higher)
- Alpha Vantage API key (free at https://www.alphavantage.co/support/#api-key) - Required for Stock Market server only
- ngrok (for external access) - optional
Setup
-
Install dependencies:
npm install -
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 -
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:
- Stock Market MCP on http://localhost:3000
- Currency Converter MCP on http://localhost:3001
- World Time MCP on http://localhost:3002
- Units Converter MCP on http://localhost:3003
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 interfacePOST /mcp- MCP JSON-RPC endpointGET /mcp/tools/list- Lists available toolsPOST /mcp/tools/call- Calls MCP tools
Frontend: public/index.html
2. Currency Converter MCP Server (src/currency-server.ts)
MCP Tools:
convertCurrency- Convert between currenciesgetSupportedCurrencies- List all supported currenciesgetExchangeRates- 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 timezonesgetCurrentTime- Get current time in a timezonegetSupportedTimezones- List all supported timezonesgetWorldClocks- 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 unitsgetSupportedUnits- List units by categorygetCategories- 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:
- MCP_SERVERS_GUIDE.md - Comprehensive guide for all servers
- QUICKSTART.md - Quick start guide
- CHATGPT_INTEGRATION.md - ChatGPT integration guide
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
.envfile 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:
- Stop the process using that port:
lsof -i :3000thenkill <PID> - 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。