mcp-propertium-server
If you are the rightful owner of mcp-propertium-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP Propertium Server is a RestAPI + MCP server designed for handling OSM and Propertium data.
MCP Propertium Server
RestAPI + MCP server for OSM and Propertium data.
Features
- OpenAI integration for text processing and PDF analysis
- SQLAlchemy + Pydantic for database models and validation
- PostgreSQL with PostGIS for spatial data storage
- Planet Polygons API for geographic data
Getting Started
Prerequisites
- Docker and Docker Compose
- Python 3.12+
Installation
- Clone the repository
- Run with Docker Compose:
docker-compose up -d
Development Setup
# Install dependencies
uv sync
source .venv/bin/activate
uv run fastapi dev --app propertium.main:app ./src/propertium/main.py
API Endpoints
Planet Polygons
GET /planet-polygons/
- Get all planet polygons (paginated)GET /planet-polygons/{osm_id}
- Get a specific planet polygon by OSM IDPOST /planet-polygons/
- Create a new planet polygon
OpenAI Processing
POST /openai/pdf-to-text
- Convert PDF to text using OpenAIPOST /openai/text
- Process text with OpenAI
Database Schema
The application uses SQLAlchemy with PostgreSQL and PostGIS for spatial data. The main table is fct_planet_polygons
which stores geographic polygon data with the following fields:
osm_id
- Primary key, OSM IDadmin_level
- Administrative levelboundary
- Boundary typename
- Name of the polygonz_order
- Z-order for renderingway_area
- Area of the polygonway
- Geometry data (PostGIS)tags
- JSON map of tagscountry
- Country codeavr_rent_price
- Average rent priceavr_rent_price_per_m
- Average rent price per square meteravr_sale_price
- Average sale priceavr_sale_price_per_m
- Average sale price per square meteris_city_for_search
- Flag for search functionalityname_en
- English namecode
- Codealpha2
- Alpha-2 codeborder_type
- Border type
Example Requests
Create a Planet Polygon
curl -X POST \
http://localhost:8000/planet-polygons/ \
-H "Content-Type: application/json" \
-d '{
"osm_id": 123456789,
"admin_level": "8",
"boundary": "administrative",
"name": "Example City",
"z_order": 0,
"way_area": 1234.56,
"tags": {"place": "city", "population": "100000"},
"country": "US"
}'