Spectra MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π¨ Spectra MCP Server
A powerful Model Context Protocol (MCP) server for converting colors between different color spaces and formats. Built with FastMCP and powered by the coloraide library.
π Hosted Deployment
Spectra is now available as a hosted service! No installation required - integrate directly with any MCP client that supports remote HTTP servers.
Server URL: https://spectra-mcp.fastmcp.app/mcp
Simply add the URL to your MCP client configuration and start using color conversion tools immediately.
Related MCP server: MCP Color Converter
Overview
Spectra provides seamless color conversion capabilities through MCP tools, enabling AI assistants and applications to convert colors between various formats including RGB, HEX, HSL, and OKLCH color spaces. This server is ideal for design tools, theme generators, and any application requiring robust color manipulation.
Why Spectra?
Large Language Models (LLMs) struggle with converting colors between different formats in a deterministic way. Even seemingly simple conversions like #ff8080 to RGB or OKLCH to HEX can produce inconsistent or incorrect results when attempted through pure reasoning. Spectra solves this problem by providing reliable, deterministic color conversion tools that AI assistants can call, ensuring accurate and consistent color transformations every time.
Features
π Hosted Service: Available remotely at
https://spectra-mcp.fastmcp.app/mcp- no installation neededMultiple Color Space Support: Convert between RGB, HEX, HSL, and OKLCH color spaces
Bidirectional Conversions: Convert colors in any direction between supported formats
High-Quality Conversions: Powered by the coloraide library for accurate color science
MCP Protocol: Standardized interface for integration with AI assistants and tools
HTTP Transport: Supports remote HTTP MCP servers for seamless integration
Supported Conversions
The following table shows all supported color format conversions:
From \ To | RGB | HEX | HSL | OKLCH |
RGB | β | β | β | β |
HEX | β | β | β | β |
HSL | β | β | β | β |
OKLCH | β | β | β | β |
All conversions are bidirectionalβyou can convert between any two formats in either direction.
π οΈ Installation
Requirements
Cursor, Claude Code, VSCode, Windsurf or another MCP Client
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
Since Cursor 1.0, you can click the install button at the top of this README for instant one-click installation.
{
"mcpServers": {
"spectra": {
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}Run this command. See Claude Code MCP docs for more info.
claude mcp add --transport http spectra https://spectra-mcp.fastmcp.app/mcpRun this command in your terminal. See Amp MCP docs for more info.
amp mcp add spectra https://spectra-mcp.fastmcp.app/mcpAdd this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"spectra": {
"serverUrl": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
"mcp": {
"servers": {
"spectra": {
"type": "http",
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}You can easily install Spectra through the Cline MCP Server Marketplace by following these instructions:
Open Cline.
Click the hamburger menu icon (β°) to enter the MCP Servers section.
Use the search bar within the Marketplace tab to find Spectra.
Click the Install button.
Or you can directly edit MCP servers configuration:
Open Cline.
Click the hamburger menu icon (β°) to enter the MCP Servers section.
Choose Remote Servers tab.
Click the Edit Configuration button.
Add spectra to
mcpServers:
{
"mcpServers": {
"spectra": {
"url": "https://spectra-mcp.fastmcp.app/mcp",
"type": "streamableHttp"
}
}
}Add this to your Zed settings.json. See Zed Context Server docs for more info.
Note: Zed currently supports local MCP servers only. For remote server support, please check Zed's documentation for updates or use another MCP client that supports remote HTTP servers.
Note: Augment Code currently supports local MCP servers only. For remote server support, please check Augment Code's documentation for updates or use another MCP client that supports remote HTTP servers.
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.
{
"mcpServers": {
"spectra": {
"type": "streamable-http",
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}Open Claude Desktop and navigate to Settings > Connectors > Add Custom Connector. Enter the name as Spectra and the remote MCP server URL as https://spectra-mcp.fastmcp.app/mcp.
Add this to your Opencode configuration file. See Opencode MCP docs for more info.
"mcp": {
"spectra": {
"type": "remote",
"url": "https://spectra-mcp.fastmcp.app/mcp",
"enabled": true
}
}See OpenAI Codex for more information.
Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.spectra]
url = "https://spectra-mcp.fastmcp.app/mcp"Note: JetBrains AI Assistant currently supports local MCP servers only. For remote server support, please check JetBrains' documentation for updates or use another MCP client that supports remote HTTP servers.
Note: Kiro currently supports local MCP servers only. For remote server support, please check Kiro's documentation for updates or use another MCP client that supports remote HTTP servers.
Use the Add manually feature and fill in the JSON configuration information for that MCP server.
For more details, visit the Trae documentation.
{
"mcpServers": {
"spectra": {
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}Note: LM Studio currently supports local MCP servers only. For remote server support, please check LM Studio's documentation for updates or use another MCP client that supports remote HTTP servers.
You can configure Spectra MCP in Visual Studio 2022 by following the Visual Studio MCP Servers documentation.
Add this to your Visual Studio MCP config file (see the Visual Studio docs for details):
{
"inputs": [],
"servers": {
"spectra": {
"type": "http",
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}For more information and troubleshooting, refer to the Visual Studio MCP Servers documentation.
Add this to your Crush configuration file. See Crush MCP docs for more info.
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"spectra": {
"type": "http",
"url": "https://spectra-mcp.fastmcp.app/mcp"
}
}
}Note: BoltAI currently supports local MCP servers only. For remote server support, please check BoltAI's documentation for updates or use another MCP client that supports remote HTTP servers.
Note: Warp currently supports local MCP servers only. For remote server support, please check Warp's documentation for updates or use another MCP client that supports remote HTTP servers.
Note: Perplexity Desktop currently supports local MCP servers only. For remote server support, please check Perplexity's documentation for updates or use another MCP client that supports remote HTTP servers.
π» Development Setup (For Contributors)
If you want to contribute to Spectra or run it locally:
Prerequisites
Python 3.14 or higher
uv package manager (recommended)
Setup
Clone the repository:
git clone <repository-url>
cd spectra-mcpInstall dependencies using uv:
uv syncStart the server:
uv run python main.pyThe server will start on http://127.0.0.1:8000 by default.
API Reference
Tools
oklch_to_rgb
Convert an OKLCH color to an RGB color.
Parameters:
oklch(string): OKLCH color string (e.g.,"oklch(0.7 0.2 180)")
Returns:
RGB color string (e.g.,
"rgb(255, 128, 128)")
rgb_to_oklch
Convert an RGB color to an OKLCH color.
Parameters:
rgb(string): RGB color string (e.g.,"rgb(255, 128, 128)"or"255, 128, 128")
Returns:
OKLCH color string (e.g.,
"oklch(0.7 0.2 180)")
hex_to_rgb
Convert a hex color to an RGB color.
Parameters:
hex(string): Hex color string (e.g.,"#ff8080"or"ff8080")
Returns:
RGB color string (e.g.,
"rgb(255, 128, 128)")
rgb_to_hex
Convert an RGB color to a hex color.
Parameters:
rgb(string): RGB color string (e.g.,"rgb(255, 128, 128)"or"255, 128, 128")
Returns:
Hex color string (e.g.,
"#ff8080")
oklch_to_hex
Convert an OKLCH color to a hex color.
Parameters:
oklch(string): OKLCH color string (e.g.,"oklch(0.7 0.2 180)")
Returns:
Hex color string (e.g.,
"#ff8080")
hex_to_oklch
Convert a hex color to an OKLCH color.
Parameters:
hex(string): Hex color string (e.g.,"#ff8080"or"ff8080")
Returns:
OKLCH color string (e.g.,
"oklch(0.7 0.2 180)")
rgb_to_hsl
Convert an RGB color to an HSL color.
Parameters:
rgb(string): RGB color string (e.g.,"rgb(255, 128, 128)"or"255, 128, 128")
Returns:
HSL color string (e.g.,
"hsl(0 100% 75%)")
hsl_to_rgb
Convert an HSL color to an RGB color.
Parameters:
hsl(string): HSL color string (e.g.,"hsl(0 100% 75%)")
Returns:
RGB color string (e.g.,
"rgb(255, 128, 128)")
oklch_to_hsl
Convert an OKLCH color to an HSL color.
Parameters:
oklch(string): OKLCH color string (e.g.,"oklch(0.7 0.2 180)")
Returns:
HSL color string (e.g.,
"hsl(0 100% 75%)")
hsl_to_oklch
Convert an HSL color to an OKLCH color.
Parameters:
hsl(string): HSL color string (e.g.,"hsl(0 100% 75%)")
Returns:
OKLCH color string (e.g.,
"oklch(0.7 0.2 180)")
hex_to_hsl
Convert a hex color to an HSL color.
Parameters:
hex(string): Hex color string (e.g.,"#ff8080"or"ff8080")
Returns:
HSL color string (e.g.,
"hsl(0 100% 75%)")
hsl_to_hex
Convert an HSL color to a hex color.
Parameters:
hsl(string): HSL color string (e.g.,"hsl(0 100% 75%)")
Returns:
Hex color string (e.g.,
"#ff8080")
Examples
Converting OKLCH to RGB
Input: oklch(0.7 0.2 180)
Output: rgb(255, 128, 128)Converting RGB to OKLCH
Input: rgb(255, 128, 128)
Output: oklch(0.7 0.2 180)Converting HEX to RGB
Input: #ff8080
Output: rgb(255, 128, 128)Converting RGB to HEX
Input: rgb(255, 128, 128)
Output: #ff8080Converting OKLCH to HEX
Input: oklch(0.7 0.2 180)
Output: #ff8080Converting HEX to OKLCH
Input: #ff8080
Output: oklch(0.7 0.2 180)Converting RGB to HSL
Input: rgb(255, 128, 128)
Output: hsl(0 100% 75%)Converting HSL to RGB
Input: hsl(0 100% 75%)
Output: rgb(255, 128, 128)Converting OKLCH to HSL
Input: oklch(0.7 0.2 180)
Output: hsl(0 100% 75%)Converting HSL to OKLCH
Input: hsl(0 100% 75%)
Output: oklch(0.7 0.2 180)Converting HEX to HSL
Input: #ff8080
Output: hsl(0 100% 75%)Converting HSL to HEX
Input: hsl(0 100% 75%)
Output: #ff8080Configuration
Remote/Hosted Server
No configuration needed! The hosted service at https://spectra-mcp.fastmcp.app/mcp is ready to use.
Local Development Server
For local development, server configuration can be modified in fastmcp.json:
Port: Change the
portvalue (default: 8000)Host: Change the
hostvalue (default: 127.0.0.1)Log Level: Adjust
log_level(default: DEBUG)Environment: Modify environment variables as needed
Dependencies
coloraide (>=5.1): Advanced color manipulation library
fastmcp (>=2.13.0.2): Fast MCP server framework
Acknowledgments
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models and 10 tools: up to 4 images per call, SVG vectorization, editing and more. Remote MCP with OAuth, no API keys. Pay per image, no subscription.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Build, validate, deploy β HTTP APIs, cron jobs, webhooks and MCP tools β from your AI client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides color conversion between multiple color spaces including RGB, RGBA, HEX, HSL, OKLCH, LAB, and CMYK.2-
- AlicenseNot gradedqualityDmaintenanceA comprehensive toolkit for color conversion, manipulation, and accessibility analysis supporting formats like OkLCH and WCAG compliance. It enables AI agents to manage design systems by generating harmonious palettes, transforming color spaces, and performing contrast checks.2MIT
- AlicenseAqualityBmaintenanceA simple color utility MCP server for frontend developers. Convert, mix, adjust, and analyze colors right from your AI agents.1399 npmMIT
- AlicenseAqualityDmaintenanceEnables color conversion between HEX/RGB/HSL/HSV/CMYK, palette generation, WCAG contrast checking, color mixing/adjustment, and CSS gradient creation for AI agents.542 npmMIT