home / mcp / narrative graph mcp server
Provides a Narrative Graph MCP server implementing the Random Tree Model to encode, traverse, and analyze narrative memory with configurable depth and ensemble methods.
Configuration
View docs{
"mcpServers": {
"angrysky56-narrative-graph-mcp": {
"command": "node",
"args": [
"/path/to/narrative-graph-mcp/dist/index.js"
]
}
}
}You will run a Narrative Graph MCP server that implements the Random Tree Model to encode, traverse, and analyze narratives. This server lets you encode stories and other texts into hierarchical trees, generate ensembles to study recall variance, and retrieve summaries at different abstraction levels for practical analysis and research workflows.
You integrate the Narrative Graph MCP server with your MCP client to encode narratives into a hierarchical tree, generate ensembles for population-level analysis, and traverse narratives to obtain summaries at chosen abstraction levels. Use it to study how narratives are compressed, recalled, and analyzed across varying depths and memory constraints.
Prerequisites: you need Node.js 18 or newer and a compatible package manager such as npm or yarn.
Install dependencies by running the package manager in the project directory.
Build the server for production to generate the runnable JavaScript artifacts.
Run the server in development mode to enable automatic recompilation as you edit the source.
Configuration notes describe how to start and integrate the server with an MCP client. When you start the server, you can run it directly or via a wrapper that points to the compiled entry point.
Troubleshooting covers common startup issues, such as missing dependencies, build problems, or type errors, and provides steps to diagnose and resolve them.
Security and maintenance guidance emphasizes keeping dependencies up to date, validating inputs, and controlling access to MCP endpoints.
Creates a single Random Tree encoding of a narrative with configurable text, title, type, and memory constraints.
Generates a statistical ensemble of Random Trees to model population-level recall variance for a given narrative.
Traverses a narrative tree to retrieve summaries at specified abstraction depths and reports compression metrics.
Finds the optimal traversal depth to achieve a target recall length.