Skip to content
Back to search

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/megagrindstone--mcp-web-ui/badge.svg)](/listings/megagrindstone--mcp-web-ui)

HTML

<a href="/listings/megagrindstone--mcp-web-ui"><img src="/api/listings/megagrindstone--mcp-web-ui/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Quick Start

1. Clone the repository:

   git clone https://github.com/MegaGrindStone/mcp-web-ui.git
   cd mcp-web-ui

2. Configure your environment:

   mkdir -p $HOME/.config/mcpwebui
   cp config.example.yaml $HOME/.config/mcpwebui/config.yaml

3. Set up API keys:

   export ANTHROPIC_API_KEY=your_anthropic_key
   export OPENAI_API_KEY=your_openai_key
   export OPENROUTER_API_KEY=your_openrouter_key

Running the Application

Local Development

go mod download
go run ./cmd/server/main.go

Docker 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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 214 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP Web UI
  2. ![CI](https://github.com/MegaGrindStone/mcp-web-ui/actions/workflows/ci.yml/badge.svg)
  3. [![Go Report Card](https://goreportcard.com/badge/github.com/MegaGrindStone/mcp-web-ui)](https://goreportcard.com/report/github.com/MegaGrindStone/mcp-web-ui)
  4. [![codecov](https://codecov.io/gh/MegaGrindStone/mcp-web-ui/branch/main/graph/badge.svg)](https://codecov.io/gh/MegaGrindStone/mcp-web-ui)
  5. 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.
  6. ## 🌟 Overview
  7. MCP Web UI is designed to simplify and enhance interactions with AI language models by providing:
  8. - A unified interface for multiple LLM providers
  9. - Real-time, streaming chat experiences
  10. - Flexible configuration and model management
  11. - Robust context handling using the MCP protocol
  12. ### Demo Video
  13. [![YouTube](http://i.ytimg.com/vi/DnC-z0CpRpM/hqdefault.jpg)](https://www.youtube.com/watch?v=DnC-z0CpRpM)
  14. ## 🚀 Features
  15. - 🤖 **Multi-Provider LLM Integration**:
  16. - Anthropic (Claude models)
  17. - OpenAI (GPT models)
  18. - Ollama (local models)
  19. - OpenRouter (multiple providers)
  20. - 💬 **Intuitive Chat Interface**
  21. - 🔄 **Real-time Response Streaming** via Server-Sent Events (SSE)
  22. - 🔧 **Dynamic Configuration Management**
  23. - 📊 **Advanced Context Aggregation**
  24. - 💾 **Persistent Chat History** using BoltDB
  25. - 🎯 **Flexible Model Selection**
  26. ## 📋 Prerequisites
  27. - Go 1.23+
  28. - Docker (optional)
  29. - API keys for desired LLM providers
  30. ## 🛠 Installation
  31. ### Quick Start
  32. 1. Clone the repository:
  33. ```bash
  34. git clone https://github.com/MegaGrindStone/mcp-web-ui.git
  35. cd mcp-web-ui
  36. ```
  37. 2. Configure your environment:
  38. ```bash
  39. mkdir -p $HOME/.config/mcpwebui
  40. cp config.example.yaml $HOME/.config/mcpwebui/config.yaml
  41. ```
  42. 3. Set up API keys:
  43. ```bash
  44. export ANTHROPIC_API_KEY=your_anthropic_key
  45. export OPENAI_API_KEY=your_openai_key
  46. export OPENROUTER_API_KEY=your_openrouter_key
  47. ```
  48. ### Running the Application
  49. #### Local Development
  50. ```bash
  51. go mod download
  52. go run ./cmd/server/main.go
  53. ```
  54. #### Docker Deployment
  55. ```bash
  56. docker build -t mcp-web-ui .
  57. docker run -p 8080:8080 \
  58. -v $HOME/.config/mcpwebui/config.yaml:/app/config.yaml \
  59. -e ANTHROPIC_API_KEY \
  60. -e OPENAI_API_KEY \
  61. -e OPENROUTER_API_KEY \
  62. mcp-web-ui
  63. ```
  64. ## 🔧 Configuration
  65. The configuration file (`config.yaml`) provides comprehensive settings for customizing the MCP Web UI. Here's a detailed breakdown:
  66. ### Server Configuration
  67. - `port`: The port on which the server will run (default: 8080)
  68. - `logLevel`: Logging verbosity (options: debug, info, warn, error; default: info)
  69. - `logMode`: Log output format (options: json, text; default: text)
  70. ### Prompt Configuration
  71. - `systemPrompt`: Default system prompt for the AI assistant
  72. - `titleGeneratorPrompt`: Prompt used to generate chat titles
  73. ### LLM (Language Model) Configuration
  74. The `llm` section supports multiple providers with provider-specific configurations:
  75. #### Common LLM Parameters
  76. - `provider`: Choose from: ollama, anthropic, openai, openrouter
  77. - `model`: Specific model name (e.g., 'claude-3-5-sonnet-20241022')
  78. - `parameters`: Fine-tune model behavior:
  79. - `temperature`: Randomness of responses (0.0-1.0)
  80. - `topP`: Nucleus sampling threshold
  81. - `topK`: Number of highest probability tokens to keep
  82. - `frequencyPenalty`: Reduce repetition of token sequences
  83. - `presencePenalty`: Encourage discussing new topics
  84. - `maxTokens`: Maximum response length
  85. - `stop`: Sequences to stop generation
  86. - And more provider-specific parameters
  87. #### Provider-Specific Configurations
  88. - **Ollama**:
  89. - `host`: Ollama server URL (default: http://localhost:11434)
  90. - **Anthropic**:
  91. - `apiKey`: Anthropic API key (can use ANTHROPIC_API_KEY env variable)
  92. - `maxTokens`: Maximum token limit
  93. - Note: Stop sequences containing only whitespace are ignored, and whitespace is trimmed from valid sequences as Anthropic doesn't support whitespace in stop sequences
  94. - **OpenAI**:
  95. - `apiKey`: OpenAI API key (can use OPENAI_API_KEY env variable)
  96. - `endpoint`: OpenAI API endpoint (default: https://api.openai.com/v1)
  97. - For using alternative OpenAI-compatible APIs, see [this discussion thread](https://github.com/MegaGrindStone/mcp-web-ui/discussions/7)
  98. - **OpenRouter**:
  99. - `apiKey`: OpenRouter API key (can use OPENROUTER_API_KEY env variable)
  100. ### Title Generator Configuration
  101. The `genTitleLLM` section allows separate configuration for title generation, defaulting to the main LLM if not specified.
  102. ### MCP Server Configurations
  103. - `mcpSSEServers`: Configure Server-Sent Events (SSE) servers
  104. - `url`: SSE server URL
  105. - `maxPayloadSize`: Maximum payload size
  106. - `mcpStdIOServers`: Configure Standard Input/Output servers
  107. - `command`: Command to run server
  108. - `args`: Arguments for the server command
  109. #### Example MCP Server Configurations
  110. **SSE Server Example:**
  111. ```yaml
  112. mcpSSEServers:
  113. filesystem:
  114. url: https://yoursseserver.com
  115. maxPayloadSize: 1048576 # 1MB
  116. ```
  117. **StdIO Server Examples:**
  118. 1. Using the [official filesystem MCP server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem):
  119. ```yaml
  120. mcpStdIOServers:
  121. filesystem:
  122. command: npx
  123. args:
  124. - -y
  125. - "@modelcontextprotocol/server-filesystem"
  126. - "/path/to/your/files"
  127. ```
  128. 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.
  129. 2. Using [go-mcp filesystem MCP server](https://github.com/MegaGrindStone/go-mcp/tree/main/servers/filesystem):
  130. ```yaml
  131. mcpStdIOServers:
  132. filesystem:
  133. command: go
  134. args:
  135. - run
  136. - github.com/your_username/your_app # Replace with your app
  137. - -path
  138. - "/data/mcp/filesystem" # Path to expose to MCP clients
  139. ```
  140. For 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](https://github.com/MegaGrindStone/go-mcp/blob/main/example/filesystem/main.go) 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.
  141. ### Example Configuration Snippet
  142. ```yaml
  143. port: 8080
  144. logLevel: info
  145. systemPrompt: You are a helpful assistant.
  146. llm:
  147. provider: anthropic
  148. model: claude-3-5-sonnet-20241022
  149. maxTokens: 1000
  150. parameters:
  151. temperature: 0.7
  152. genTitleLLM:
  153. provider: openai
  154. model: gpt-3.5-turbo
  155. ```
  156. ## 🏗 Project Structure
  157. - `cmd/`: Application entry point
  158. - `internal/handlers/`: Web request handlers
  159. - `internal/models/`: Data models
  160. - `internal/services/`: LLM provider integrations
  161. - `static/`: Static assets (CSS)
  162. - `templates/`: HTML templates
  163. ## 🤝 Contributing
  164. 1. Fork the repository
  165. 2. Create a feature branch
  166. 3. Commit your changes
  167. 4. Push and create a Pull Request
  168. ## 📄 License
  169. MIT License

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.