Function Calling Comparison
Createdandrelandgraf
Illustrates the differences between LLM function calling and the Model Context Protocol (MCP) by controlling Home Assistant lights.
About
This repository provides a practical comparison between LLM function calling and the Model Context Protocol (MCP). Through examples, including a CLI app leveraging OpenAI's function calling and a Node.js MCP server, it showcases how MCP builds upon function calling to facilitate external service communication and command execution. The repository focuses on controlling Home Assistant lights, demonstrating the distinct approaches of local function execution versus standardized protocol-based interaction with third-party services.
Key Features
- Offers a clear comparison between function calling and MCP.
- Provides a Node.js MCP server for exposing functions to LLMs.
- Demonstrates OpenAI function calling for Home Assistant control.
- 3 GitHub stars
- Includes a Home Assistant WebSocket API client.
- Provides setup instructions for the MCP server.
Use Cases
- Integrating LLMs with Home Assistant using function calling or MCP.
- Building MCP-compatible servers for external services.
- Understanding the benefits of MCP over function calling.