mcp-web-ui
MCP Web UI is a web-based user interface that serves as a Host within the Model Context Protocol (MCP) architecture. It provides a powerful and user-friendly interface for interacting with Large Language Models (LLMs) while managing context aggregation and coordination between clients and servers.
Documentation
MCP Web UI
MCP Web UI is a web-based user interface that serves as a Host within the Model Context Protocol (MCP) architecture. It provides a powerful and user-friendly interface for interacting with Large Language Models (LLMs) while managing context aggregation and coordination between clients and servers.
๐ Overview
MCP Web UI is designed to simplify and enhance interactions with AI language models by providing:
- A unified interface for multiple LLM providers
- Real-time, streaming chat experiences
- Flexible configuration and model management
- Robust context handling using the MCP protocol
Demo Video

๐ Features
- ๐ค Multi-Provider LLM Integration:
- Anthropic (Claude models)
- OpenAI (GPT models)
- Ollama (local models)
- OpenRouter (multiple providers)
- ๐ฌ Intuitive Chat Interface
- ๐ Real-time Response Streaming via Server-Sent Events (SSE)
- ๐ง Dynamic Configuration Management
- ๐ Advanced Context Aggregation
- ๐พ Persistent Chat History using BoltDB
- ๐ฏ Flexible Model Selection
๐ Prerequisites
- Go 1.23+
- Docker (optional)
- API keys for desired LLM providers
๐ Installation
Quick Start
1. Clone the repository:
git clone https://github.com/MegaGrindStone/mcp-web-ui.git
cd mcp-web-ui2. Configure your environment:
mkdir -p $HOME/.config/mcpwebui
cp config.example.yaml $HOME/.config/mcpwebui/config.yaml3. Set up API keys:
export ANTHROPIC_API_KEY=your_anthropic_key
export OPENAI_API_KEY=your_openai_key
export OPENROUTER_API_KEY=your_openrouter_keyRunning the Application
Local Development
go mod download
go run ./cmd/server/main.goDocker Deployment
docker build -t mcp-web-ui .
docker run -p 8080:8080 \
-v $HOME/.config/mcpwebui/config.yaml:/app/config.yaml \
-e ANTHROPIC_API_KEY \
-e OPENAI_API_KEY \
-e OPENROUTER_API_KEY \
mcp-web-ui๐ง Configuration
The configuration file (`config.yaml`) provides comprehensive settings for customizing the MCP Web UI. Here's a detailed breakdown:
Server Configuration
- `port`: The port on which the server will run (default: 8080)
- `logLevel`: Logging verbosity (options: debug, info, warn, error; default: info)
- `logMode`: Log output format (options: json, text; default: text)
Prompt Configuration
- `systemPrompt`: Default system prompt for the AI assistant
- `titleGeneratorPrompt`: Prompt used to generate chat titles
LLM (Language Model) Configuration
The `llm` section supports multiple providers with provider-specific configurations:
Common LLM Parameters
- `provider`: Choose from: ollama, anthropic, openai, openrouter
- `model`: Specific model name (e.g., 'claude-3-5-sonnet-20241022')
- `parameters`: Fine-tune model behavior:
- `temperature`: Randomness of responses (0.0-1.0)
- `topP`: Nucleus sampling threshold
- `topK`: Number of highest probability tokens to keep
- `frequencyPenalty`: Reduce repetition of token sequences
- `presencePenalty`: Encourage discussing new topics
- `maxTokens`: Maximum response length
- `stop`: Sequences to stop generation
- And more provider-specific parameters
Provider-Specific Configurations
- Ollama:
- `host`: Ollama server URL (default: http://localhost:11434)
- Anthropic:
- `apiKey`: Anthropic API key (can use ANTHROPIC_API_KEY env variable)
- `maxTokens`: Maximum token limit
- Note: Stop sequences containing only whitespace are ignored, and whitespace is trimmed from valid sequences as Anthropic doesn't support whitespace in stop sequences
- OpenAI:
- `apiKey`: OpenAI API key (can use OPENAI_API_KEY env variable)
- `endpoint`: OpenAI API endpoint (default: https://api.openai.com/v1)
- For using alternative OpenAI-compatible APIs, see this discussion thread
- OpenRouter:
- `apiKey`: OpenRouter API key (can use OPENROUTER_API_KEY env variable)
Title Generator Configuration
The `genTitleLLM` section allows separate configuration for title generation, defaulting to the main LLM if not specified.
MCP Server Configurations
- `mcpSSEServers`: Configure Server-Sent Events (SSE) servers
- `url`: SSE server URL
- `maxPayloadSize`: Maximum payload size
- `mcpStdIOServers`: Configure Standard Input/Output servers
- `command`: Command to run server
- `args`: Arguments for the server command
Example MCP Server Configurations
SSE Server Example:
mcpSSEServers:
filesystem:
url: https://yoursseserver.com
maxPayloadSize: 1048576 # 1MBStdIO Server Examples:
1. Using the official filesystem MCP server:
mcpStdIOServers:
filesystem:
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- "/path/to/your/files"This example can be used directly as the official filesystem mcp server is an executable package that can be run with npx. Just update the path to point to your desired directory.
2. Using go-mcp filesystem MCP server:
mcpStdIOServers:
filesystem:
command: go
args:
- run
- github.com/your_username/your_app # Replace with your app
- -path
- "/data/mcp/filesystem" # Path to expose to MCP clientsFor this example, you'll need to create a new Go application that imports the `github.com/MegaGrindStone/go-mcp/servers/filesystem` package. The flag naming (like `-path` in this example) is completely customizable based on how you structure your own application - it doesn't have to be called "path". This example is merely a starting point showing one possible implementation where a flag is used to specify which directory to expose. You're free to design your own application structure and command-line interface according to your specific needs.
Example Configuration Snippet
port: 8080
logLevel: info
systemPrompt: You are a helpful assistant.
llm:
provider: anthropic
model: claude-3-5-sonnet-20241022
maxTokens: 1000
parameters:
temperature: 0.7
genTitleLLM:
provider: openai
model: gpt-3.5-turbo๐ Project Structure
- `cmd/`: Application entry point
- `internal/handlers/`: Web request handlers
- `internal/models/`: Data models
- `internal/services/`: LLM provider integrations
- `static/`: Static assets (CSS)
- `templates/`: HTML templates
๐ค Contributing
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push and create a Pull Request
๐ License
MIT License
Frequently asked questions
What is mcp-web-ui?
mcp-web-ui is MCP Web UI is a web-based user interface that serves as a Host within the Model Context Protocol (MCP) architecture. It provides a powerful and user-friendly interface for interacting with Large Language Models (LLMs) while managing context aggregation and coordination between clients and servers.
How do I install mcp-web-ui?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-web-ui open source?
Yes โ it is hosted on GitHub at https://github.com/MegaGrindStone/mcp-web-ui and has 87 stars.
Related MCP tools
Query anything (GitHub, Notion, +40 more) with SQL and let LLMs (ChatGPT, Claude) connect to using MCP Go-based implementation. Trusted by 1300+ developers.
:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted and local-first. Drop-in replacement for OpenAI, running on consumer-gra...
WhatsApp MCP server Go-based implementation. Trusted by 4900+ developers. Trusted by 4900+ developers. Trusted by 4900+ developers.
ToolHive makes deploying MCP servers easy, secure and fun Go-based implementation. Trusted by 1300+ developers. Trusted by 1300+ developers.
The most powerful MCP Slack Server with no permission requirements, Apps support, multiple transports Stdio and SSE, DMs, Group DMs and smart history fetch l...
ไธๆฌพ่ฝป้็บงใ่ทจๅนณๅฐ็ Mini Kubernetes AI Dashboard๏ผๆฏๆๅคงๆจกๅ+ๆบ่ฝไฝ+MCP(ๆฏๆ่ฎพ็ฝฎๆไฝๆ้)๏ผ้ๆๅค้็พค็ฎก็ใๆบ่ฝๅๆใๅฎๆถๅผๅธธๆฃๆต็ญๅ่ฝ๏ผๆฏๆๅคๆถๆๅนถๅฏๅๆไปถ้จ็ฝฒ๏ผๅฉๅ้ซๆ้็พค็ฎก็ไธ่ฟ็ปดไผๅใ Go-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP