Color Name API Tool Server for AI Agents (MCP) - n8n Workflow

Deploy the Color Name API as a custom tool for your AI agents using this specialized n8n workflow template. Leverage the n8n MCP trigger for seamless API integration.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers and Engineers building custom GPTs or agents.
Users needing to integrate real-time external API data into their AI reasoning.
Technical users looking for advanced examples of the n8n MCP trigger node.
Automation Specialists seeking robust n8n templates for AI tool creation.

Overview

Leveraging the power of the n8n platform, this automation solves the critical challenge of making external APIs reliably accessible to Large Language Models (LLMs) and AI agents. The Color Name API provides names for colors based on their hex value, and this specific n8n workflow exposes four key endpoints as callable functions (Tools).

This robust n8n template uses the Model Communication Protocol (MCP) to define a standardized interface. When an AI agent needs to know a color's name or list available color names, it sends a structured request to the n8n trigger webhook. The workflow processes the request, intelligently extracts parameters using specialized AI expressions ($fromAI()), executes the appropriate API call using an n8n node, and returns the structured data directly to the AI model, enhancing the model's capabilities beyond its training data.

How it Works

The entire process is initiated by the specialized n8n trigger node designed for AI communication.


  1. AI Request: An AI Agent (e.g., built using OpenAI Assistants or LangChain) determines it needs to call a tool defined in this n8n workflow, such as retrieving a color's name from its hex code.

  2. MCP Trigger Activation: The request hits the Color Name API MCP Server n8n trigger. This MCP trigger parses the AI's structured call, identifying the specific tool (HTTP Request Tool) being requested and the required parameters.

  3. Parameter Extraction: Each HTTP Request Tool (n8n node) is configured with AI Expressions (like {{ $fromAI('color', '...', 'string') }}). These expressions automatically extract the necessary arguments (e.g., hex value, list name) provided by the AI agent in the MCP payload.

  4. External API Call: The corresponding httpRequestTool executes the request against the https://api.color.pizza/v1/ endpoint.

  5. Response Handling: The API response is captured by the n8n node and automatically packaged according to the Model Communication Protocol specification, allowing the structured result to be returned instantly to the calling AI agent for use in its reasoning and response generation.

Installation Guide

To deploy this powerful n8n workflow and start serving the Color Name API to your AI agents, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it into your n8n instance via the Workflows section (New -> Import from JSON).

  2. Review Credentials: This specific n8n template requires no external API credentials for the Color Name API, as it is a public resource.

  3. Activate and Deploy: Activate the n8n workflow. The Color Name API MCP Server n8n trigger node will generate a unique webhook URL.

  4. Connect AI Agent: Copy the generated webhook URL. Use this URL in your AI agent configuration (e.g., in your LangChain Tool definition or custom GPT action schema) as the endpoint for the Color Name tool server.

  5. Testing: The AI agent can now make structured requests, which will activate this n8n automation and return accurate color data.

Node Details

This n8n workflow relies on specialized nodes to facilitate AI communication and API connectivity:

Color Name API MCP Server (n8n trigger node):
Function: Acts as the central listener, defining the workflow as an MCP Tool Server. It receives structured requests from external AI agents.
Key Configuration: Path is set to /color-name-api-mcp.

Get all colors of the default color name list (n8n node - HTTP Request Tool):
Function: Retrieves information about colors, using an optional list or specific hex values.
Key Configuration: Uses AI Expressions such as ={{ $fromAI('values', 'The hex values...', 'string') }} to dynamically populate query parameters (list, values, noduplicates) based on the AI agent's request.

Get all colors of the default color name list 1 (n8n node - HTTP Request Tool):
Function: Targets the /lists/ endpoint to retrieve available color lists.
Key Configuration: Simple GET request; no AI parameters needed for this operation.

Get all colors of the default color name list 2 (n8n node - HTTP Request Tool):
Function: Targets the /names/ endpoint to retrieve a color based on its name.
Key Configuration: Requires the name parameter, extracted via ={{ $fromAI('name', 'The name of the color...', 'string') }}.

Generate a color swatch for any color (n8n node - HTTP Request Tool):
Function: Targets the /swatch/ endpoint to generate a color swatch.
* Key Configuration: Requires the color (hex value) parameter, extracted via ={{ $fromAI('color', 'The hex value...', 'string') }}.

Related n8n Workflows

Free

Nodes: 3 Nodes
Updated: December 26 2025
View all
Created by

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

Featured*