Mcpapp Colorpicker
A Model Context Protocol (MCP) App built with .NET that provides an interactive color picker with a rich UI
Installation
npx mcpapp-colorpickerAsk AI about Mcpapp Colorpicker
Powered by Claude Β· Grounded in docs
I know everything about Mcpapp Colorpicker. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π¨ Color Picker MCP App
A Model Context Protocol (MCP) App built with .NET that provides an interactive color picker with a simplified UI. This is a sample implementation demonstrating how to build MCP Apps using C# and the ModelContextProtocol.AspNetCore package.
Note: MCP Apps are a new extension to MCP that allows servers to provide interactive UI components. This sample demonstrates how to implement one in .NET/C#.
πΈ Screenshots
Initial View

After Selecting a Color

The simplified interface allows you to:
- Use the Color Slider to select your base hue from the full color spectrum
- Pick from the Gradient Selector to choose the exact shade, tint, or tone
- See your selection instantly in the large preview box with the HEX code
β¨ Features
- Simple & Intuitive Interface - Clean, focused design for easy color selection
- Color Slider - Visual hue selector with full spectrum of colors
- Gradient Selector - 200-color gradient grid showing different shades and tints
- Real-time Preview - See your selected color instantly with HEX code display
- VS Code Theme Integration - Automatically adapts to your VS Code theme
- HTTP Transport - Easy integration with MCP clients
π οΈ MCP Tool
ColorPicker
Opens an interactive color picker UI to visually select a color.
Parameters:
| Parameter | Type | Description |
|---|---|---|
initialColor | string (optional) | Initial color in hex format (e.g., #FF5733). Default: #3498DB |
Returns: A ColorPickerResult with the UI resource URI for rendering the interactive picker.
π Prerequisites
- .NET 10 SDK or later
- Visual Studio Code with MCP extension
π Getting Started
1. Clone the repository
git clone https://github.com/elbruno/mcpapp-colorpicker.git
cd mcpapp-colorpicker
2. Build and run
dotnet restore
dotnet run
The server will start on http://localhost:3001/mcp.
3. Configure VS Code
Add the following to your VS Code MCP configuration (.vscode/mcp.json):
{
"servers": {
"color-picker": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}
4. Use it
In VS Code with the MCP extension, invoke the ColorPicker tool to open the interactive color picker UI.
Sample prompt:
"I want to select a color to use it later in my webdesign application"
5. (Optional) Expose with ngrok
To access the MCP app from a remote location or share it with others, you can use ngrok to expose your local server:
Download ngrok
- Visit ngrok.com
- Sign up for a free account
- Download the ngrok executable for your operating system
- Extract it to a folder and add it to your PATH, or use it directly
Run ngrok
In a new terminal, expose your local server:
ngrok http 3001
ngrok will display a public URL like https://abc123def456.ngrok.io that forwards to your local http://localhost:3001.
Update VS Code Configuration
Replace your local URL with the ngrok URL in .vscode/mcp.json:
{
"servers": {
"color-picker": {
"type": "http",
"url": "https://abc123def456.ngrok.io/mcp"
}
}
}
Now you can use the ColorPicker tool from any location!
ποΈ Project Structure
mcpapp-colorpicker/
βββ ColorPickerMcp.csproj # Project file with MCP SDK reference
βββ Program.cs # MCP server implementation with embedded UI
βββ README.md # This file
βββ LICENSE # MIT License
βββ .github/
βββ workflows/
βββ build.yml # GitHub Actions CI
π§ Technical Details
This MCP App uses:
- ModelContextProtocol.AspNetCore (
1.1.0) - Official .NET SDK for MCP - HTTP Transport - Exposes MCP endpoint at
/mcp - Embedded HTML UI - Color picker interface served at
/ui/color-picker - Attribute-based Tool Definition - Uses
[McpServerToolType]and[McpServerTool]attributes
Endpoints
| Endpoint | Description |
|---|---|
/mcp | MCP protocol endpoint for client connections |
/ui/color-picker | Interactive color picker HTML UI |
/mcp/resources/ui/color-picker | UI as MCP resource |
π Resources
Learn more about MCP Apps:
- πΊ VS Code MCP Apps Video
- π MCP Apps - Bringing UI
- π MCP Apps Announcement Blog
- π MCP Apps QuickStart
- π» Official Samples Repository
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π€ Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
π€ Author
El Bruno - @elbruno
