Flip Database MCP

Flip Database MCP

A standalone MCP server for querying a PropertyRadar flip-tracking Supabase database. It offers read-only tools for searching properties, retrieving flip history, summarizing metrics, and running SQL queries.

Category
Visit Server

README

Flip Database MCP

A standalone MCP server exposing 3 read-only tools over your PropertyRadar flip-tracking Supabase database (the properties table). Built to let Claude answer questions and summarize data from that database directly, independent of the Deal Analysis Tool.

Tools

  • search_flip_database — filtered search (city, zip, spread %, days held, price range) → matching rows, sorted by spread % descending
  • get_property_flip_history — look up one property by address or RadarID → its full transfer history record
  • summarize_flip_metrics — aggregate stats (avg spread %, avg days held, top performers) for a city/zip/date range — the "advise decisions" tool
  • run_sql_query — open-ended, read-only SQL for questions the other 3 tools can't answer: correlations (corr(sqft, spread_pct)), threshold/ bucket analysis (width_bucket(...)), multi-dimensional grouping ("which areas do best with condos specifically"). Runs as a dedicated flip_readonly Postgres role with only SELECT on properties — no write access anywhere, enforced by the database itself, not just by this code. Also enforces: SELECT-only, single-statement-only, a 5-second timeout, and a hard 500-row cap on every query.

All four only ever read from the properties table. Nothing here writes to it — that stays the job of the separate Python webhook/backfill pipeline.

Setup

1. Create the read-only role

In your flip-tracking Supabase project's SQL Editor, run the flip_readonly role creation block from schema.sql (in the Python pipeline's repo) — replace the placeholder password with a real strong one first.

2. Build the read-only connection string

Supabase's Database settings → Connection string gives you the host/port format. Swap in the flip_readonly role and its password:

postgresql://flip_readonly:YOUR_PASSWORD@YOUR_PROJECT_HOST:5432/postgres

3. Environment variables

Copy .env.example to .env locally for testing, and set the same six in Railway's Variables tab for deployment:

Variable Where it comes from
FLIP_SUPABASE_URL Your flip-tracking Supabase project → Settings → API
FLIP_SUPABASE_SERVICE_KEY Same page — the legacy service_role key (not the new sb_secret_... format — see note below)
FLIP_DB_READONLY_URL The connection string from step 2, using the flip_readonly role
OAUTH_ISSUER Your deployed Railway URL, e.g. https://flip-database-mcp-production.up.railway.app
JWT_SECRET Make up a long random string
MCP_AUTH_TOKEN Make up another random string (a static-token fallback, same pattern as deal-analysis-mcp)

Important: use the legacy service_role key, not the new-format sb_secret_... key. The same library-compatibility issue we hit on the Python webhook service applies here too — the installed @supabase/supabase-js version may not yet support the new key format cleanly.

4. Local dev

npm install
npm run dev

5. Deploy to Railway

Same pattern as deal-analysis-mcp: connect this repo, Railway auto-detects the Dockerfile, set the environment variables above, generate a public domain.

6. Connect it to Claude

Once deployed, add it as a new connector in Claude using its URL:

https://your-app-name.up.railway.app/mcp

Claude will walk through the OAuth flow automatically (dynamic client registration → authorize → token) — same mechanism already proven working with the Deal Analysis Tool connector.

Notes on future integration

If you later want these same 3 tools available inside the Deal Analysis Tool as well (for cross-referencing during comp analysis), the query logic in src/tools/*.ts here is written as plain, dependency-free functions — they can be copied into deal-analysis-mcp's src/tools/ folder with only the Supabase client import changed to point at this project's credentials (registered there under different env var names, e.g. FLIP_SUPABASE_URL, so it never collides with that project's existing SUPABASE_URL used for deal_analyses).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured