Create a new file anthropic_airbnb.py with the following code:
Copy
from praisonaiagents import Agent, MCPimport os# Get API key from environment variableanthropic_api_key = os.environ.get("ANTHROPIC_API_KEY")search_agent = Agent( instructions="""You help book apartments on Airbnb.""", llm="anthropic/claude-3-7-sonnet-20250219", tools=MCP( command="npx", args=["-y", "@openbnb/mcp-server-airbnb", "--ignore-robots-txt"], env={"ANTHROPIC_API_KEY": anthropic_api_key} ))search_agent.start("MUST USE airbnb_search Tool to Search. Search for Apartments in Paris for 2 nights. 04/28 - 04/30 for 2 adults. All Your Preference")
3
Install Dependencies
Make sure you have Node.js installed, as the MCP server requires it: