# seshat-mcp [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/papyruslabs-ai/seshat-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 340  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/seshat-mcp

## Description
Structural code intelligence for AI agents: real call graphs, blast radius, and change history.

## Tools
Capabilities this server exposes over MCP:

- **get_account_status** — See your current plan, available tools, and credit balance. Call this if a tool returns a tier error or you want to know what tools are available.
- **list_projects** — Start here. Returns all synced codebases with their size, language, and project name. You need the project name for every other tool. If this returns empty, use sync_project to import the current repo.
- **sync_project** — Import a public GitHub repo into Seshat for structural analysis. Call this when list_projects returns empty or when the user wants to analyze a new repo. Detects the git remote automatically if no URL is provided. Extraction typically takes 5-30 seconds. After syncing, call list_projects to confirm the project is available. Use force: true to re-extract even if a cached snapshot exists (useful after code changes or when Seshat extraction has been updated).
- **query_entities** — Like grep but for code structure. Find functions, classes, and routes by name, architectural layer (route/service/component), or module. Returns matching symbols with their type, file, and layer — use this instead of grep when you need to find code by what it does, not by text content.
- **get_entity** — Get everything about one function or class — its signature, callers, callees, data flow, constraints, source location, and database operations (which tables it reads/writes). For JavaScript, TypeScript and Python it also lists the state of each call the function makes — awaited or not, inside a try or .catch, conditional, in a loop or callback — and flags risky ones. Use this when you need to deeply understand a single symbol before modifying it. Returns more than reading the source file because it includes the dependency context.
- **get_dependencies** — Trace who calls a function and what it calls, up to N levels deep. Use this instead of grep-for-function-name when you need the actual call chain — returns the dependency graph, not text matches. Covers callers (upstream), callees (downstream), or both. Where recorded (JavaScript, TypeScript, Python), each edge carries the state of its call: awaited or not, guarded by a try or .catch, conditional, in a loop or callback.
- **get_data_flow** — See what data a function reads, returns, and mutates (DB writes, state changes). Use this when debugging data bugs or when you need to verify whether a function has side effects before refactoring it.
- **find_by_constraint** — Find every function with a specific syntactic constraint tag — AUTH (requires authentication), DB_ACCESS (touches database), THROWS (explicit throw statement), PURE (no side effects), NETWORK_IO (makes HTTP calls), VALIDATED (has input validation). Also supports table-level queries: pass table="walks" to find every function that reads or writes the walks table (answers "what touches this table?" for schema migrations). Constraints are extracted from source syntax, not inferred. For semantic/behavioral properties (e.g., "can fail transitively"), use query_traits instead.
- **get_blast_radius** — Before modifying a function, call this to see everything that could break. Returns all transitively affected symbols — both upstream callers and downstream callees — with distance from the change point. Like git log --follow but for runtime impact. Designed for repeated use: as you discover new symbols with other tools, call this again on them to expand your understanding of the affected surface.
- **get_lineage** — The change history of one symbol, typed by what kind of change each commit made (body, calls, data, signature, constraints…), with CI verdicts, reverts, rename tracking, co-change partners, and rejected PRs that touched it. Call before modifying anything load-bearing: it answers "how does this entity usually change, and what happened last time someone tried?" — which no text diff can. Complements get_blast_radius (current impact) with history (past behavior).
- **get_hotspots** — Project-level change-history orientation: the most-changed entities (and what kind of change dominates each), low-survival thrash spots where changes don't stick, heavily-depended-on entities that haven't changed all window (interface freeze), and directories with no recent changes. Call it after list_modules when orienting in a codebase — it answers "where does development actually happen, and where does it fail?" from commit history rather than current structure. Complements get_lineage (one entity's story) with the project-wide map.
- **get_co_change_clusters** — The codebase's hidden modules: groups of symbols that historically change together (≥3 shared commits, sweep commits excluded), computed from real commit history. Clusters that span multiple directories reveal coupling the file tree doesn't show. Call it when planning a change or splitting work across agents — touching one member of a cluster usually means touching the rest, even when no static dependency connects them. Correlation evidence, honestly framed; complements get_blast_radius (static reach) with empirical reach.
- **list_modules** — Get a bird's-eye view of how the codebase is organized. Groups all symbols by architectural layer (route/service/component), module, file, or language with counts. Use this to orient yourself in an unfamiliar codebase before diving into specifics.
- **get_topology** — Get the full API surface map in one call — all routes, middleware, auth patterns, and database tables. Use this when you need to understand the overall architecture without reading every file. Returns the information you'd normally piece together from dozens of file reads.
- **get_optimal_context** — Before working on a function, call this to get the most relevant related code ranked by importance and fitted to a token budget. Returns a prioritized reading list of symbols you should understand — better than guessing which files to open. Designed for iterative use: call it on your target, read the top results, then call it again on any surprising dependencies to build a complete picture.
- **find_entry_points** — List the ways into the system: route/controller handlers, test entries, framework plugin registrations, and exported symbols (the public API surface), classified by kind and ranked by reach. Call it first when orienting in an unfamiliar codebase — it answers "where does execution start, and what is the public surface?" Complements list_modules (structure) and find_dead_code (its exact inverse: these are the reachability roots).
- **trace_data_path** — Follow data from one function through the call graph to its sinks. From a start entity it walks callees, records the data each hop consumes/produces/mutates, and reports the chain from the start to every sink the data reaches — database writes, network egress, filesystem writes — plus the tables touched. Call it before changing a function that handles real data: it answers "where does this data end up?", the cross-call composition get_data_flow (one entity) cannot give. Flags untrusted inputs at the source.
- **find_dead_code** — Find functions that nothing calls. Walks the call graph from all entry points (routes, exports, tests) and flags symbols that are unreachable. Use this during cleanup or before a release to find safe deletion candidates.
- **find_layer_violations** — Find places where the architecture is broken — a database repository calling a route handler, a utility importing a component. Returns every backward or skip-layer dependency that violates clean architecture.
- **get_coupling_metrics** — Measure how tangled your code is. Returns coupling (cross-boundary dependencies), cohesion (within-group dependencies), and instability scores. High coupling + low cohesion = refactoring candidates. Start with group_by: "layer" for the architectural health view ("are my controllers more coupled than my services?"), then drill into group_by: "module" for specific hotspots.
- **get_auth_matrix** — Audit authentication coverage. Shows which API routes and controllers require auth and which don't, plus inconsistencies like database access without auth checks. For large codebases, use the module parameter to drill into a specific module/directory. Most useful for backend codebases with middleware-based auth. Frontend frameworks (React, Vue) handle auth via component wrappers, which this tool won't detect as AUTH constraints.
- **find_error_gaps** — Find crash risks: functions that throw or have network/DB side effects whose callers don't catch errors. Returns the specific caller→callee pairs where exceptions can propagate unhandled. Use this before shipping to find missing error handling.
- **query_call_sites** — Find calls by their state — facts that belong to one specific call, not to either function: whether it is awaited, whether a try or .catch guards it, whether its result is used, whether it runs conditionally, in a loop, or in a callback. Presets: find="unawaited_async" (async calls never awaited: floating promises, void-detached calls, then-chains without .catch, promises tested as conditions); find="unguarded_throws" (calls whose failure escapes the caller: no try or .catch around them, or a try that cannot catch an unawaited rejection); find="discarded_results" (results computed and dropped — when the callee shows no effect, the call may do nothing). Checked per call, so more precise than find_error_gaps, which treats a try anywhere in a function as covering every call in it. JavaScript, TypeScript and Python; the response states coverage.
- **get_test_coverage** — See which production functions are actually exercised by tests via the call graph — semantic coverage, not line coverage. Optionally ranks uncovered functions by blast radius so you know which missing tests are riskiest.
- **find_ownership_violations** — Find memory and lifecycle issues — entities with complex ownership, unsafe blocks, escaping references, or illegal mutability on borrowed data. Returns 0 for most JS/Python codebases — a non-zero result in those languages indicates a serious boundary violation worth investigating. Most detailed results for Rust and C++.
- **query_traits** — Find functions by inferred behavioral trait — "fallible" (can fail, including transitively via callees that throw), "asyncContext" (carries async state), "generator" (yields values). Traits are semantic properties inferred from the call graph, not just syntax. Use this when you need to find all code with a specific capability. For syntactic tags (explicit throw statements, DB access), use find_by_constraint instead.
- **find_exposure_leaks** — Find places where public/API code directly accesses private internals, bypassing the intended abstraction boundary. Use this during API design reviews or before extracting a module.
- **find_semantic_clones** — Find duplicated logic across the codebase. Normalizes variable names and compares code structure to catch identical algorithms in different files — even across different languages. Use this before a DRY refactor.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "seshat-mcp": {
    "command": "npx",
    "args": ["-y","@papyruslabsai/seshat-mcp"],
    "env": {
      "SESHAT_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `SESHAT_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What seshat-mcp MCP server does

The seshat-mcp MCP server turns a repository into a compiled representation of its code structure. The graph covers functions, classes, routes, tables, dependency edges, data flow, constraints, and selected history signals. Agents can use that representation to understand how a symbol is used, what a change may affect, and which files are most relevant before making an edit.

The server is intended for repository investigation rather than general file search. It can identify public entry points, locate entities by name or organizational attributes, trace callers and callees, and report symbols that appear unreachable. Its answers include coverage information, and its history analysis describes commit-resolution correlation without presenting correlation as causation.

## How it works

A repository is synchronized into the service and compiled into a typed symbol graph. The agent then queries that graph through MCP tools. Public repositories are cloned from GitHub; private repositories require a connected GitHub account. Source is processed in Papyrus Labs cloud infrastructure, where the graph is cached for subsequent queries.

The workflow can start with project and module discovery, continue with symbol or entry-point queries, and then move into dependency, data-flow, or blast-radius analysis. For JavaScript, TypeScript, and Python call sites, the server can distinguish states such as unawaited asynchronous calls, promises used as conditions, failures without surrounding error handling, and dropped results.

History data comes from the repository’s commit record and is backfilled during the first synchronization. Lineage describes changes to a function’s body, calls, signature, or data, along with CI outcomes, reverts, related changes, and the last recorded change that forced an update. Hotspot and co-change queries provide additional historical context.

## Setup and configuration

Installation uses the published npm package and a setup command:

```bash
npx -y @papyruslabsai/seshat-mcp setup <your-key>
```

The setup process writes MCP configuration and stores the API key. A free key is available from the Seshat service, and the first extraction is free. Manual configuration can run the package with `npx` and provide `SESHAT_API_KEY` in the server environment:

```json
{
  "mcpServers": {
    "seshat": {
      "command": "npx",
      "args": ["-y", "@papyruslabsai/seshat-mcp"],
      "env": { "SESHAT_API_KEY": "your-key" }
    }
  }
}
```

The README names Claude Code and Cursor as manual-configuration examples, while also stating that any MCP client can be configured this way.

## Tools and capabilities

The seshat-mcp MCP server exposes tools for several investigation stages:

- `list_projects` and `list_modules` show synchronized projects and code organization.
- `query_entities` and `find_entry_points` locate symbols, routes, exports, and public API surfaces.
- `get_entity`, `get_dependencies`, `get_data_flow`, and `get_blast_radius` explain relationships, behavior, and transitive change impact.
- `get_optimal_context` ranks the smallest useful set of files to read before editing.
- `find_by_constraint` searches for functions associated with a table or trait, while `find_dead_code` identifies unreachable symbols.
- `query_call_sites` checks per-call states in JavaScript, TypeScript, and Python.
- `get_lineage`, `get_hotspots`, and `get_co_change_clusters` use commit history to show evolution, unstable areas, and files that commonly change together.

## Limitations and notes

Analysis runs in the Papyrus Labs cloud rather than locally. Public repositories are cloned from GitHub, private repositories need GitHub account access, and processed source is cached to serve queries.

Usage beyond the free tier is priced per query, with a stated typical investigation range of five to fifteen queries. The repository describes the server as MIT licensed.

_Full upstream README: https://allmcps.com/mcp/seshat-mcp/readme_

