This repository provides a basic example of constructing an AI agent leveraging the Model Context Protocol (MCP) in conjunction with open LLMs, specifically Meta Llama 3, OpenAI, and Google Gemini, along with a SQLite database. It serves as a straightforward, educational illustration focused on connecting to an MCP server, loading and utilizing tools and resources, transforming tools into LLM-compatible function calls, and interacting with an LLM via the `openai` or `google-genai` SDK. The code sets up a simple CLI agent to interact with a SQLite database through an MCP server.
Key Features
01Connects to an MCP server
02Loads and uses tools and resources from the MCP server
03Converts tools into LLM-compatible function calls
04Interacts with an LLM using the `openai` SDK or `google-genai` SDK
05Includes examples for Llama 3 and Gemini models
06145 GitHub stars