Used for version control and distribution of the MCP server code, with instructions for cloning the repository.
Hosts the repository for the MCP server, with instructions for cloning from GitHub provided in the installation section.
Provides comprehensive testing capabilities for the MCP server, including unit tests, integration tests, and coverage reporting.
The server is built with Python, with examples showing how to install dependencies and run the server using Python commands.
Real Estate MCP Server
A comprehensive Model Context Protocol (MCP) server for real estate data management. This server provides tools, resources, and prompts for property listings, agent management, market analysis, client relationships, and area intelligence.
๐๏ธ Architecture
The server is built with a modular, componentized architecture for maintainability and scalability:
๐ Features
MCP Capabilities
30+ Tools: Comprehensive real estate operations
10 Resources: 5 static resources + 5 dynamic resource templates
11 Prompts: User-controlled analysis templates across 4 categories
SSE Transport: Web-compatible Server-Sent Events endpoint
Tool Categories
๐ Property Management (7 tools)
Search and filter properties by multiple criteria
Get property details and comprehensive insights
Area-based and agent-based property listings
Market context and comparable analysis
๐ฅ Agent Operations (6 tools)
Agent profiles and specializations
Performance dashboards and metrics
Client and property portfolio management
Sales tracking and analytics
๐ Market Analysis (7 tools)
Market overview and price analytics
Area-specific market performance
Investment opportunity analysis
Comparative area analysis
Transaction tracking
๐ค Client Management (3 tools)
Client profiles and preferences
Property matching algorithms
Budget and criteria-based recommendations
๐๏ธ Area Intelligence (9 tools)
Comprehensive area reports
Amenities and demographics
Schools, parks, shopping, healthcare data
City overview and area comparisons
โ๏ธ System Management (2 tools)
Data refresh and cache management
System statistics and summaries
Resources
Static Resources
realestate://all-properties: Complete property listingsrealestate://all-agents: Agent directoryrealestate://market-overview: Current market trendsrealestate://all-areas: Area informationrealestate://amenities: Complete amenities database
Dynamic Resource Templates
realestate://properties/area/{area}: Area-specific propertiesrealestate://agent/{agent_id}/dashboard: Agent performance dashboardrealestate://market/area/{area}: Area market analysisrealestate://property/{property_id}/insights: Property insightsrealestate://client/{client_id}/matches: Client property matches
Prompts (11 total)
Property Prompts (2 prompts)
Property Analysis: Comprehensive property evaluation and insights
Property Comparison: Side-by-side property comparison analysis
Client Prompts (3 prompts)
Client Matching: Personalized property recommendations
Client Consultation: Structured consultation framework
Client Feedback Analysis: Search strategy refinement
Market Prompts (3 prompts)
Market Reports: Comprehensive area market analysis
Investment Analysis: ROI and opportunity assessment
Comparative Market Analysis: Multi-area comparison
Agent Prompts (3 prompts)
Agent Performance: Performance dashboards and analysis
Agent Marketing Strategy: Business development and marketing
Agent Training Development: Skill enhancement and training plans
๐ฆ Installation
Quick Start (Recommended)
Manual Claude Desktop Configuration
If you prefer manual setup, edit your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Important:
Use absolute paths for both the Python executable and main.py
On Windows, use forward slashes (/) or double backslashes (\\) in the JSON
Point to your virtual environment's Python (
.venv/Scripts/python.exeon Windows,.venv/bin/pythonon macOS/Linux)Restart Claude Desktop completely after configuration
Running Locally (For Testing)
๐ MCP Inspector
To inspect and debug your MCP server during development:
This will launch the MCP Inspector interface, allowing you to:
Monitor MCP messages in real-time
Debug tool and resource calls
Inspect server responses
Test server functionality
๐ป Claude Desktop Integration
Quick Setup
Once your server is installed in Claude Desktop (see Installation above), you can immediately start using it:
Restart Claude Desktop after configuring the server
Look for the MCP indicator (๐จ hammer icon) in the bottom-right corner
Click the indicator to see available tools and resources
Start chatting - Claude can now access all your real estate data!
Example Prompts for Claude
Try these prompts to explore the real estate data:
"What properties are available in Downtown Riverside?"
"Show me properties between $500k and $1M"
"Give me agent Sarah Chen's performance dashboard"
"What's the current market overview?"
"Match properties for client CLI001"
"Tell me about schools in the Woodcrest area"
"Compare market conditions across all areas"
Configuration Details
Windows: Edit %APPDATA%\Claude\claude_desktop_config.json
macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
Important Notes:
Use absolute paths to your
main.pyfileAdjust the Python command if you're using a virtual environment
The server runs in STDIO mode by default (no port or URL needed)
๐ Server Transport Modes
This server supports two transport modes for different use cases:
STDIO Transport (Default - Recommended for Claude Desktop)
Best for: Claude Desktop, MCP Inspector, local development
Advantages:
โ Ultra-low latency (~1ms)
โ Simple configuration (no ports/URLs)
โ Automatic process management
โ Standard MCP ecosystem compatibility
Usage:
SSE Transport (For Remote/Web Access)
Best for: Remote access, web integration, team sharing, cloud deployment
Advantages:
โ Multiple simultaneous clients
โ Remote access over network
โ Web browser compatible
โ Real-time streaming updates
Usage:
SSE Connection Details (When Running in SSE Mode)
SSE Endpoint:
http://127.0.0.1:8000/sse(for establishing SSE connection)Message Endpoint:
http://127.0.0.1:8000/messages/(for posting MCP messages)Transport: SSE (Server-Sent Events)
Protocol: MCP (Model Context Protocol)
Web Client Example
๐ง Component Details
Core Components
utils.py - Data Management
RealEstateDataManager: Central data access classPropertyFilter: Search and filtering utilitiesJSON data loading and caching
Cross-referencing and relationship mapping
main.py - Server Entry Point
FastMCP server initialization
Component registration orchestration
SSE transport configuration
Startup logging and diagnostics
Tool Modules
Each tool module follows a consistent pattern:
Resource Modules
Resources are organized by domain for better maintainability:
Property Resources (property_resources.py)
Property listings and search results
Property insights and market context
Area-based property filtering
Agent Resources (agent_resources.py)
Agent profiles and directories
Performance dashboards and metrics
Market Resources (market_resources.py)
Market overview and trends
Area-specific market analysis
Client Resources (client_resources.py)
Client preference matching
Property recommendations
Location Resources (location_resources.py)
Area information and demographics
Amenities and local services
Each module follows a consistent pattern:
Prompt Templates
Prompts guide AI analysis:
๐ Data Structure
The server operates on comprehensive real estate data:
5 Properties: Victorian homes, contemporary, luxury, townhouses
3 Agents: Specialized real estate professionals
6 Clients: Buyers, sellers, investors with preferences
Multiple Sales: Recent transaction history
5 Areas: Downtown Riverside, Woodcrest, Canyon Crest, Arlington Heights, La Sierra
Amenities: Schools, parks, shopping, healthcare facilities
๐ Usage Examples
Using with Claude Desktop (STDIO Mode - Recommended)
After installing in Claude Desktop, simply chat with Claude:
User: "What properties are available in Downtown Riverside?"
Claude: Uses the
User: "Show me Sarah Chen's performance dashboard"
Claude: Reads the
User: "Find properties under $800k with 3+ bedrooms"
Claude: Uses the
Using with MCP Inspector (For Testing)
Then explore tools and resources through the inspector UI.
Using with SSE Transport (For Remote/Web Access)
For proper MCP client integration over HTTP, use the MCP protocol with the correct endpoints:
Using SSE Mode with Claude Desktop
If you want to run the server in SSE mode and connect from Claude Desktop (for remote scenarios):
Start server:
python main.py sseConfigure Claude Desktop with
mcp-remote:
๐งช Testing
The project includes a comprehensive test suite covering all components and functionality.
Test Structure
Test Categories
Unit Tests (tests/unit/)
Data Manager Tests: Core functionality of
RealEstateDataManagerFilter Tests: Property filtering logic and edge cases
Utility Functions: Helper functions and data validation
Integration Tests (tests/integration/)
Property Tools: Search, filter, insights, and area-based queries
Agent Tools: Profile management, performance dashboards
Market Tools: Market analysis and trend calculations
Client Tools: Client matching and preference algorithms
Area Tools: Area intelligence and amenities data
System Tools: Data refresh and system statistics
Resources: Static resources and dynamic templates
Prompts: Template generation and parameter handling (11 prompts across 4 categories)
Running Tests
Prerequisites
Quick Test Commands
Using the Test Runner Script
Test Features
Fixtures and Test Data
Isolated Test Environment: Each test uses temporary data directories
Mock Data: Consistent test data across all test cases
Shared Fixtures: Reusable test components in
conftest.pyData Manager Mocking: Isolated testing without file system dependencies
Coverage and Reporting
Code Coverage: Comprehensive coverage reporting with pytest-cov
HTML Reports: Visual coverage reports in
htmlcov/index.htmlMissing Lines: Identification of uncovered code paths
Branch Coverage: Logic branch testing
Test Configuration
pytest.ini: Centralized test configuration
Automatic Discovery: Tests auto-discovered by naming convention
Parallel Execution: Support for parallel test execution
Filtering: Warning filters for clean test output
Test Data Validation
The test suite validates:
โ All 30+ tools function correctly with mock and real data
โ Property filtering logic handles edge cases
โ Search functionality is case-insensitive and comprehensive
โ Agent performance calculations are accurate
โ Market analysis tools process data correctly
โ Client matching algorithms work as expected
โ Area intelligence aggregates data properly
โ Resource endpoints return valid JSON
โ Prompt templates generate proper instructions
โ Error handling for missing or invalid data
โ Data refresh and caching mechanisms
โ System statistics and summaries
Continuous Integration
For CI/CD pipelines, use:
Writing New Tests
When adding new functionality:
Unit Tests: Add to
tests/unit/for core logicIntegration Tests: Add to appropriate
tests/integration/test_*.pyUse Fixtures: Leverage existing fixtures in
conftest.pyMock External Dependencies: Use
unittest.mockfor isolationTest Edge Cases: Include boundary conditions and error scenarios
Follow Naming Convention:
test_*.pyfiles,Test*classes,test_*methods
๐ ๏ธ Development
Adding New Tools
Choose appropriate category in
tools/Add tool function with
@mcp.tool()decoratorRegister in the category's
register_*_tools()functionImport and call registration in
main.pyAdd Tests: Create corresponding tests in
tests/integration/
Adding New Resources
Choose appropriate domain module in
resources/(property, agent, market, client, location)Add resource function with
@mcp.resource()decorator and URI patternRegister in the domain's
register_*_resources()functionImport and call registration in
main.pyAdd Tests: Include resource tests in
tests/integration/test_resources.py
Adding New Prompts
Choose appropriate category in
prompts/(property, client, market, or agent)Add prompt function with
@mcp.prompt()decoratorInclude parameter defaults and comprehensive instructions
Register in the category's
register_*_prompts()functionAdd Tests: Include prompt tests in
tests/integration/test_prompts.py
Adding New Prompt Categories
Create new file in
prompts/directory (e.g.,prompts/new_category_prompts.py)Follow the existing pattern with
register_new_category_prompts(mcp)functionImport and register in
prompts/__init__.pyAdd Tests: Create corresponding test fixtures and test methods
๐ฏ Transport Selection Guide
Choose the right transport mode for your use case:
Feature | STDIO (Default) | SSE (Remote) |
Best For | Claude Desktop, local tools | Web apps, remote access, team sharing |
Latency | ~1ms (ultra-fast) | 10-100ms (network-dependent) |
Multiple Clients | โ Single client | โ Multiple simultaneous clients |
Remote Access | โ Local only | โ Network access |
Setup Complexity | โ Simple (no config) | โ ๏ธ Requires port/URL management |
Claude Desktop | โ Native support | โ ๏ธ Requires mcp-remote proxy |
Auto-cleanup | โ Automatic | โ ๏ธ Manual management |
Security | โ Process isolation | โ ๏ธ Needs authentication |
Quick Decision Matrix
Use STDIO when:
Installing in Claude Desktop (recommended)
Running on the same machine as the client
You want the fastest response times
You need simple setup with no configuration
Use SSE when:
Deploying to a remote server or cloud
Multiple team members need access
Building web applications
You need real-time streaming updates
๐ Publishing to Repository
Recommended Approach
The server is designed to work best with STDIO transport for the MCP ecosystem, making it:
โ Easy to install:
mcp install main.pyโ Compatible with Claude Desktop: Standard integration
โ Discoverable: Can be listed in MCP server directories
โ Simple to use: No port configuration needed
โ Flexible: SSE mode available for advanced use cases
For End Users
Primary use case (98% of users):
Advanced use case (remote deployment):
๐ License
This project is licensed under the MIT License.
๐ค Contributing
Fork the repository
Create a feature branch
Add your component following the established patterns
Test thoroughly
Submit a pull request
๐ Further Reading
For a comprehensive deep dive into the architecture, design principles, and real-world applications of this MCP server, read the detailed blog post:
๐ MCP Servers - Model Context Protocol Implementation
The blog post covers:
Understanding MCP Servers and their business impact
Architecture deep dive with code examples
MCP Tools, Prompts, and Resources explained
Real-world usage scenarios and implementation patterns
Security considerations and best practices
Future implications of MCP technology
Built with the Model Context Protocol (MCP) for seamless AI integration
This server cannot be installed
Related Resources
Related MCP Servers
- -securityAlicense-qualityA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.Last updated -111MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides real-time access to Zillow real estate data, enabling property search, detailed information retrieval, Zestimates, market trends analysis, and mortgage calculations.Last updated -5MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides access to property data, address verification, skip tracing, geocoding, and advanced property search capabilities through BatchData.io's APIs.Last updated -21TypeScriptMIT License
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server providing access to 70+ IT tools for developers and system administrators, including encoding/decoding, text manipulation, hashing, and network utilities.Last updated -768914TypeScriptMIT License