Whatever message this page gives is out now! Go check it out!
MCPServer(config) function creates and initializes a ColdFusion-based MCP server from a configuration struct. This server exposes CFML tools (CFC methods), prompts (templates), and resources (data like files or documents) via the Model Context Protocol (MCP) so that MCP clients (e.g., ColdFusion apps, Cursor, Claude Desktop) can call them using standard MCP methods like tools/list, tools/call, prompts/get, and resources/read.application.mcpServer) so it can serve JSON-RPC requests.initialize, tools/list, tools/call, prompts/list, resources/read, etc.).MCPServer(struct config)mcpServer = MCPServer(config);| Field | Data type | Required | Description |
|---|---|---|---|
serverInfo | Struct | Yes | Identifies the MCP server. |
serverInfo = {
name : "CCF_MCP_Server",
version : "1.0"
};
| |||
capabilities | Struct | Yes | Declares what the MCP server supports (tools, prompts, resources, logging, etc.). |
capabilities = {
tools : true,
prompts : true,
resources : true
};
| |||
tools | Array of structs | No | Lists the CFCs that implement MCP tools. Each entry describes a CF component that contains one or more public functions to be exposed as tools. |
tools = [
{ cfc : "mcp.tools.WeatherTools" },
{ cfc : "mcp.tools.HealthcareTools" }
];
| |||
prompts | Array of structs | No | Defines prompts that the server exposes for prompts/list and prompts/get. |
prompts = [
{
name : "generate_discharge_summary",
title : "Discharge Summary",
description : "Generate a patient discharge summary.",
arguments : [ { name : "patientName", required : true } ],
template : "Generate a detailed discharge summary for patient {patientName}."
}
];
| |||
resources | Array of structs | No | Defines resources the MCP server exposes via resources/list and resources/read. |
resources = [
{
uri : "healthcare://patientdata/P001/ct-scan",
name : "ct_scan",
title : "CT Scan - P001",
description : "Chest CT scan for patient P001",
mimeType : "application/pdf",
readResourceHandler = function(req) {
return fileReadBinary(expandPath("/data/ctscan-P001.pdf"));
}
}
];
| |||
cfcCaching | Boolean | No | Controls whether CFCs used for tools are cached for performance. |
cfcCaching = true
|