horizon-predictive-model-mcp
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.
horizon-mcp-demo-extended
Extends the horizon-mcp-demo by connecting it to the Horizon Data Predictive Model — a professional services pipeline model — via a single Claude agent. Built as research 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 actually demonstrates
This demo was built to explore the Claudeception pattern — a single agent connecting to two governed systems and reasoning across them. In practice, it produced something more instructive than a clean success: a concrete example of what happens when cross-system governance is absent.
The two systems in this demo have completely incompatible analytical schemas:
Insurance data — P&C insurance policies with product types (auto/homeowners) and states (TX/CA/FL/NY)
Predictive model — professional services pipeline model expecting ServiceLine (Audit/Tax/Advisory), ClientType (Business/Individual), Industry, NewVsExisting, and LeadSource
These categories do not correspond to anything real across the two systems. P&C insurance policies are not professional services opportunities. Yet the agent — when asked to map insurance segments to model inputs — did so confidently. It reasoned about the mapping, cited governance risks, validated its payload, and returned a WinPct estimate that was internally consistent and analytically meaningless.
This is the paper's argument made concrete: a governed semantic layer protects an agent within a system. It cannot protect against an agent being pointed at two systems that have no valid analytical relationship. The agent followed its governance rules correctly. It produced nonsense anyway — because cross-system governance was never done.
Three things were missing that cross-system governance would have required:
Domain compatibility check — do the analytical categories in System A correspond to anything meaningful in System B?
Approved mapping — who has authority to approve the field-level mapping, under what conditions, and what triggers a review?
Governed interface definition — what kinds of upstream data sources are valid inputs semantically, not just technically?
Related MCP server: Agency AI MCP Server
Technical notes
System | Transport | What it exposes |
Insurance Data (from | MCP via stdio | P&C insurance semantic layer — loss ratio, claim frequency, earned premium by segment |
Predictive Model (this repo) | Direct Python calls | Professional services pipeline model — win probability, fees, margin, milestone timing |
The predictive model tools run as direct Python function calls rather than via a second MCP server. This resolves a Windows asyncio/anyio compatibility issue with nested stdio clients. On Linux/macOS, the full two-MCP-server pattern works correctly.
The predictive model's trained segment estimates are loaded from a DuckDB file into memory at startup, generated by data/seed_predictive_model.py from synthetic training data using the same parameters as the original SQL Server model.
Project structure
horizon-mcp-demo-extended/
├── data/
│ └── seed_predictive_model.py # Generates predictive_model.duckdb
├── mcp_server/
│ └── predictive_model_mcp_server.py # MCP server definition (Linux/macOS)
├── scripts/
│ └── run_two_server_agent.py # Agent demo — insurance MCP + model Python calls
├── requirements.txt
├── .gitignore
└── README.mdPrerequisites
Python 3.12
horizon-mcp-democloned at the same directory level as this repohorizon-mcp-demofully built (dbt seed && dbt runcompleted)
Setup (Windows)
1. Clone this repo
git clone https://github.com/christianashworth/horizon-mcp-demo-extended.git
cd horizon-mcp-demo-extended2. Create and activate virtual environment
py -3.12 -m venv .venv
.venv\Scripts\activate3. Install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt4. Generate the predictive model database
python data/seed_predictive_model.py5. Run the demo
$env:ANTHROPIC_API_KEY = "your-api-key-here"
python scripts/run_two_server_agent.pyDemo questions
# | Question | Purpose |
1 | What inputs does the predictive model require? | Establish model requirements |
2 | What are the loss ratios by segment in the insurance data? | Governed single-system query |
3 | Map insurance segments to model inputs and score | Surfaces the schema mismatch and governance failure |
4 | Score all homeowners state segments and combine with loss ratios | Cross-system join — analytically meaningless given the incompatible schemas |
5 | What governance decisions would be needed before using this mapping in production? | Agent correctly identifies what should have been done first |
Question 5 is the most instructive: the agent accurately describes the governance framework that was absent throughout the rest of the demo.
Notes
data/predictive_model.duckdbis excluded from version control — generated locally by the seed script.Token usage is logged per question in
logs/two_server_run_<timestamp>.json.The full technical documentation is in
horizon-mcp-demo-extended-technical-documentation.docx.
Related MCP Connectors
Classification service to seamlessly retrieve SOC codes for job titles and descriptions.
Credit score and risk analysis of a person or company. Platform-hosted, no credentials, pay per quer
Sportsbook-derived no-vig fair value with confidence, provenance, and history over REST/MCP.
Remote MCP endpoint for U.S. home forecasts, public benchmark data, and permit or zoning readiness.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides ML-powered revenue intelligence for sales and customer success teams, enabling lead scoring, churn risk detection, and conversion predictions with explainable feature attribution and production monitoring capabilities.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to recommend specialized AI operations services, perform organizational readiness assessments, and automate consultation bookings. It acts as a digital sales agent for discovery and client onboarding via the Model Context Protocol.-
- AlicenseBqualityAmaintenanceEnables AI-powered interaction with Salesforce, providing opportunity intelligence, engagement analysis, business case generation, and standard CRUD operations through natural language.1870 npm6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and analyze Salesforce pipeline data, including pipeline health, deal details, and risk alerts, through natural language.3 npmMIT