MCP TurboClient

by techspawn

MCP Client
  • web-chat

A FastAPI-based application that provides a web interface for interacting with Multiple Control Protocol (MCP) servers while utilizing OpenAI's API for processing messages.

About

What is MCP TurboClient?

MCP TurboClient is a FastAPI-based web application that provides a chat interface for connecting to multiple MCP (Model Context Protocol) servers and processing messages through OpenAI’s API. It runs as a Python web server and is intended for developers who need a browser-based way to interact with MCP servers.

How to use MCP TurboClient?

1. Clone the repository and install dependencies with uv pip install -r requirements.txt.
2. Set the MODEL_NAME environment variable (default gpt-3.5-turbo) and create a config.json file listing your MCP servers.
3. Initialize the SQLite database for storing the OpenAI API key, then start the server with uvicorn main:app --reload.
4. Open http://localhost:8000, enter your OpenAI API key via the web interface, and use the chat window to send messages that are routed through the configured MCP servers and OpenAI.

Key features of MCP TurboClient

- Connect to multiple MCP servers simultaneously from one interface.
- Real-time chat via WebSocket for message processing.
- Web-based UI built with HTML, CSS, Bootstrap, and Animate.css.
- Stores OpenAI API license key securely in a SQLite database.
- Supports configuration of MCP servers via a JSON config file.

Use cases of MCP TurboClient

- Developers wanting a quick web UI for testing multiple MCP servers.
- Connecting AI assistants (backed by OpenAI) to external MCP-based tools.
- Prototyping multi‑server workflows without writing a full client application.

FAQ from MCP TurboClient

What does MCP TurboClient do?

It provides a browser‑based chat interface that sends user messages to one or more MCP servers and then processes the results using OpenAI’s API, returning the final response to the user.

How do I connect MCP servers?

Create a config.json file in the root directory with the mcpServers key, specifying each server’s command and arguments. The app reads this file on startup.

Which OpenAI models are supported?

You can set any model name via the MODEL_NAME environment variable (e.g., gpt-4-turbo, gpt-3.5-turbo). The app passes the chosen model to OpenAI’s API.

Is MCP TurboClient free to use?

The software itself is released under the MIT license and is free to use. You must provide your own OpenAI API key, which may incur usage costs.

What are the main limitations?

The README does not mention specific limitations. The app requires a Python environment and a running FastAPI server; all data is stored locally in an SQLite database.

Details

Author
techspawn
Category
web-chat
Repository
techspawn/mcp-turboclient

MCP TurboClient 🚀

A FastAPI-based application that provides a web interface for interacting with Multiple Control Protocol (MCP) servers while utilizing OpenAI's API for processing messages.

Overview

This application allows users to:

- Connect to multiple MCP servers simultaneously
- Process messages through OpenAI's API
- Interact with the system via a web-based chat interface
- Configure and store API license keys

Tech Stack

Client: html, css, js, bootstrap, animatedjs

Server: FastAPI, Openai, MCP

Features

- Connect multiple servers at a time
- Use websocket any where you want

Screenshots

App Screenshot

App Screenshot

Installation

1. Clone the repository:

   git clone https://github.com/techspawn/MCP-TurboClient.git
   cd openai-mcp
   
2. Install dependencies:
   uv pip install -r requirements.txt
   
3. Set up your environment variables:
   export MODEL_NAME="gpt-4-turbo" # or your preferred OpenAI model
   

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

MODEL_NAME=gpt-3.5-turbo

Configuration

1. Create a config.json file in the root directory:

   {
     "mcpServers": {
       "server1": {
         "command": "your_command",
         "args": ["arg1", "arg2"]
       },
       "server2": {
         "command": "another_command",
         "args": ["arg1", "arg2"]
       }
     }
   }
   
2. Initialize the SQLite database:
   import sqlite3

conn = sqlite3.connect("mcp_config.db")
cursor = conn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS config (license_key TEXT)")
conn.commit()
conn.close()


3. Configure your OpenAI API key through the web interface.

Usage

1. Start the application:

   uvicorn main:app --reload
   
2. Open your browser and navigate to http://localhost:8000 3. Enter your OpenAI API key in the web interface to save it to the database 4. Use the chat interface to send messages that will be processed through the MCP servers and OpenAI

Usage

1. Start the application:

   uvicorn main:app --reload
   
2. Open your browser and navigate to http://localhost:8000 3. Enter your OpenAI API key in the web interface to save it to the database 4. Use the chat interface to send messages that will be processed through the MCP servers and OpenAI

Project Structure

├── images/                    # Directory for storing image assets
│   ├── chat_window.png        # Screenshot of the chat window
│   └── setting_page.png       # Screenshot of the settings page
├── models/                    # Contains Python modules related to data models
│   ├── __init__.py            # Makes the 'models' directory a Python package
│   ├── client.py              # Defines client-related logic (e.g., API client, user handling)
│   ├── config.py              # Handles application configuration settings
│   └── py.typed               # Indicates that this package supports type hints
├── static/                    # Placeholder for static assets (CSS, JavaScript, images)
├── templates/                 # Directory for HTML templates
│   ├── base.html              # Base template for consistent layout across pages
│   ├── chat.html              # Template for the chat interface
│   └── settings.html          # Template for the settings page
├── .env                       # Environment variables (e.g., API keys, credentials)
├── .gitignore                 # Specifies files to be ignored by Git
├── .python-version            # Defines the Python version for this project
├── config.json                # JSON configuration file for application settings
├── database.py                # Handles database connection and operations
├── folder_structure.txt        # Text file describing the project structure
├── LICENSE                    # License file specifying usage terms
├── main.py                     # Entry point of the application
├── mcp_config.db               # SQLite database file or config storage
├── pyproject.toml              # Python project metadata and dependency management
├── README.md                   # Project documentation and setup instructions
├── requirements.txt            # List of required dependencies
└── uv.lock                     # Lock file for package versions (possibly from uv or another package manager)

API Endpoints

- GET /: Main chat interface
- POST /get_settings: Save OpenAI API license key
- WebSocket /chat: Real-time chat communication

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Support

For support, email support@techspawn.com

License

MIT