plp-mcpserver

plp-mcpserver

3.3

PhoneLCDParts MCP Server provides a tool to scrape product search results from phonelcdparts.com.

The PhoneLCDParts MCP Server is designed to facilitate automated product information retrieval from the phonelcdparts.com website. It leverages the Model Context Protocol (MCP) to allow clients, such as LLM agents, to query the site for product details based on search terms. The server returns structured JSON data, including product names, prices, direct URLs, and image URLs. This functionality is particularly useful for applications like price tracking, data analysis, or integration into larger AI-driven workflows. The server requires Python 3.12 or higher, the 'uv' tool for environment management, and a valid Firecrawl API key. It can be run using Python directly, Uvicorn for development, or an installed script, and is accessible via MCP-compatible clients.

Features

  • Automated product information retrieval from phonelcdparts.com.
  • Returns structured JSON data with product details.
  • Compatible with MCP clients for seamless integration.
  • Supports Python 3.12 or higher and uses 'uv' for environment management.
  • Requires a Firecrawl API key for operation.

MCP Tools

  • {'scrape_phonelcdparts': 'Scrapes product information (name, price, URL, image URL) from phonelcdparts.com for a given search query.'}

Usage with Different Platforms

python

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())