Skip to main content

A modern, web-based chat application implementing the Model Context Protocol (MCP) for seamless LLM-tool integration

Project description

MCP Open Client

A modern, web-based chat application that implements the Model Context Protocol (MCP) for seamless integration between Large Language Models and external tools.

๐Ÿš€ What is MCP Open Client?

MCP Open Client is a NiceGUI-based chat application that serves as a bridge between AI models and external tools through the Model Context Protocol (MCP). Think of it as "USB-C for AI" - a universal interface that allows any compatible LLM to securely interact with external data sources, tools, and services.

Key Features

  • ๐Ÿค– Multi-LLM Support: Compatible with Claude, OpenAI, and other OpenAI-compatible APIs
  • ๐Ÿ”ง MCP Integration: Connect to MCP servers for enhanced functionality
  • ๐Ÿ’ฌ Modern Chat Interface: Clean, responsive web UI built with NiceGUI
  • ๐Ÿ“š Conversation Management: Save, load, and organize your chat history
  • โš™๏ธ Easy Configuration: Web-based settings management
  • ๐ŸŒ Local & Remote: Works with local models and cloud APIs
  • ๐Ÿ”’ Secure: All configurations stored locally

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Web Client    โ”‚โ—„โ”€โ”€โ–บโ”‚   MCP Client    โ”‚โ—„โ”€โ”€โ–บโ”‚  MCP Servers    โ”‚
โ”‚   (NiceGUI)     โ”‚    โ”‚  (Protocol)     โ”‚    โ”‚  (FastMCP)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ–ผ                       โ–ผ                       โ–ผ
    Chat Interface         API Integration         External Tools
    โ€ข Conversations        โ€ข OpenAI API           โ€ข File Systems
    โ€ข History             โ€ข Claude API            โ€ข Databases
    โ€ข Settings            โ€ข Local Models          โ€ข Web Services

๐Ÿ“ฆ Installation

Option 1: Install from PyPI (Recommended)

pip install mcp-open-client
mcp-open-client

Option 2: Install from Source

git clone https://github.com/alejoair/mcp-open-client.git
cd mcp-open-client
pip install -e .
mcp-open-client

Option 3: Development Setup

git clone https://github.com/alejoair/mcp-open-client.git
cd mcp-open-client
pip install -r requirements.txt
python -m mcp_open_client.main

๐Ÿš€ Quick Start

  1. Launch the application:

    mcp-open-client
    
  2. Open your browser to http://localhost:8080

  3. Configure your API settings:

    • Go to Configuration โ†’ API Settings
    • Add your API key and model preferences
    • Choose from OpenAI, Claude, or local models
  4. Set up MCP servers (optional):

    • Go to Configuration โ†’ MCP Servers
    • Add servers for enhanced functionality
  5. Start chatting!

โš™๏ธ Configuration

API Settings

Configure your preferred AI model in the web interface:

  • API Key: Your OpenAI/Claude API key
  • Base URL: API endpoint (supports local models like LM Studio)
  • Model: Choose your preferred model
  • System Prompt: Customize the assistant's behavior

MCP Servers

Connect external tools and services:

{
  "mcpServers": {
    "mcp-requests": {
      "disabled": false,
      "command": "uvx",
      "args": ["mcp-requests"],
      "transport": "stdio"
    },
    "mcp-code-editor": {
      "disabled": false,
      "command": "uvx",
      "args": ["mcp-code-editor"]
    }
  }
}

๐Ÿ› ๏ธ Supported MCP Servers

The client works with any MCP-compliant server. Popular options include:

  • mcp-requests: HTTP request capabilities
  • mcp-code-editor: File system operations
  • mcp-database: Database connectivity
  • Custom servers: Build your own with FastMCP

๐Ÿ”ง Development

Project Structure

mcp_open_client/
โ”œโ”€โ”€ main.py                    # Application entry point
โ”œโ”€โ”€ api_client.py             # LLM API communication
โ”œโ”€โ”€ mcp_client.py             # MCP protocol handler
โ”œโ”€โ”€ config_utils.py           # Configuration management
โ”œโ”€โ”€ settings/                 # Default configurations
โ”‚   โ”œโ”€โ”€ user-settings.json    # API settings
โ”‚   โ””โ”€โ”€ mcp-config.json      # MCP server config
โ””โ”€โ”€ ui/                      # User interface components
    โ”œโ”€โ”€ home.py              # Home page
    โ”œโ”€โ”€ chat_interface.py    # Chat UI
    โ”œโ”€โ”€ configure.py         # Settings UI
    โ”œโ”€โ”€ mcp_servers.py       # MCP management
    โ””โ”€โ”€ chat_handlers.py     # Chat logic

Running Tests

python -m pytest tests/

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐ŸŒŸ Features in Detail

Chat Interface

  • Real-time messaging with streaming responses
  • Conversation history with search and organization
  • Message formatting with syntax highlighting
  • Tool integration via MCP protocol

Configuration Management

  • Web-based settings - no need to edit config files
  • Multiple API providers - OpenAI, Anthropic, local models
  • MCP server management - enable/disable servers on the fly
  • Theme customization - dark/light mode support

MCP Integration

  • Protocol compliance - works with any MCP server
  • Dynamic server loading - add servers without restart
  • Tool discovery - automatic detection of available tools
  • Error handling - graceful degradation when servers are unavailable

๐Ÿ“‹ Requirements

  • Python 3.7+
  • Modern web browser
  • Internet connection (for cloud APIs) or local model setup

Dependencies

  • nicegui - Web UI framework
  • openai - API client library
  • fastmcp - MCP protocol implementation
  • websockets - WebSocket support
  • requests - HTTP client
  • jsonschema - Configuration validation

๐Ÿ› Troubleshooting

Common Issues

Connection Problems:

  • Check your API key and base URL
  • Verify network connectivity
  • Ensure MCP servers are running

UI Issues:

  • Clear browser cache
  • Try a different browser
  • Check browser console for errors

MCP Server Issues:

  • Verify server configuration
  • Check server logs
  • Test servers independently

Getting Help

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ”— Links


Made with โค๏ธ by alejoair

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_open_client-0.4.22.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_open_client-0.4.22-py3-none-any.whl (90.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_open_client-0.4.22.tar.gz.

File metadata

  • Download URL: mcp_open_client-0.4.22.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_open_client-0.4.22.tar.gz
Algorithm Hash digest
SHA256 92f055ee9568cbcc96dbfb05663c41e007253b0be3ec9c994d6b1b307579b456
MD5 59fd4a9b9ecb24b052692287f7a7a6a6
BLAKE2b-256 abbe735598b1c37b7fb7f7c0bcc0158341a08595a4e5814cec86c88ae8f8e658

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_open_client-0.4.22.tar.gz:

Publisher: release.yml on alejoair/mcp-open-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_open_client-0.4.22-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_open_client-0.4.22-py3-none-any.whl
Algorithm Hash digest
SHA256 c0abaea1cbc247321c154f39e33d5e677bea3cc709a2e4c3347dfb679f151b47
MD5 944d6af1bd04f9103f6bcaed6679ac82
BLAKE2b-256 532484145dcf8732629fbba7ac0b3acdb5de7e4c78872265244c812d10c7d2c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_open_client-0.4.22-py3-none-any.whl:

Publisher: release.yml on alejoair/mcp-open-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page