MarkTechPost@AI 05月03日 13:45
Implementing An Airbnb and Excel MCP Server
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本教程指导用户构建一个整合Airbnb和Excel的MCP服务器,并将其与Cursor IDE连接。通过自然语言,用户可以获取特定日期和地点的Airbnb房源信息,并自动存储到Excel文件中。教程详细介绍了安装依赖项、配置mcp.json文件、运行MCP服务器以及在Cursor IDE中使用该设置的步骤。最终,用户可以通过简单的自然语言指令,例如“获取班加罗尔6月第一周的Airbnb房源并添加到Excel表格中”,实现数据获取和分析。

💻 **安装依赖:** 搭建MCP服务器需要安装Node.js、uv包管理器、Git和Cursor IDE。Node.js用于运行Airbnb MCP服务器,uv包管理器用于安装依赖,Git用于克隆Excel MCP服务器存储库,Cursor IDE则用于连接MCP服务器并使用自然语言生成代码。

⚙️ **配置mcp.json文件:** 在Cursor IDE中,用户需要配置mcp.json文件,添加Airbnb和Excel服务器的配置信息。Airbnb服务器使用npx命令运行,而Excel服务器则通过指定URL连接到本地8000端口的SSE服务。

🚀 **运行MCP服务器:** Excel MCP服务器是一个基于SSE的服务器,需要在终端中运行。用户需要在excel-mcp-server目录下运行uv run excel-mcp-server命令来启动服务器,确保Cursor IDE能够与之交互。

💬 **在Cursor中使用:** 启动服务器后,用户可以在Cursor IDE的聊天面板中使用自然语言与服务器交互,例如请求特定日期和地点的Airbnb房源信息,并将其添加到Excel表格中。

💡 **解决问题:** 如果Airbnb服务器无法正确获取房源信息,可能是因为受到网站限制。用户可以在自然语言提示中添加“ignoreRobotsText”: true参数,以绕过这些限制。

In this tutorial, we’ll build an MCP server that integrates Airbnb and Excel, and connect it with Cursor IDE. Using natural language, you’ll be able to fetch Airbnb listings for a specific date range and location, and automatically store them in an Excel file.

Step 1: Installing the dependencies

To run the Airbnb MCP server and connect it to Excel, we’ll need to install a few tools: Node.js, uv package manager, Git, and Cursor IDE, since Claude desktop does not support SSE-based MCP servers.

Node JS

We need npx to run the Airbnb MCP server, which comes with Node.js.

UV package manager

To install the uv package manager, use the following commands based on your operating system:

For Mac/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

For windows (Powershell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Git

Git is required to clone the Excel MCP server repository.

Download Git from https://git-scm.com/downloads and complete the installation.

Open your terminal, navigate to your desired directory, and run:

git clone https://github.com/haris-musa/excel-mcp-server.gitcd excel-mcp-server

If you prefer not to use Git, you can download the repository manually:Go to https://github.com/haris-musa/excel-mcp-server, click the “Code” button, and choose “Download ZIP”. Once downloaded, extract the folder to your working directory.

Cursor IDE

Cursor is an AI-powered development environment built on top of VS Code, and it will help us connect to the MCP servers and generate code using natural language prompts.

Python dependencies

Once you are in the excel-mcp-server directory (the one you cloned using git or downloaded), run the following command

Step 2: Configuring mcp.json file

    Open Cursor IDE.Go to the menu and navigate to: File > Preferences > Cursor Settings > MCPClick on “Add a new global MCP server.”This will open the mcp.json configuration file. Paste the following code there:
{    "mcpServers": {      "airbnb": {        "command": "npx",        "args": [          "-y",          "@openbnb/mcp-server-airbnb",          "--ignore-robots-txt"        ]      },      "excel": {        "url": "http://localhost:8000/sse"      }    }}

Step 3: Running the MCP Servers

The Excel MCP server is an SSE-based (Server-Sent Events) server, which means it needs to be running in your terminal for Cursor IDE to interact with it. If the server is stopped or the terminal is closed, the connection will no longer work.

To start the server:

Once running, both the servers should be visible in Cursor settings:

Step 4: Using the Setup in Cursor

You can now use the chat panel in Cursor IDE to interact with the server using natural language. Simply ask for Airbnb listings for a specific date range and location, and request the data to be pasted into Excel for your analysis.

For example:

“Get me Airbnb listings in Bengaluru for the first week of June and add them to an Excel sheet.”

Note:

All Excel files generated through the MCP server will be saved in the excel_files folder located inside the excel-mcp-server directory.

The Excel MCP server also supports running basic data analysis on the Excel file directly through chat prompts. However, we won’t be covering that part in this tutorial.

Troubleshooting

If the Airbnb server isn’t responding correctly or fails to fetch listings, the issue is likely related to the ignoreRobotsText setting.

To resolve this, simply include the following argument in your natural language prompt:

Example:

“Get Airbnb listings for Bengaluru from 5th May to 10th May for 2 adults. Use “ignoreRobotsText”: true.”

This allows the server to bypass website restrictions that might otherwise block automated access.


Don’t forget to follow us on Twitter and join our 90k+ ML SubReddit. For Promotion and Partnerships, please talk us.

[Register Now] miniCON Virtual Conference on AGENTIC AI: FREE REGISTRATION + Certificate of Attendance + 4 Hour Short Event (May 21, 9 am- 1 pm PST) + Hands on Workshop

The post Implementing An Airbnb and Excel MCP Server appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Airbnb Excel MCP服务器 Cursor IDE
相关文章