这是一个 MCP(模型上下文协议)服务器,专为与 Daft.ie 交互而设计,主要用于通过网页抓取搜索租赁房产信息。
本项目可帮助你通过网页抓取的方式,基于 Daft.ie 搜索租赁房产信息。以下是快速启动项目的步骤:
⚠️ 重要提示
此工具依赖 Daft.ie 官方 API(v3),需要 API 密钥。如果没有有效的密钥(通过
DAFT_API_KEY环境变量设置),该工具可能会失败。有关更多详细信息和 Daft.ie API 文档链接,请参考src/daftApi.ts。
git clone [YOUR_GITHUB_REPO_URL]
cd daft-ie-mcp
npm install
npm run build
npm test
以监视模式运行测试:
npm run test:watch
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json):{
"mcpServers": {
"daft-ie-mcp": {
"command": "node",
"args": ["~/daft-ie-mcp/build/index.js"],
"env": {},
"disabled": false,
"alwaysAllow": []
}
}
}
MCP 服务器配置并运行后,你可以使用以下工具:
use_mcp_tool,其中 server_name 为 "daft-ie-mcp",tool_name 为 "search_rental_properties"use_mcp_tool,其中 server_name 为 "daft-ie-mcp",tool_name 为 "get_rental_property_details"示例:搜索都柏林的租赁房产
<use_mcp_tool>
<server_name>daft-ie-mcpserver_name>
<tool_name>search_rental_propertiestool_name>
<arguments>
{
"location": "Dublin",
"min_price": 1000,
"max_price": 2000,
"num_beds": 2
}
arguments>
use_mcp_tool>
示例:获取特定房产的详细信息
<use_mcp_tool>
<server_name>daft-ie-mcpserver_name>
<tool_name>get_rental_property_detailstool_name>
<arguments>
{
"property_id": "1234567"
}
arguments>
use_mcp_tool>