Whatever message this page gives is out now! Go check it out!
<cfscript>
configData = {
transport: {
type: "http",
url: "http://localhost:8500/mcp/server.cfm"
},
clientInfo: {
name: "quickstart-client",
version: "1.0.0"
},
capabilities: {
tools: true,
prompts: true,
resources: true
},
initializationTimeout: 10,
requestTimeout: 30
};
mcpClient = MCPClient(configData);
</cfscript>
tools = mcpClient.listTools();
writeDump(tools);
result = mcpClient.callTool(
"get_weather",
{ location: "New York" }
);
writeDump(result);
configData = {
serverInfo: {
name: "My MCP Server",
version: "1.0.0"
},
capabilities: {
tools: true,
prompts: true,
resources: true
}
};
application.mcpServer = MCPServer(configData);
component displayname="weatherTools" {
remote struct function getWeather(required string city) {
return {
city: city,
forecast: "Sunny"
};
}
}
configData.tools = [
{ cfc: "weatherTools" }
];
application.mcpServer = MCPServer(configData);
application.mcpServer.handleRequest();