Keystone MCP Server

Keystone MCP Server

Enables construction professionals to query project documents with conflict-aware RAG, detect contradictions, and trace change impacts through any MCP client.

Category
Visit Server

README

<div align="center">

๐Ÿ›๏ธ Keystone

AEC Project & Document Intelligence Platform

Construction documents constantly contradict each other โ€” one spec says 30 MPa concrete, a drawing says 25. Keystone is the lighttable that catches it. It reads across every spec, drawing, and RFI to surface contradictions other tools hide, and maps the blast radius of every revision before it reaches the site.

TypeScript ยท Next.js 14 ยท tRPC ยท Prisma ยท PostgreSQL + pgvector ยท Tailwind ยท Docker ยท MCP

</div>

<div align="center">

Impact graph โ€” blast radius

<sub>The impact graph: revise a document and the blast radius propagates outward โ€” affected drawings and RFIs in amber, the contradiction in red.</sub>

Conflict-aware answer

<sub>Ask across the project and Keystone returns the contradiction (30 MPa vs 25 MPa) with both sources โ€” not a single confident answer.</sub>

</div>


The idea

Most AEC document tools are passive file cabinets with a search box. On a real project, dozens of people work off the same documents, and two things constantly go wrong:

  1. Documents contradict each other and nobody notices until it's expensive.
  2. A revision quietly makes other documents stale โ€” and no one gets told.

Generic RAG makes #1 worse: it returns one confident answer from the top-matching chunk, even when another document disagrees. Keystone does two things differently.

1. Conflict-aware RAG

Ask "what concrete strength is required?" and instead of one answer, Keystone retrieves the evidence, clusters the claims, and โ€” if sources disagree โ€” returns the contradiction:

โš ๏ธ Conflict โ€” 03 30 00 (Rev C) says 30 MPa, S-201 (Rev A) says 25 MPa.

In construction, the disagreement is the answer worth knowing.

2. Change-impact graph ("blast radius")

Every document references others (S-201 โ†’ "per Spec 03 30 00"). Keystone extracts those references into a dependency graph. Revise one document and it traces the blast radius โ€” every drawing and RFI downstream that just became suspect โ€” and animates it outward from the epicentre.

Both are tractable because AEC documents use rigid identifiers (CSI MasterFormat codes like 03 30 00, sheet numbers like S-201), so reference extraction is deterministic, not guesswork.


Stack

Layer Tech
Frontend Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS
API tRPC (end-to-end typesafe), Zod
Data Prisma ORM, PostgreSQL 16 + pgvector
Auth NextAuth (credentials + JWT), bcrypt, multi-tenant RBAC
AI RAG over pgvector embeddings; conflict-aware retrieval; MCP server
DevOps Docker, GitHub Actions CI, DigitalOcean App Platform

Runs with zero API keys โ€” a deterministic local embedder backs the AI layer out of the box. Set OPENAI_API_KEY (or any OpenAI-compatible base URL) to swap in a real provider.


Quick start

npm install
cp .env.example .env          # defaults work for local Docker
npm run db:up                 # Postgres + pgvector in Docker
npm run db:migrate            # create schema
npm run db:seed               # demo project with a planted conflict
npm run dev                   # http://localhost:3000

Sign in with the seeded account: demo@keystone.dev / password123, then open Riverside Hospital โ€” Phase 2.


Features

  • Multi-tenant workspaces โ€” organizations, members, role-based access (Owner / Architect / Engineer / Contractor / Client)
  • Documents โ€” drawings, specs, and RFIs; chunked, embedded into pgvector, cross-referenced into a graph
  • Impact graph โ€” interactive blast-radius visualization; click any document to trace what it affects
  • Conflict detection โ€” flags graph-adjacent documents that assert different values for the same unit
  • Ask your project โ€” conflict-aware Q&A with citations
  • MCP server โ€” exposes project tools (ask_project, search_documents, list_conflicts, โ€ฆ) to any MCP client

MCP

npm run mcp        # stdio server for Claude Desktop / MCP clients
npm run mcp:test   # in-process smoke test

See mcp/README.md for the Claude Desktop config.


Deploy

  • CI โ€” .github/workflows/ci.yml runs typecheck, lint, and build on every push.
  • Docker โ€” docker build -t keystone . produces a standalone production image.
  • DigitalOcean โ€” doctl apps create --spec .do/app.yaml provisions the web service + managed Postgres and runs prisma migrate deploy as a pre-deploy job. (Enable the vector extension on the managed database.)

Project structure

src/
  app/                 # routes: landing, auth, /app dashboard, /app/projects/[id]
  components/          # providers, auth shell, workspace (impact graph, ask, conflicts)
  server/
    routers/           # tRPC routers: auth, projects, documents, conflicts, ai
    services/          # ingest, conflict detection, conflict-aware ask
    lib/               # access control (RBAC)
  lib/                 # db, ai (embeddings + LLM), chunking, reference extraction, claims
prisma/                # schema + seed
mcp/                   # Model Context Protocol server
design/                # the "Lighttable" interactive prototype

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