Skip to main content
Glama

PhoneLCDParts MCP Server

by cnguyen14

PhoneLCDParts MCP サーバー

このプロジェクトは、 phonelcdparts.comから製品検索結果をスクレイピングするツールを備えた Model Context Protocol (MCP) サーバーを提供します。

目的

主なツールでscrape_phonelcdparts 、MCP 対応クライアント(LLM エージェントなど)が検索語に基づいてphonelcdparts.comウェブサイトに商品情報を送信できるようにします。このツールは、商品名、価格、直接 URL、画像 URL を含む構造化 JSON データを返します。

これにより、価格追跡、データ分析、より大規模な AI 駆動型ワークフローへの統合など、さまざまなアプリケーションで製品情報の自動取得が可能になります。

前提条件

  • Python 3.12 以上。
  • uv (環境とパッケージ管理用)。
  • 有効な Firecrawl API キー ( firecrawl.devから)。

設定

  1. リポジトリをクローンするか(該当する場合)、プロジェクト ディレクトリに移動します。
    cd path/to/phonelcdpart-mcp
  2. uvを使用して仮想環境を作成し、アクティブ化します。
    uv venv source .venv/bin/activate
  3. Firecrawl APIキーの設定: phonelcdpart-mcpプロジェクトのルートディレクトリに.envという名前のファイル(例: phonelcdpart-mcp/.env )を作成します。このファイルにFirecrawl APIキーを追加します。
    FIRECRAWL_API_KEY="YOUR_ACTUAL_FIRECRAWL_API_KEY_HERE"
    アプリケーションはpython-dotenvライブラリを使用して、実行時にこのキーを読み込みます。
  4. uvを使用して依存関係をインストールします。
    uv pip install .
    これにより、 python-dotenvを含む、 pyproject.tomlにリストされているすべての依存関係がインストールされます。

MCPサーバーの実行

サーバーを実行するにはいくつかのオプションがあります。

  1. Python を直接使用する(簡単な開発の場合):
    python app.py
  2. Uvicorn の使用 (開発に推奨、自動リロードを提供): uvicornがインストールされていることを確認します ( pyproject.tomlにあります)。
    uvicorn app:mcp --reload --host 0.0.0.0 --port 8000
    ( app:mcp``app.pyファイル内のFastMCPmcpインスタンスを参照します。)
  3. インストールされたスクリプトを使用する ( uv pip install .が成功した場合): uv pip install .が成功すると、 pyproject.tomlで定義されたスクリプトが使用できるようになります。
    start-mcp
    これは通常、 mcp.run()メソッドを使用します。

サーバーは通常、 http://127.0.0.1:8000またはhttp://0.0.0.0:8000で起動します。

ツールの使用

サーバーが実行される場合は、MCP 互換のクライアントを使用してサーバーと対話できます。

  • ツール名: scrape_phonelcdparts
  • **説明 (docstring から):**指定された検索クエリに対して、 phonelcdparts.comから製品情報 (名前、価格、URL、画像 URL) を取得します。
  • 口論:
    • search_query (文字列): 製品の検索用語 (例: 「iphone 15 pro max lcd」)。
  • **戻り値:**辞書のリスト。各辞書には次のものが含まれます。
    • name (文字列)
    • price (文字列)
    • url (文字列)
    • image_url (文字列)

呼び出し例 (概念的、Python クライアントを使用):

# (This is a conceptual example of how a client might call the tool) # import asyncio # from fastmcp import Client # # async def main(): # # Ensure the server_url matches where your MCP server is running # server_url = "http://127.0.0.1:8000/sse" # async with Client(server_url) as client: # try: # result = await client.call_tool( # "scrape_phonelcdparts", # {"search_query": "iphone 14 screen"} # ) # if result and result.data: # print("Tool Result:") # for item in result.data: # print(item) # else: # print("No data returned or tool call failed.") # except Exception as e: # print(f"Error calling tool: {e}") # # if __name__ == "__main__": # asyncio.run(main())

このクライアント コードは、実行中の MCP サーバーに接続し、指定された検索クエリを使用してscrape_phonelcdpartsツールを呼び出して、構造化された JSON 結果を出力します。

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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

任意の検索クエリに対して phonelcdparts.com から製品情報 (名前、価格、URL、画像) を取得する Web スクレイピング サーバー。

  1. 目的
    1. 前提条件
      1. 設定
        1. MCPサーバーの実行
          1. ツールの使用

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              A server that provides tools to scrape websites and extract structured data from them using Firecrawl's APIs, supporting both basic website scraping in multiple formats and custom schema-based data extraction.
              Last updated -
              2
              1
              JavaScript
            • -
              security
              A
              license
              -
              quality
              This MCP scraps vinted for product info. Disclaimer: This script is designed for educational purposes only. It is intended to demonstrate web scraping techniques and should not be used for any commercial or personal gain. Please note that using this software may violate the terms of service of Vint
              Last updated -
              106
              Python
              GPL 3.0
            • -
              security
              A
              license
              -
              quality
              A server that assists users in finding electronic components compatible with JLCPCB PCBA services through a searchable interface with filtering capabilities.
              Last updated -
              Python
              GPL 3.0
            • -
              security
              F
              license
              -
              quality
              An MCP server that retrieves product data from the DummyJSON API, supporting filtering by various parameters like ID, title, category, brand, price and rating.
              Last updated -
              2
              TypeScript
              • Linux
              • Apple

            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/cnguyen14/plp-mcpserver'

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