A modern, web-based chat application that implements the Model Context Protocol (MCP) for seamless integration between Large Language Models and external tools.
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.
- π€ 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
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β 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
pip install mcp-open-client
mcp-open-clientgit clone https://github.com/alejoair/mcp-open-client.git
cd mcp-open-client
pip install -e .
mcp-open-clientgit clone https://github.com/alejoair/mcp-open-client.git
cd mcp-open-client
pip install -r requirements.txt
python -m mcp_open_client.main-
Launch the application:
mcp-open-client
-
Open your browser to
http://localhost:8080 -
Configure your API settings:
- Go to Configuration β API Settings
- Add your API key and model preferences
- Choose from OpenAI, Claude, or local models
-
Set up MCP servers (optional):
- Go to Configuration β MCP Servers
- Add servers for enhanced functionality
-
Start chatting!
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
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"]
}
}
}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
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
python -m pytest tests/- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Real-time messaging with streaming responses
- Conversation history with search and organization
- Message formatting with syntax highlighting
- Tool integration via MCP protocol
- 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
- 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
- Python 3.7+
- Modern web browser
- Internet connection (for cloud APIs) or local model setup
nicegui- Web UI frameworkopenai- API client libraryfastmcp- MCP protocol implementationwebsockets- WebSocket supportrequests- HTTP clientjsonschema- Configuration validation
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
- π Check the documentation
- π Report bugs
- π¬ Ask questions
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with NiceGUI for the web interface
- Uses FastMCP for MCP protocol implementation
- Inspired by the Model Context Protocol specification
- Homepage: https://github.com/alejoair/mcp-open-client
- Documentation: Wiki
- Bug Tracker: Issues
- MCP Specification: modelcontextprotocol.io
Made with β€οΈ by alejoair