Whatever message this page gives is out now! Go check it out!
{
"mcpServers": {
"weather-server": {
"url": "http://localhost:8500/mcp/weather.cfm",
"disabled": false
},
"database-server": {
"url": "http://localhost:8500/mcp/database.cfm",
"disabled": false
},
"external-api": {
"url": "https://api.example.com/mcp",
"disabled": true
}
}
}
<cfscript>
configData = {
configFile: "/path/to/mcpServers.json",
clientInfo: {
name: "bulk-client",
version: "1.0.0"
},
capabilities: {
sampling: true,
roots: true
},
requestTimeout: 30
};
// Returns array of MCP clients (one per enabled server)
mcpClients = MCPClient(configData);
</cfscript>
<cfscript>
function samplingHandler(request) {
return {
modelname: "gpt-4o",
result: callOpenAI(request.messages)
};
}
function elicitationHandler(request) {
return {
action: "accept",
content: collectUserInput(request.message)
};
}
function loggingHandler(loggingMessage) {
writeLog(
type = loggingMessage.level,
text = loggingMessage.data
);
return "Logged";
}
configData = {
transport: {
type: "http",
url: "http://localhost:8500/mcp/server.cfm"
},
clientInfo: {
name: "my-ai-client",
version: "1.0.0"
},
capabilities: {
sampling: true,
roots: true,
elicitation: true
},
samplingConsumer: samplingHandler,
elicitationConsumer: elicitationHandler,
loggingConsumer: loggingHandler
};
mcpClient = MCPClient(configData);
// Use the client
tools = mcpClient.listTools();
result = mcpClient.callTool({
name: "get_weather",
arguments: { location: "New York" }
});
</cfscript>