Provides an MCP server to search rental properties and fetch details using web scraping and the Daft API
Configuration
View docs{
"mcpServers": {
"amineremache-dafty-mcp": {
"command": "node",
"args": [
"~/dafty-mcp/build/index.js"
],
"env": {
"DAFT_API_KEY": "YOUR_API_KEY"
}
}
}
}You run a lightweight MCP server that lets you search rental listings and fetch property details through a streamlined MCP client workflow. It uses web scraping for searches and optionally the Daft.ie API for detailed property data when you provide an API key.
You interact with the MCP server using your MCP client. Start the server locally, then issue tool requests from your client to perform actions such as searching for rental properties or retrieving details for a specific listing. Use the server name that you configured and the tool names that correspond to the available capabilities. The two core tools you’ll use are search_rental_properties and get_rental_property_details. The search tool lets you filter by location, price range, number of bedrooms, and property type. The details tool retrieves more information for a given property when an identifier is provided.
Prerequisites You should have Node.js and npm installed on your system. If you plan to build and run the MCP server locally, ensure you have access to a shell where you can run commands.
Step 1. Clone the repository and enter the project directory.
Step 2. Install dependencies.
Step 3. Build the server.
Step 4. (Optional) Run tests to verify functionality.
Step 5. Configure your MCP client to connect to this server as described in the configuration section.
The MCP server supports a local run mode and is configured to be started from a runtime command. The following example shows how the MCP server is wired for local execution as a stdio MCP server. The command starts the server via Node.js using the built bundle.
{
"mcpServers": {
"dafty-mcp": {
"command": "node",
"args": ["~/dafty-mcp/build/index.js"],
"env": {},
"disabled": false,
"alwaysAllow": []
}
}
}Retrieving detailed property data for a specific listing uses the Daft.ie API (v3). You must provide a valid API key via the environment variable DAFT_API_KEY. Without a valid key, the details tool may fail. Treat API keys as sensitive credentials and store them securely.
If the search tool returns no results, verify your location and filter criteria, then retry with broader ranges. If the details tool fails with an API key error, check that the DAFT_API_KEY is correctly set in your environment and that the API key is active.
Example: How to search for rental properties in a city with a minimum of two bedrooms and a price range from 1000 to 2000.
You can run the MCP server locally and connect to it with an MCP client that supports tool invocation. Use the exact tool names provided by the server to perform searches and fetch details.
Search rental listings using location, price range, number of bedrooms, and property type. Returns matching listings.
Retrieve detailed information for a specific rental property by its ID. Requires a valid API key for the Daft.ie API.