Hindsight MCP logo

Hindsight MCP

MCP server for AI-assisted coding with development history: git, tests, Copilot.

Install Hindsight MCP

Run the project’s own setup commands, in order.

Setup steps from the project

Hindsight MCP installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    cargo install cargo-nextest
    
  2. 2. Install
    cargo install hindsight-mcp
    
  3. 3. Check the setup
    2. Run **"MCP: List Servers"**
    

Overview

Tools6

What Hindsight MCP lets your agent do. Expand a tool for its parameters.

Self-reported~61 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/15 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
Last commit10mo agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.

From the project README

Hindsight Logo

hindsight-mcp

An MCP server for AI-assisted coding that leverages development history.

Overview

hindsight-mcp consolidates development data (git logs, test results, and GitHub Copilot sessions) into a searchable SQLite database, making it accessible to AI assistants through MCP tool calls in VS Code.

Key Features:

  • Full-text search across commits and Copilot conversations
  • Track test results linked to specific commits
  • Activity summaries and timeline views
  • Automatic git and Copilot session ingestion

Quick Start

Prerequisites

  • VS Code v1.99+ with GitHub Copilot
  • cargo-nextest (for test ingestion): cargo install cargo-nextest

Installation

bash
cargo install hindsight-mcp

Configure VS Code

Create .vscode/mcp.json in your project:

config.json
{
  "servers": {
    "hindsight": {
      "type": "stdio",
      "command": "hindsight-mcp",
      "args": ["--workspace", "${workspaceFolder}"]
    }
  }
}

Verify Setup

  1. Open VS Code Command Palette (Cmd+Shift+P)
  2. Run "MCP: List Servers"
  3. Confirm hindsight is listed
  4. In Copilot Chat, switch to Agent mode
  5. Ask: "What have I been working on recently?"

That's it! Copilot will use hindsight tools to answer questions about your development history.

MCP Tools

ToolPurposeExample Prompt
hindsight_timelineChronological activity view"Show recent commits and test runs"
hindsight_searchFull-text search"Find commits about authentication"
hindsight_failing_testsQuery test failures"What tests are failing?"
hindsight_activity_summaryAggregate stats"Summarise my week"
hindsight_commit_detailsCommit info with tests"Details for commit abc123"
hindsight_ingestTrigger data refresh"Refresh development history"
Tool Arguments Reference

hindsight_timeline

  • limit (int): Max events, default 50
  • workspace (string): Filter by path

hindsight_search

  • query (string): Search query (required)
  • source (string): "all", "commits", or "messages"
  • limit (int): Max results, default 20

hindsight_failing_tests

  • limit (int): Max tests, default 50
  • workspace (string): Filter by path
  • commit (string): Filter by SHA

hindsight_activity_summary

  • days (int): Days to summarise, default 7

hindsight_commit_details

  • sha (string): Commit SHA (required)

hindsight_ingest

  • workspace (string): Path to ingest (required)
  • source (string): "git", "copilot", or "all"
  • incremental (bool): Only new data, default true
  • limit (int): Max items

Test Ingestion

Run tests and automatically ingest results:

bash
# Run all tests and ingest
hindsight-mcp test

# Test specific package
hindsight-mcp test -p my-crate

# Preview without writing to database
hindsight-mcp test --dry-run

The test command automatically:

  • Spawns cargo nextest with correct flags
  • Auto-detects the current git commit
  • Ingests results to the database
CI / Advanced Usage

For CI pipelines or custom nextest invocations:

bash
# Using stdin mode
NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1 cargo nextest run \
  --message-format libtest-json 2>/dev/null | \
  hindsight-mcp test --stdin

# Using ingest command with explicit commit
NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1 cargo nextest run \
  --message-format libtest-json 2>/dev/null | \
  hindsight-mcp ingest --tests --commit $(git rev-parse HEAD)

Data Sources

SourceData Collected
GitCommits (SHA, author, message, timestamp, parents)
TestsRun metadata, outcomes, durations, failure output
CopilotChat sessions, prompts, responses, attached files

