Skip to main content
Glama
Gabriel-Maxsy

MCP Car Database

MCP 项目

这是一个已完成的项目,使用 MCP(模型上下文协议)协议进行客户端和服务器之间的通信。该项目包括创建一个 SQLite 数据库并实现一个查询该数据库的客户端。

文件夹结构

📁 mcp-车
│--📂 应用程序
│ │ │ 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文件并运行它以在“数据”文件夹中创建 SQLite 格式的数据库。该脚本将创建存储汽车数据所需的结构。

  2. 使用虚拟数据填充数据库

    • 访问utils文件夹。

    • 打开create_cars.py文件并运行它,用 100 条虚构的汽车记录填充数据库。此步骤是必要的,以便在运行系统之前在数据库中拥有数据。

  3. 运行客户端并查询数据

    • 填写完数据库后,转到client文件夹。

    • 运行client.py文件与系统交互。代理将允许您输入过滤器(例如品牌、型号、年份等)来在数据库中搜索汽车。

使用示例

运行客户端( client.py )时,系统将提示您输入搜索条件,例如:

  • 标记

  • 模型

  • 颜色

  • 最高价格

客户端将向服务器发送查询,服务器将搜索数据库并返回符合提供条件的汽车。

您可以随时输入**“exit”**来停止搜索。


贡献

请根据需要随意探索和修改项目。如果您有任何疑问或想要提出改进建议,请提交请求或联系我们。

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
    89,748
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    19
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    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.
    3
  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that enables SQL operations (SELECT, INSERT, UPDATE, DELETE) and table management through a standardized interface with SQLite databases.
    7
    72
    1
    ISC

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

Latest Blog Posts

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