Whatever message this page gives is out now! Go check it out!

Purpose of MCP and its role in ColdFusion

Last update:
May 18, 2026

Purpose of MCP

As AI systems evolve from simple chatbots to agents capable of complex tasks, they need a reliable way to access tools and data. The Model Context Protocol (MCP) is the protocol that AI agents (clients) use to communicate with external systems (servers) in a consistent, auditable way.
MCP standardizes:
  • Tool discovery and invocation: tools/list and tools/call
  • Prompt management: prompts/list and prompts/get
  • Resource access: resources/list and resources/read
  • Optional flows: Sampling, elicitation, logging, and roots

MCP in ColdFusion

ColdFusion supports MCP in two primary ways:
  1. Call MCP servers: Your ColdFusion application can act as an MCP client and call external or internal MCP servers using a structured client API.
  2. Expose an MCP server: Your ColdFusion business logic, prompts, and resources can be exposed as an MCP server that any MCP host can connect to.
Figure: ColdFusion as MCP client and server

Key components

MCP is built around three primary roles. ColdFusion can fulfill more than one of these roles.

MCP Host

The MCP Host is the outer application that orchestrates the conversation and user experience. It embeds an MCP client and typically an LLM (large language model).
Examples: Claude Desktop, Cursor, and ColdFusion web applications that maintain user sessions and call MCP tools as needed.
Responsibilities:
  • Manage the user interface and conversation flow
  • Decide when to call tools, fetch resources, or retrieve prompts
  • Forward sampling and elicitation requests to the appropriate handlers

MCP Client

The MCP Client is the protocol adapter that communicates with MCP servers over HTTP or STDIO. It translates between MCP JSON-RPC requests and responses and ColdFusion structures.
Entry point: MCPClient(configData) is the primary way to create MCP clients in ColdFusion.
Responsibilities:
  • Perform the initialization handshake with MCP servers
  • Expose CF-friendly methods such as listTools(), callTool(), listResources(), readResource(), listPrompts(), and getPrompt()
  • Optionally handle sampling, elicitation, and logging callbacks

MCP Server

The MCP Server is the provider of capabilities. A server may wrap external APIs, a file system, or ColdFusion CFCs. It receives MCP methods such as tools/list, tools/call, prompts/get, and returns standardized responses.
Entry point: MCPServer(configData) creates an MCP server in ColdFusion.
Responsibilities:
  • Expose tools (CFC methods), prompts, and resources
  • Execute tool calls and return structured results
  • Serve resources and prompt templates to clients
Figure: MCP components interaction

Client versus server in ColdFusion

In ColdFusion, the distinction between client and server is straightforward.

Use the MCP client

Use the MCP Client when your ColdFusion application needs to call external MCP servers.
Examples of external servers:
  • Jira MCP
  • Wiki MCP
  • ColdFusion-based MCP servers
  • Other third-party MCP servers
Typical flow:
  1. Create an MCPClient with transport configuration (HTTP or STDIO).
  2. Call listTools() to discover available tools.
  3. Call callTool() to invoke tools as needed.
  4. Optionally use listResources(), readResource(), listPrompts(), and getPrompt().

Use the MCP server

Use the MCP Server when your ColdFusion application should act as an MCP server so that agents and tools can invoke your ColdFusion logic and access your data.
Typical flow:
  1. Create an MCPServer with serverInfo, capabilities, and tool/prompt/resource definitions.
  2. Register CFCs as tools, define prompts, and configure resources.
  3. Expose an HTTP endpoint that delegates to application.mcpServer.handleRequest().
  4. External MCP clients (including other ColdFusion apps) connect to your server.

Use both

Many teams use both approaches: they integrate existing MCP servers on the client side and expose their own ColdFusion capabilities via MCP on the server side.
Figure: Client vs server decision

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page