horizon-mcp-demo-extended

Extends the horizon-mcp-demo with a second MCP server wrapping the Horizon Data Predictive Model, demonstrating the Claudeception pattern — a single Claude agent connecting to two governed data systems simultaneously.

Built as research and reference material for the Horizon Data Partners white paper: The Governed Data Layer: Why AI Agents Fail Without One, and How to Build It.

What this demonstrates

The core pattern: Two MCP servers, one agent, zero hardcoded connections between them.

Server What it exposes Tools
Insurance Data (from horizon-mcp-demo) P&C insurance semantic layer — loss ratio, claim frequency, earned premium by segment list_models, get_model_details, get_metric_definitions, query_data
Predictive Model (this repo) Professional services pipeline prediction model — win probability, fees, margin, milestone timing describe_inputs, describe_outputs, validate_payload, score_opportunity

The agent connects to both servers simultaneously, discovers what each one exposes, and reasons about how to bridge them — including explicitly surfacing the schema mismatch between the two systems and the governance risks of any mapping it proposes.

The schema mapping problem (Option C)

The two systems use completely different schemas:

Insurance data: product_type (auto/homeowners), state (TX/CA/FL/NY)

Predictive model: ServiceLine (Audit/Tax/Advisory), ClientType (Business/Individual), Industry (Healthcare/Financial Services/Technology/Manufacturing), NewVsExisting (Existing/New), LeadSource (Referral/Competitive)

These fields do not map cleanly to each other. The demo provides a pre-specified mapping for some questions, but Question 3 deliberately asks the agent to reason about the mapping problem before applying it — surfacing the governance risks of cross-system field mapping in a way that documents rather than hides the assumption.

This is the real-world use case: someone has a predictive model and a data source with different schemas, and needs an agent to connect them intelligently.

Project structure

horizon-mcp-demo-extended/
├── data/
│   └── seed_predictive_model.py    # Generates predictive_model.duckdb from scratch
├── mcp_server/
│   └── predictive_model_mcp_server.py  # Model-side MCP server (4 tools)
├── scripts/
│   └── run_two_server_agent.py     # Claudeception demo — two servers, one agent
├── logs/                           # Created at runtime — token logs per run
├── docs/                           # Additional documentation
├── requirements.txt
├── .gitignore
└── README.md

Prerequisites

  • Python 3.12
  • horizon-mcp-demo cloned at the same directory level as this repo
    • The two-server agent looks for the insurance MCP server at ../horizon-mcp-demo/mcp_server/horizon_mcp_server.py
  • horizon-mcp-demo fully built (dbt seed && dbt run completed)

Setup (Windows)

1. Clone this repo

git clone https://github.com/christianashworth/horizon-mcp-demo-extended.git
cd horizon-mcp-demo-extended

2. Create and activate virtual environment

py -3.12 -m venv .venv
.venv\Scripts\activate

3. Install dependencies

python -m pip install --upgrade pip
pip install -r requirements.txt

4. Generate the predictive model database

python data/seed_predictive_model.py

This generates data/predictive_model.duckdb — a DuckDB replica of the SQL Server model's trained segment estimates. Takes about 30 seconds.

5. Run the two-server demo

$env:ANTHROPIC_API_KEY = "your-api-key-here"
python scripts/run_two_server_agent.py

Demo questions

# Question type Servers used
1 Model understanding — what does the predictive model need? Predictive Model only
2 Governed data query — insurance loss ratios by segment Insurance Data only
3 Schema mapping surfaced — reason about mapping insurance fields to model inputs before scoring Both
4 Cross-server analysis — score all homeowners segments and combine with loss ratio data Both
5 Governance reflection — what decisions need to be made before using this mapping in production? Both

Predictive model input contract

Field Type Allowed values Notes
ServiceLine string Audit, Tax, Advisory Required. Highest priority — dropped last.
ClientType string Business, Individual Required
Industry string Healthcare, Financial Services, Technology, Manufacturing Optional (nullable for Individuals)
NewVsExisting string Existing, New Required
LeadSource string Referral, Competitive Required. Lowest priority — dropped first.

Predictive model outputs

Output Description
WinPct Probability of winning (0.0–1.0)
NetFees Estimated net fees in USD if won
MarginPct Estimated margin percentage
DaysSellToStart Estimated days from contract signing to work start
DaysStartTo50Pct Estimated days from work start to 50% completion
DaysStartTo100Pct Estimated days from work start to 100% completion

Notes

  • The predictive model database (data/predictive_model.duckdb) is excluded from version control — generated locally by the seed script.
  • The model MCP server opens DuckDB in read-only mode. No write operations are possible.
  • Token usage is logged per question per server in logs/two_server_run_<timestamp>.json.
  • The Claudeception pattern works with any MCP-compatible agent, not just Claude — the two servers are independent and do not communicate with each other directly.

MCP Server · Populars

MCP Server · New

    healthchainai

    healthchain

    Python SDK for healthcare AI — typed, validated FHIR tools for agents, real-time EHR connectivity, production deployment ✨ 🏥

    Community healthchainai
    deverman

    FocusRelay — Fast Swift OmniFocus MCP Server and CLI for macOS

    Fast native Swift OmniFocus MCP server and CLI for macOS. Let AI assistants safely read, update, complete, and organize tasks and projects through documented Omni Automation APIs.

    Community deverman
    Glade-tool

    GladeKit MCP

    Connect any MCP-compatible AI client (Claude Code, Cursor, Windsurf) to Unity or Godot. 235+ granular tools, an editor aware system prompt, game design document project context, script semantic search, and skill calibration.

    Community Glade-tool
    Consiliency

    Code-Index-MCP

    Code indexing MCP server to provide context to coding agents.

    Community Consiliency
    semihbugrasezer

    seerxo

    AI-powered Etsy product listing generator for Claude Desktop Generate perfect SEO titles, descriptions, and tags in seconds

    Community semihbugrasezer