๐Ÿ“ฆ subnetmarco / favorite-colors-mcp

This is a simple MCP server that records your favorite colors

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching โš–๏ธ Other
๐Ÿ“ฅ Clone https://github.com/subnetmarco/favorite-colors-mcp.git
HTTPS git clone https://github.com/subnetmarco/favorite-colors-mcp.git
SSH git clone git@github.com:subnetmarco/favorite-colors-mcp.git
CLI gh repo clone subnetmarco/favorite-colors-mcp
subnetmarco subnetmarco docs: badges 1070479 4 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ cmd
๐Ÿ“ internal
๐Ÿ“„ .gitignore
๐Ÿ“„ .golangci.yml
๐Ÿ“„ generate-cert.sh
๐Ÿ“„ go.mod
๐Ÿ“„ go.sum
๐Ÿ“„ LICENSE
๐Ÿ“„ Makefile
๐Ÿ“„ README.md
๐Ÿ“„ README.md

CI Go Report Card License Go Version

Favorite Colors MCP Server

A Model Context Protocol server for managing favorite colors, supporting both Claude Desktop and MCP Inspector.

Quick Start

# Build
make build

# For Claude Desktop
./favorite-colors-mcp

# For MCP Inspector (HTTP)
./favorite-colors-mcp -transport=http

# For MCP Inspector (HTTPS)
make cert  # Generate certificates
./favorite-colors-mcp -transport=https -cert=certificates/server.crt -key=certificates/server.key

MCP Inspector Setup

  • Start the server: ./favorite-colors-mcp -transport=http
  • Open MCP Inspector: npx @modelcontextprotocol/inspector
  • Configure:
  • Transport Type: StreamableHttp
  • URL: http://localhost:8080/mcp

Claude Desktop Setup

  • Add to your Claude Desktop config:
{
     "mcpServers": {
       "favorite-colors-mcp": {
         "command": "/path/to/favorite-colors-mcp/favorite-colors-mcp"
       }
     }
   }
  • Restart Claude Desktop

Available Tools

  • add_color - Add a color to favorites (color: string)
  • get_colors - Get all favorite colors
  • remove_color - Remove a color (color: string)
  • clear_colors - Clear all colors

Command Options

./favorite-colors-mcp -help                                    # Show help
./favorite-colors-mcp                                          # Stdio (Claude Desktop)
./favorite-colors-mcp -transport=http                         # HTTP (MCP Inspector)
./favorite-colors-mcp -transport=https -cert=certificates/server.crt -key=certificates/server.key  # HTTPS
./favorite-colors-mcp -transport=http -port=:9000             # Custom port

Testing

go test -v          # Run tests
go test -bench=.    # Run benchmarks
go test -cover      # Test coverage

Example Usage

Claude Desktop: "Add blue to my favorite colors"

HTTP API:

curl -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"add_color","arguments":{"color":"blue"}}}'

Requirements

  • Go 1.21+
  • Claude Desktop or MCP Inspector

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Ready to use with both Claude Desktop and MCP Inspector! ๐ŸŽจ