这是一个用于Stay AI物业管理API的模型上下文协议(MCP)服务器。它借助标准化工具和资源,让AI模型能够与该API实现交互,为物业管理提供了便捷、高效的解决方案。
npm install
.env文件:STAY_AI_API_KEY=your_api_key_here
启动服务器:
npm run dev
使用MCP Inspector测试服务器:
npm run inspect
这将打开一个网络界面,您可以在其中:
npm install
.env文件:STAY_AI_API_KEY=your_api_key_here
以下是一些使用服务器工具的示例代码:
// 搜索物业
const { search_properties } = require('./path/to/mcp-server');
const properties = search_properties({ filter: 'your_filter_here' });
console.log(properties);
// 获取特定物业的详细信息
const { get_property_details } = require('./path/to/mcp-server');
const propertyDetails = get_property_details('property_id_here');
console.log(propertyDetails);
// 创建新的预订
const { create_booking } = require('./path/to/mcp-server');
const newBooking = create_booking({
propertyId: 'property_id_here',
customerId: 'customer_id_here',
startDate: 'start_date_here',
endDate: 'end_date_here'
});
console.log(newBooking);
// 更新现有预订
const { update_booking } = require('./path/to/mcp-server');
const updatedBooking = update_booking('booking_id_here', {
startDate: 'new_start_date_here',
endDate: 'new_end_date_here'
});
console.log(updatedBooking);
search_properties:使用各种过滤器搜索物业get_property_details:获取特定物业的详细信息create_booking:为某个物业创建新的预订get_booking:获取特定预订的详细信息update_booking:更新现有预订cancel_booking:取消现有预订check_availability:检查物业在特定日期是否可用calculate_price:计算停留的价格create_customer:创建新的客户档案get_customer:获取特定客户的详细信息property://{id}:获取某个物业的详细信息booking://{id}:获取某个预订的详细信息本项目采用MIT许可证。