Skip to main content
Glama

MCP Car Database

MCP 프로젝트

이는 클라이언트와 서버 간 통신에 MCP(Model Context Protocol) 프로토콜을 사용하는 완성된 프로젝트입니다. 이 프로젝트에는 SQLite 데이터베이스를 만들고 해당 데이터베이스를 쿼리하는 클라이언트를 구현하는 작업이 포함됩니다.

폴더 구조

📁 mcp-car
│-- 📂 앱
│ ├── server.py # MCP 서버 파일
│ ├── database.py # 데이터베이스 생성을 담당하는 스크립트
│-- 📂 클라이언트
│ ├── client.py # 상호작용이 발생하는 메인 클라이언트 코드
│-- 📂 유용해요
│ ├── create_cars.py # 데이터베이스에 대한 더미 데이터를 생성합니다
│-- README.md # 프로젝트 문서

프로젝트를 회전하는 방법

  1. 가상 환경 생성 및 구성
    • 모든 프로젝트 종속성이 올바르게 설치되었는지 확인하려면 가상 환경을 만드는 것이 좋습니다.
    • 프로젝트의 루트에서 다음 명령을 실행하여 가상 환경을 만듭니다.python -m venv venv곧:.\venv\Scripts\activate종속성을 다운로드하려면 다음을 수행하세요.pip install -r requirements.txt
    • 이렇게 하면 프로젝트가 제대로 작동하는 데 필요한 모든 라이브러리가 설치됩니다.

이제 가상 환경을 사용할 준비가 되었으므로 나머지 프로젝트 구성을 진행할 수 있습니다.

  1. 데이터베이스 생성
    • app 폴더로 이동합니다.
    • database.py 파일을 열고 실행하여 "data" 폴더 내부에 SQLite 형식의 데이터베이스를 생성합니다. 이 스크립트는 자동차 데이터를 저장하는 데 필요한 구조를 생성합니다.
  2. 더미 데이터로 데이터베이스 채우기
    • utils 폴더에 접근합니다.
    • create_cars.py 파일을 열고 실행하여 100개의 가상 자동차 레코드로 데이터베이스를 채웁니다. 이 단계는 시스템을 실행하기 전에 데이터베이스에 데이터를 넣는 데 필요합니다.
  3. 클라이언트를 실행하고 데이터를 쿼리합니다.
    • 데이터베이스가 채워지면 client 폴더로 이동합니다.
    • client.py 파일을 실행하여 시스템과 상호작용합니다. 상담원은 필터(제조사, 모델, 연식 등)를 입력하여 데이터베이스에서 자동차를 검색할 수 있도록 해줍니다.

사용 예

클라이언트( client.py )를 실행하면 다음과 같은 검색 기준을 입력하라는 메시지가 표시됩니다.

  • 표시
  • 모델
  • 년도
  • 색상
  • 최대 가격

클라이언트가 서버에 쿼리를 보내면 서버는 데이터베이스를 검색하여 제공된 기준을 충족하는 자동차를 반환합니다.

언제든지 "exit"를 입력하여 검색을 중단할 수 있습니다.


기여

필요에 따라 프로젝트를 자유롭게 탐색하고 수정하세요. 질문이 있거나 개선 사항을 제안하고 싶으시다면 풀 리퀘스트를 제출하거나 저희에게 연락해 주세요.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

사용자가 가상 자동차 데이터의 SQLite 데이터베이스를 쿼리할 수 있도록 하는 모델 컨텍스트 프로토콜을 사용하는 클라이언트-서버 시스템입니다.

  1. 폴더 구조
    1. 프로젝트를 회전하는 방법
      1. 사용 예
        1. 기여

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides database interaction capabilities through SQLite, enabling users to run SQL queries, analyze business data, and automatically generate business insight memos.
            Last updated -
            6
            9
            TypeScript
            MIT License
            • Apple
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.
            Last updated -
            Python
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
            Last updated -
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables SQL operations (SELECT, INSERT, UPDATE, DELETE) and table management through a standardized interface with SQLite databases.
            Last updated -
            JavaScript

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gabriel-Maxsy/MCP-Car'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server