legendsviewer-mcp

legendsviewer-mcp

MCP server that lets AI assistants read and query Dwarf Fortress world legends: search events, objects, and properties, or read summaries and base rates to distinguish real patterns from common traits.

Category
Visit Server

README

legendsviewer-mcp

An MCP server that lets a language model read and query the history of a Dwarf Fortress world: search the deeds recorded in the legends, read the biography of a figure or the history of a civilization, and check whether what looks remarkable actually is.

It is a thin client over the analysis API added by LegendsViewer-AIPowered, a fork of Kromtec/LegendsViewer-Next.

Requirements

LegendsViewer-AIPowered must be running. This server owns no world state: parsing a large export takes about 30 seconds and 800 MB, which is fine once per application run and unacceptable per MCP session. It therefore queries a long-lived backend rather than loading anything itself.

# in the LegendsViewer-AIPowered checkout
dotnet run --project LegendsViewer.Backend

A stock LegendsViewer-Next will not work: it has no /api/Analysis routes. world_status says so explicitly if you point this at one.

Install

npm install
npm run build

Then register it with your MCP client. For Claude Code:

{
  "mcpServers": {
    "legendsviewer": {
      "command": "node",
      "args": ["/absolute/path/to/legendsviewer-mcp/dist/index.js"]
    }
  }
}

Set LEGENDSVIEWER_URL if the backend does not listen on http://localhost:15421.

Tools

Tool Purpose
world_status is the backend reachable, is a world loaded, which object types exist
list_worlds worlds opened before, with the XML path each loads from
load_world parse an export into memory (~30 s)
world_summary overview: civilizations, eras, wars, most eventful figures
read_object one object's history, full or digest
search_objects find by name
search_properties find by goal, race, position, affiliation
search_events full text search over the prose of every event
base_rates how common a property value is
rankings who holds the maximum of a numeric measure

Two of these deserve emphasis, because they cover what the others cannot. Only search_events finds deeds, which appear in no property; only search_properties finds goals and affiliations, which appear in no event.

And base_rates is the one to reach for before concluding anything. A trait shared by three notable figures looks like a pattern until you learn that half the world shares it — most properties are recorded for only part of the objects, so the tool reports both denominators rather than letting you assume one.

Arguments are validated strictly: an unknown parameter is an error, not a silently dropped key. The tool's cap is maxEvents for both detail levels, whereas the backend route behind the digest calls it maxNotableEvents — passing the backend's name used to look like it worked while the server default applied instead.

Two habits worth having

Ask for the digest first. read_object defaults to it. The full dossier of a large civilization can exceed 600 KB, most of it recurring festivals; the digest is around 17 KB and keeps the events that are rare for that object.

Filter event searches when you can. There is no index — the text only exists once the prose has been rendered — so an unfiltered search on a large world renders every event and takes a few seconds. Passing eventTypes brings it to milliseconds.

Drop q to read history rather than search it. search_events with only fromYear/toYear returns everything that happened then, which is the one question no keyword can express. It is also the fastest call in the set: with no text to match, nothing is rendered at all — a full year of a 494,436 event world comes back in 9 ms.

Development

npm test          # unit tests, plus an in-memory MCP client exercising every tool
npm run watch     # recompile on change

The tests use no network: the HTTP client is stubbed, and the MCP surface is driven through the SDK's in-memory transport.

License

MIT.

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