Skip to main content
Glama
Gabriel-Maxsy

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」**と入力するといつでも検索を停止できます。


貢献

必要に応じて、自由にプロジェクトを調べて変更してください。ご質問がある場合や改善を提案したい場合は、プルリクエストを送信するか、お問い合わせください。

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