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.18.tar.gz (67.1 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.18-py3-none-any.whl (74.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_open_client-0.4.18.tar.gz
  • Upload date:
  • Size: 67.1 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.18.tar.gz
Algorithm Hash digest
SHA256 b1e4fd5d2005c6e455b34ed255885a91d59c95e68c13600ceda4d9c7d5150e53
MD5 e1eb6d59ee462daccd82f4038bcd8dc1
BLAKE2b-256 ceeb2cea43fce1c9e2eef996665a8e3cfc1d32a734129984af6295b7bbfe3201

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_open_client-0.4.18.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.18-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_open_client-0.4.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2aeadf45bade2581bbd806a39a1e7bf9096662b54886dd0167714c3149a944
MD5 862b755701710e141e9023d7dd60203e
BLAKE2b-256 9fa12dfd60dfc97206b1e6cb1ea16b279b1d44163d0ee77921370672b189fbe8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_open_client-0.4.18-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