
philschmid/mcp-openai-gemini-llama-example
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
philschmid/mcp-openai-gemini-llama-example은 [[T0]에서 임입된 MCP 서버 후보입니다.
개요
philschmid/mcp-openai-gemini-llama-example은 [[T0]에서 임입된 MCP 서버 후보입니다.
개요(AI 번역)
이 저장소는 오픈 LLM(Meta Llama 3), OpenAI 또는 Google Gemini, SQLite 데이터베이스를 사용하여 모델 컨텍스트 프로토콜(MCP)을 사용해 AI 에이전트를 구축하는 기본 예시를 포함하고 있습니다. 이 저장소는 단순하고 교육적인 시연을 목적으로 설계되었으며, 본용 환경이 아닌 프레임워크입니다.
OpenAI 예시: https://github.com/jalr4ever/Tiny-OAI-MCP-Agent
준비
이 코드는 MCP 서버를 통해 SQLite 데이터베이스와 상호작용할 수 있는 간단한 CLI 에이전트를 설정합니다. 공식 SQLite MCP 서버를 사용하며 다음을 시연합니다:
- MCP 서버에 연결
- MCP 서버에서 도구와 자원을 로드하고 활용하기
- 도구를 LLM 호환 함수 호출로 변환하기
openaiSDK 또는google-genaiSDK를 사용하여 LLM과 상호작용하는 것.
사용하는 법
- Docker 설치 및 실행 중.
- Hugging Face 계정과 접근 토큰(Llama 3 모델 사용).
- Google API 키(Gemini 모델 사용).
설치
-
저장소 복제:
-
필요한 패키지 설치:
-
Hugging Face에 로그인하기
예시
라마 3
다음 명령을 실행하세요
에이전트는 인터랙티브 모드로 시작합니다. 데이터베이스와 상호작용하기 위해 프롬프트를 입력할 수 있습니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
How to use Anthropic MCP Server with open LLMs, OpenAI or Google Gemini
This repository contains a basic example of how to build an AI agent using the Model Context Protocol (MCP) with an open LLM (Meta Llama 3), OpenAI or Google Gemini, and a SQLite database. It’s designed to be a simple, educational demonstration, not a production-ready framework.
OpenAI example: https://github.com/jalr4ever/Tiny-OAI-MCP-Agent
Setup
This code sets up a simple CLI agent that can interact with a SQLite database through an MCP server. It uses the official SQLite MCP server and demonstrates:
- Connecting to an MCP server
- Loading and using tools and resources from the MCP server
- Converting tools into LLM-compatible function calls
- Interacting with an LLM using the
openaiSDK orgoogle-genaiSDK.
How to use it
- Docker installed and running.
- Hugging Face account and an access token (for using the Llama 3 model).
- Google API key (for using the Gemini model).
Installation
-
Clone the repository:
git clone https://github.com/philschmid/mcp-openai-gemini-llama-example cd mcp-openai-gemini-llama-example -
Install the required packages:
pip install -r requirements.txt -
Log in to Hugging Face
huggingface-cli login --token YOUR_TOKEN
Examples
Llama 3
Run the following command
python sqlite_llama_mcp_agent.py
The agent will start in interactive mode. You can type in prompts to interact with the database. Type “quit”, “exit” or “q” to stop the agent.
Example conversation:
Enter your prompt (or 'quit' to exit): what tables are available?
Response: The available tables are: albums, artists, customers, employees, genres, invoice_items, invoices, media_types, playlists, playlist_track, tracks
Enter your prompt (or 'quit' to exit): how many artists are there
Response: There are 275 artists in the database.
Gemini
Run the following command
GOOGLE_API_KEY=YOUR_API_KEY python sqlite_gemini_mcp_agent.py
Future plans
I’m working on a toolkit to make implementing AI agents using MCP easier. Stay tuned for updates!
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →