Seshat MCP Server

Seshat MCP Server

Enables querying 10,000 years of historical social-complexity data from the Seshat Global History Databank through 9 tools, allowing counterfactual analysis and comparison of polities in natural language.

Category
访问服务器

README

Seshat — Echoes of History

Ask counterfactual questions of the historical record. Seshat turns the Seshat Global History Databank into something you can interrogate — both programmatically through an MCP server and visually through a web app — and then project what might have happened if history had gone differently.

"What if the Roman Empire had developed gunpowder weapons in 200 BCE? How might its social complexity have evolved?"

This monorepo has two front doors:

  • 🔌 MCP server — exposes 9 Seshat tools to Claude and other MCP-enabled assistants, so researchers can query 10,000 years of social-complexity data in natural language. See packages/mcp-server/README.md.
  • 🌍 Echoes of History web app — a Next.js app for picking a civilisation, injecting a hypothetical change, and watching a forward-projected complexity trajectory with confidence bands.

Both are powered by the same estimation engine, which lives in the shared package.

About the Seshat Global History Databank

This project is built on top of Seshat — it does not generate historical data, it makes Seshat's data queryable and projectable.

Seshat (named after the ancient Egyptian goddess of wisdom and record-keeping) is a research databank founded in 2011 that systematically documents the social and political organisation of human societies across history. It calls itself "the most current and comprehensive body of knowledge about human history," structured so that the past can be studied with established scientific techniques. The databank is maintained by an international team of historians, social scientists, and data scientists, and underpins peer-reviewed research into the long-run evolution of social complexity.

Its scope is what makes counterfactual projection possible:

  • 864 polities (political societies) across 47 regions grouped into 10 macro-regions spanning Africa, Europe, Asia, the Americas, and Oceania
  • Coverage from roughly 3550 BCE to the modern era
  • 77 social-complexity variables (territory, population, settlement hierarchies, infrastructure, information systems, money) — the basis for the PC1 composite complexity score
  • 49 warfare variables (military technology, fortifications, conflict patterns)
  • 26 general variables (capitals, languages, religions, degree of centralisation)

Learn more or explore the source data at seshat-db.com. See Data provenance below for the specific datasets and licensing this project relies on.

Repository structure

This is a pnpm workspace monorepo:

Package What it is
packages/shared TypeScript types, the forward-projection model, scenario catalogue, and BCE/CE year utilities. Built first — the other packages depend on it.
packages/mcp-server MCP server exposing 9 Seshat tools. Independently publishable for researchers.
packages/web The "Echoes of History" Next.js 16 web app.
data/etl Python ETL pipeline that ingests Seshat data into Supabase (separate venv).
data/schemas Supabase SQL migrations, indexes, and RPC functions.

Quickstart

git clone https://github.com/mosse/seshat-mcp
cd seshat-mcp
pnpm install

# The shared package MUST be built before anything else
pnpm --filter @seshat/shared build

You'll need a Supabase project loaded with Seshat data (run the migrations in data/schemas and the ETL in data/etl). Copy the .env.example files in packages/mcp-server/ and packages/web/ and fill in:

Variable Used by Notes
SUPABASE_URL both Supabase project URL
SUPABASE_SERVICE_KEY both Service-role key — server-side only
ANTHROPIC_API_KEY web Narrative generation

Run the MCP server

pnpm --filter @seshat/shared build
pnpm --filter @seshat/mcp-server build
pnpm --filter @seshat/mcp-server dev

Then point Claude Desktop at it — see the MCP server README for config.

Run the web app

pnpm --filter @seshat/shared build
pnpm --filter web dev

The 9 MCP tools

Tool Purpose
search_polities Find historical polities by name, region, or active year
get_polity_detail Complexity scores and key variables for one polity
get_variables Variable values for a polity over time
get_complexity_timeline PC1 composite complexity trajectory across centuries
compare_polities Side-by-side comparison of 2–5 polities
find_analogous_polities Similar societies via cosine similarity on feature vectors
get_technology_diffusion How a technology spread across regions over time
run_counterfactual_estimate Project complexity under hypothetical changes with Monte Carlo confidence bands
get_region_snapshot All polities active in a region during a given century

Full parameter tables are in the MCP server README.

Testing

# MCP server (vitest) — 56 tests
pnpm --filter @seshat/mcp-server test

# Web app end-to-end (Playwright) — 34 tests, Desktop Chrome + mobile
pnpm --filter web exec playwright test

# ETL (pytest) — 75 tests, requires venv
cd data/etl && source .venv/bin/activate && pytest tests/

How estimates work — and their limits

The counterfactual engine uses an illustrative approximation of the dynamic regression model from Turchin et al. (2022), Disentangling the evolutionary drivers of social complexity (Science Advances), with Monte Carlo sampling over the model's residual noise to produce confidence bands.

⚠️ The current coefficients are approximate placeholders, not the published fit. Sourcing/fitting the real model (and other honesty fixes) is tracked in IMPROVEMENT_PLAN.md. Until then, read projections as directional illustrations, not authoritative estimates.

A few things to keep in mind when reading any projection:

  • Uncertainty is a feature. Every projection ships with confidence bands and an explicit confidence_limits section. The bands capture statistical noise within the model — not the full range of historical contingency. Treat the central line as one illustrative path, not a prediction.
  • Eurasian validation. The regression model was validated on Eurasian data. Projections for the Americas and Oceania-Pacific carry a prominent caveat and should be read with extra caution.
  • Year convention. BCE years are negative integers (year 0 = 1 BCE, astronomical). They're displayed as "500 BCE", never "-500".

Data provenance

  • Equinox-2020 — Seshat Global History Databank (Turchin et al., 2015). CC BY-NC-SA 4.0. Zenodo
  • Cliopatria — Seshat geospatial boundaries. CC BY 4.0. GitHub
  • Counterfactual model — Turchin et al. (2022). Disentangling the evolutionary drivers of social complexity. Science Advances.

License

Code is MIT. The underlying Seshat data is CC BY-NC-SA 4.0 — any use of the data must be non-commercial and attributed.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选