# sourcebook [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/maroondlabs/sourcebook  
**GitHub Stars:** 3  
**npm Downloads (last month):** 114  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sourcebook

## Description
Live codebase intelligence for AI agents: conventions, blast radius, import graphs, git insights.

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

```json
"mcpServers": {
  "sourcebook": {
    "command": "npx",
    "args": ["-y","sourcebook"]
  }
}
```

## Documentation

## What sourcebook MCP server does

The sourcebook MCP server exposes local codebase intelligence to MCP-compatible AI clients. It helps an agent inspect the structure of a repository before editing, identify files connected to a target file, and understand relationships inferred from both source code and Git history.

Its supported analysis areas include repository conventions, import and dependency relationships, blast radius, and co-change patterns. The server is intended for software repositories rather than biology or general document search. It is especially relevant when an agent needs to determine whether a change should extend beyond the file it was asked to modify.

The related command-line workflow can also analyze staged or unstaged diffs for likely omissions. That check covers missing test files, sibling modules, files that historically change with edited files, and high-fan-in hub files. Optional AI analysis can identify semantic cases such as field renames that require migrations or validation logic tied to an older schema.

## How it works

Run the server from a project directory or pass the repository path with `--dir`. sourcebook reads the repository's file structure and Git history directly; no separate database or configuration file is described as necessary.

Its structural analysis builds an import graph, maps source files to likely tests using naming conventions and history, mines commits for files that frequently change together, and identifies files with many dependents. These signals provide the repository context available to an agent through MCP.

The command-line completeness check has a second, optional analysis layer. With `--ai`, the diff and dependency context are sent to Claude Sonnet for semantic review. This mode requires `ANTHROPIC_API_KEY`; the MCP server itself does not list an environment variable requirement. AI findings must include a dependency citation, and unsupported file paths are filtered out according to the project documentation.

Language coverage is full for TypeScript/JavaScript, Python, and Go across import graphs, Git analysis, and convention detection. Rust has full import-graph and Git analysis support, with partial convention detection.

## Setup and configuration

Start the sourcebook MCP server with:

```bash
npx sourcebook serve
```

An MCP client can launch it with a configuration equivalent to:

```json
{
  "mcpServers": {
    "sourcebook": {
      "command": "npx",
      "args": ["-y", "sourcebook", "serve", "--dir", "/path/to/your/project"]
    }
  }
}
```

Replace the example path with the local repository the agent should inspect. Set `ANTHROPIC_API_KEY` only when using the CLI's `check --ai` option.

## Tools and capabilities

The sourcebook MCP server lets agents query:

- Repository structure and coding conventions
- Import relationships and dependency context
- Blast radius for files with many dependents
- Co-change information from Git history

The package also provides CLI commands for diff completeness checks, JSON or quiet output, branch comparisons, historical scans, Claude Code hook setup, context-file generation, natural-language codebase queries, and automatic updates. These are CLI features and should not be assumed to be MCP tools.

## Limitations and notes

The MCP interface is documented as a local server started with `npx`, and the repository path must be available to that process.

The GitHub App is described as coming soon and is not an available MCP capability. Rust convention detection is partial. AI semantic analysis is optional, uses an Anthropic API key, and is separate from the rules-based structural analysis.

_Full upstream README: https://allmcps.com/mcp/sourcebook/readme_