Git and Copilot data are ingested automatically. Test results require running hindsight-mcp test.

CLI Reference

Code
hindsight-mcp [OPTIONS] [COMMAND]

Commands:
  ingest    Ingest data from various sources
  test      Run tests and ingest results

Options:
  -d, --database <PATH>   Database path [default: ~/.hindsight/hindsight.db]
  -w, --workspace <PATH>  Workspace path [default: current directory]
  -v, --verbose           Debug logging
  -q, --quiet             Errors only
      --skip-init         Skip database init
  -h, --help              Print help
  -V, --version           Print version
Test Subcommand Options
Code
hindsight-mcp test [OPTIONS] [-- <NEXTEST_ARGS>...]

Options:
  -p, --package <PKG>     Package(s) to test
      --bin <BIN>         Binary(ies) to run
  -E, --filter <EXPR>     Filter expression
      --stdin             Read from stdin
      --dry-run           Preview only
      --no-commit         Do not link to commit
      --commit <SHA>      Explicit commit SHA
      --show-output       Show test output

Environment Variables

VariableDescription
HINDSIGHT_DATABASEDatabase path
HINDSIGHT_WORKSPACEDefault workspace

Database Location

PlatformDefault Path
macOS~/Library/Application Support/hindsight/hindsight.db
Linux~/.local/share/hindsight/hindsight.db
Windows%LOCALAPPDATA%\hindsight\hindsight.db

Troubleshooting

ProblemSolution
Server does not startCheck binary path; run with --verbose
No data showingRun hindsight_ingest tool via Copilot
Log interferenceUse --quiet in production

Development

Building from Source
bash
git clone https://github.com/Rbfinch/hindsight-mcp.git
cd hindsight-mcp
cargo build --release
Running Tests
bash
cargo install cargo-nextest
cargo nextest run --workspace
Workspace Structure
Code
hindsight/
├── crates/
│   ├── hindsight-mcp/      # MCP server binary
│   ├── hindsight-git/      # Git log processing
│   ├── hindsight-tests/    # Test result processing
│   └── hindsight-copilot/  # Copilot session parsing
Fuzzing
bash
cd crates/hindsight-tests
cargo +nightly fuzz run fuzz_nextest_run

cd crates/hindsight-copilot
cargo +nightly fuzz run fuzz_session_json

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Hindsight MCP

Hindsight MCP is an MCP server that consolidates Git history, test results, and GitHub Copilot sessions into a searchable SQLite database for AI assistants in VS Code. It provides tools for timelines, full-text search, failing tests, activity summaries, commit details, and data ingestion, helping developers query their development history through Copilot.

Install Hindsight MCP with `cargo install hindsight-mcp`, then create `.vscode/mcp.json` with a stdio server using the `hindsight-mcp` command and `--workspace ${workspaceFolder}`. The prerequisites are VS Code 1.99 or later with GitHub Copilot and, for test ingestion, cargo-nextest.

Hindsight MCP ingests Git commits, test run results, and GitHub Copilot sessions. Git data includes commit SHAs, authors, messages, timestamps, and parents; test data includes outcomes, durations, failure output, and run metadata.

Hindsight MCP provides tools for timelines, full-text search, failing tests, activity summaries, commit details, and data refresh. The tools are `hindsight_timeline`, `hindsight_search`, `hindsight_failing_tests`, `hindsight_activity_summary`, `hindsight_commit_details`, and `hindsight_ingest`.

Run `hindsight-mcp test` to execute cargo-nextest and ingest results for the current Git commit. You can target a package with `-p`, preview with `--dry-run`, or use `--stdin` and `ingest --tests --commit` for custom or CI nextest workflows.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHindsight MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hindsight-mcp?style=directory)](https://allmcps.com/mcp/hindsight-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/hindsight-mcp"><img src="https://allmcps.com/api/badge/hindsight-mcp?style=directory" alt="Hindsight MCP on AllMCPs" /></a>