Real Estate MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Real Estate MCP Server
An MCP (Model Context Protocol) server that enables AI agents to search, retrieve, and generate content for real estate listings.
https://github.com/user-attachments/assets/94df4c91-ac30-44c3-a95c-adae11573cfc
Features
3 MCP Tools: Search properties, get details, generate listing content
MCP Resource: Daily digest of new listings (
realestate://listings/today)MCP Prompt: Marketing email generator (
marketing-email)Bearer Token Authentication: Secure API access
PostgreSQL Backend: Efficient range queries, JSONB support
Async Architecture: Non-blocking I/O throughout
Related MCP server: Scalogy Real Estate Deals MCP Server
Why This Stack?
Choice | Rationale |
PostgreSQL | Efficient range queries on price ( |
Official MCP SDK | Spec-compliant, native resources/prompts, active maintenance by Anthropic |
uv | 10-100x faster than pip, reliable lockfiles, modern Python packaging |
FastMCP + FastAPI | Decorator-based tools, SSE transport, familiar async patterns |
Quick Start
Try the Live Demo (Fastest)
npx -y @modelcontextprotocol/inspector \
--sse "https://real-estate-mcp-production.up.railway.app/mcp/sse" \
--header "Authorization: Bearer demo-token-12345"No setup needed! See Live Demo for more details.
Using Docker Compose (Recommended)
# Clone and start
git clone <repo>
cd real-estate-mcp
# Configure environment (required)
cp .env.example .env
# Edit .env with your own values (API_TOKEN, database credentials, etc.)
# Start everything (db + seed + server)
docker-compose up -d
# Check health
curl http://localhost:8000/health
# Test with MCP Inspector
npx -y @modelcontextprotocol/inspector --config mcp-inspector.json --server real-estate-mcpThis single command starts PostgreSQL, seeds the database with sample data, and launches the MCP server.
⚠️ Important: Never commit
.envto version control. The.env.examplefile is a template with placeholder values.
Local Development
# Prerequisites: uv, Docker (for PostgreSQL)
# 1. Install uv (if not installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. Create environment
uv venv
source .venv/bin/activate
# 3. Install dependencies
uv sync --all-extras
# 4. Configure environment
cp .env.example .env
# Edit .env: set DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/realestate
# 5. Start PostgreSQL only
docker-compose up -d db
# 6. Seed database
uv run python -m src.db.seed
# 7. Run server
uv run uvicorn src.main:app --reload --port 8000
# 8. Lint/Format
uv run ruff check . --fix
uv run ruff format .
# 9. Run tests
uv run pytest -vAPI Authentication
All MCP endpoints require a Bearer token:
# Demo token for testing
Authorization: Bearer demo-token-12345Available MCP Tools
Tool | Description | Arguments |
| Search with filters |
|
| Get full property data |
|
| Generate SEO HTML |
|
Example Tool Calls
// Search for apartments in Lisbon under €700k
{
"name": "search_properties",
"arguments": {
"city": "Lisbon",
"max_price": 700000,
"status": "available"
}
}
// Get property details
{
"name": "get_property_details",
"arguments": {
"property_id": "11111111-1111-1111-1111-111111111111"
}
}
// Generate listing content
{
"name": "generate_listing_content",
"arguments": {
"property_id": "11111111-1111-1111-1111-111111111111",
"target_language": "en",
"tone": "luxury"
}
}Available MCP Resources
Resource URI | Description |
| Daily digest of new listings (last 24h) |
Available MCP Prompts
Prompt | Description | Arguments |
| Generate property marketing email |
|
Testing with MCP Inspector
The MCP Inspector provides an interactive UI for testing:
Using Config File (Recommended)
# Run inspector with the included config
npx -y @modelcontextprotocol/inspector --config mcp-inspector.json --server real-estate-mcpThis will launch the inspector at http://localhost:6274 with authentication pre-configured.
Manual Connection
Alternatively, connect manually via SSE:
npx -y @modelcontextprotocol/inspector sse http://localhost:8000/mcp/sse \
--header "Authorization: Bearer demo-token-12345"CLI Mode for Scripting
Test tools programmatically:
# List all available tools
npx -y @modelcontextprotocol/inspector --cli \
--config mcp-inspector.json --server real-estate-mcp \
--method tools/list
# Search for properties in Lisbon
npx -y @modelcontextprotocol/inspector --cli \
--config mcp-inspector.json --server real-estate-mcp \
--method tools/call --tool-name search_properties \
--tool-arg city=Lisbon --tool-arg status=available
# Get property details
npx -y @modelcontextprotocol/inspector --cli \
--config mcp-inspector.json --server real-estate-mcp \
--method tools/call --tool-name get_property_details \
--tool-arg property_id=11111111-1111-1111-1111-111111111111The inspector displays:
All registered tools with their schemas
Available resources
Prompt templates
Interactive testing interface
Request/response history
Live Demo
A public instance is deployed on Railway for testing:
URL |
|
Token |
|
Try it Now
# Connect via MCP Inspector (no installation required)
npx -y @modelcontextprotocol/inspector \
--sse "https://real-estate-mcp-production.up.railway.app/mcp/sse" \
--header "Authorization: Bearer demo-token-12345"This opens an interactive UI at http://localhost:6274 where you can:
Browse all available tools, resources, and prompts
Execute tool calls and see responses
Test the full MCP protocol
Configure Your MCP Client
Add this to your MCP client configuration (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"real-estate": {
"type": "sse",
"url": "https://real-estate-mcp-production.up.railway.app/mcp/sse",
"headers": {
"Authorization": "Bearer demo-token-12345"
}
}
}
}No local setup required—just the URL and token!
Deploy Your Own Instance (Railway)
Push to GitHub
Connect repo to Railway
Add PostgreSQL plugin
Set environment variables in Railway Dashboard:
API_TOKEN: Your secret tokenDATABASE_URL: Auto-configured by Railway
Deploy!
Project Structure
real-estate-mcp/
├── src/
│ ├── main.py # FastAPI + FastMCP setup
│ ├── config.py # Type-safe settings
│ ├── mcp_server.py # MCP tools, resources, prompts
│ ├── auth.py # Bearer token middleware
│ ├── exceptions.py # Custom MCP-friendly errors
│ ├── services/ # Business logic layer
│ ├── repositories/ # Data access layer
│ ├── models/ # SQLAlchemy ORM models
│ ├── schemas/ # Pydantic schemas
│ └── db/ # Database session & seeding
├── templates/ # Jinja2 templates
├── tests/ # Unit tests
├── .env.example # Environment template (copy to .env)
├── mcp-inspector.json # MCP Inspector config (pre-configured auth)
├── Dockerfile # Multi-stage Docker build
├── docker-compose.yml # Full stack orchestration
├── railway.toml # Railway deployment config
└── pyproject.toml # Dependencies & toolingSample Properties
The database is seeded with 8 properties across:
Cities: Lisbon, Porto, Cascais, Estoril, Sintra
Types: Apartments, villas, penthouses, townhouses
Price Range: €195k - €1.25M
Status: Available and sold
Environment Variables
These variables are only needed if you're deploying/running the server yourself. If you're connecting to an existing deployment, you only need the server URL and Bearer token.
Variable | Description | Default |
| Application name | Real Estate MCP Server |
| Enable debug mode | false |
| Bearer token for auth | (required) |
| PostgreSQL connection URL | (required) |
| Database username | (for docker-compose) |
| Database password | (for docker-compose) |
| Database name | (for docker-compose) |
| Connection pool size | 5 |
| Max overflow connections | 10 |
License
MIT License - see LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Real estate agency CRM: listings, clients, leads and viewings from your AI assistant (OAuth).
AI-native real estate discovery with structured property search and market intelligence.
Live sale and rental listings from Zillow, Rightmove, Idealista and 15 more portals in one schema.
- Casafari MCPDeprecatedcom.casafari
Property data intelligence, built for AI agents: Europe's most complete property index.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceProvides AI assistants access to real-time MLS data via the Repliers API, enabling natural language property search, market statistics, and listing details.21MIT- AlicenseNot gradedqualityCmaintenanceEnables AI agents to find vetted, daily-scored US residential real-estate investment deals with pay-per-request via USDC on Base.5 npmMIT
- AlicenseAqualityBmaintenanceEnables searching Zillow for-sale, for-rent, and sold listings with rich filters and retrieving complete property details as structured JSON, with no Zillow account required.273 npm21 PyPI5MIT
- AlicenseAqualityBmaintenanceEnables users to search synthetic property listings, retrieve full listing records, and answer factual inquiries from the record while escalating viewings, negotiation, legal, complaints, personal-data, and other out-of-record requests to a human. The human hand-off creates a ticket with a fixed reason code and rejects unknown listing ids.3MIT