MCP Car Database

Integrations

  • Provides database functionality for storing and retrieving data about cars, enabling querying of the vehicle information stored in an SQLite database through the MCP protocol.

MCP Project

This is a finished project that uses the MCP (Model Context Protocol) protocol for communication between client and server. The project includes creating an SQLite database and implementing a client that queries that database.

Folder structure

📁 mcp-car
│-- 📂 app
│ ├── server.py # MCP server file
│ ├── database.py # Script responsible for creating the database
│-- 📂 client
│ ├── client.py # Main client code where interaction occurs
│-- 📂 useful
│ ├── create_cars.py # Generates dummy data for the database
│-- README.md # Project documentation

How to rotate the project

  1. Create and configure the virtual environment
    • To ensure that all project dependencies are installed correctly, it is recommended to create a virtual environment.
    • At the root of your project, run the following command to create a virtual environment:python -m venv venvRight away:.\venv\Scripts\activateSo to download the dependencies:pip install -r requirements.txt
    • This will install all the libraries the project needs to work properly.

Now you can proceed with the rest of the project configuration, with the virtual environment ready for use.

  1. Create the database
    • Navigate to the app folder.
    • Open the database.py file and run it to create the database in SQLite format inside your "data" folder. This script will create the necessary structure to store the car data.
  2. Populate the database with dummy data
    • Access the utils folder.
    • Open the create_cars.py file and run it to populate the database with 100 fictitious car records. This step is necessary to have data in the database before running the system.
  3. Run the client and query the data
    • With the database filled in, go to the client folder.
    • Run the client.py file to interact with the system. The agent will allow you to enter filters (such as make, model, year, etc.) to search for cars in the database.

Usage example

When running the client ( client.py ), you will be prompted for search criteria, such as:

  • Mark
  • Model
  • Year
  • Color
  • Maximum price

The client will send the query to the server, which will search the database and return the cars that meet the provided criteria.

You can stop searching by typing "exit" at any time.


Contributions

Feel free to explore and modify the project as needed. If you have any questions or would like to suggest improvements, please submit a pull request or contact us.

-
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.

A client-server system using Model Context Protocol that allows users to query an SQLite database of fictitious car data.

  1. Folder structure
    1. How to rotate the project
      1. Usage example
        1. Contributions

          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 -
            TypeScript
            • 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

          ID: yxo3571cyo