PhoneLCDParts MCP Server

by cnguyen14
Integrations
  • Provides a tool for scraping product search results from phonelcdparts.com using Firecrawl and BeautifulSoup, retrieving product information including name, price, URL, and image for any search query.

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
              JavaScript
            • -
              security
              A
              license
              -
              quality
              Searching google, individual websites and scraping their content. Fast and cost-effective. ⚡️
              Last updated -
              16
              TypeScript
              MIT License
            • -
              security
              -
              license
              -
              quality
              Enables free web searching using Google search results with no API keys required, returning structured results with titles, URLs, and descriptions.
              Last updated -
              6
            • -
              security
              F
              license
              -
              quality
              Provides functionality to fetch and transform web content in various formats (HTML, JSON, plain text, and Markdown) through simple API calls.
              Last updated -
              125,855
              TypeScript

            View all related MCP servers

            ID: y8mxju85yt