Turbo MCP Client logo

Turbo MCP Client

by techspawn

Turbo MCP Client is a FastAPI application providing a web interface for interacting with Models Context Protocol (MCP) servers. It utilizes OpenAI's API for processing messages.

View on GitHub

Last updated: N/A

Turbo MCP Client šŸš€

A FastAPI-based application that provides a web interface for interacting with Models Context 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

App Screenshot

App Screenshot

Installation

  1. Clone the repository:

    git clone https://github.com/techspawn/Turbo-MCP-Client.git
    cd openai-mcp
    
  2. Install dependencies:

    uv pip install -r requirements.txt
    
  3. Set up your environment variables:

    export MODEL_NAME="gpt-4o" # 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-4o

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 [email protected]

License

MIT