hindsight-mcp
Allows querying and searching within git commit history (SHA, author, message, timestamp, parents) ingested from a local repository.
Allows querying and searching within GitHub Copilot chat sessions (prompts, responses, attached files) ingested from the local development environment.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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
Related MCP server: Memory MCP
Quick Start
Prerequisites
VS Code v1.99+ with GitHub Copilot
cargo-nextest (for test ingestion):
cargo install cargo-nextest
Installation
cargo install hindsight-mcpConfigure VS Code
Create .vscode/mcp.json in your project:
{
"servers": {
"hindsight": {
"type": "stdio",
"command": "hindsight-mcp",
"args": ["--workspace", "${workspaceFolder}"]
}
}
}Verify Setup
Open VS Code Command Palette (
Cmd+Shift+P)Run "MCP: List Servers"
Confirm
hindsightis listedIn Copilot Chat, switch to Agent mode
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
Tool | Purpose | Example Prompt |
| Chronological activity view | "Show recent commits and test runs" |
| Full-text search | "Find commits about authentication" |
| Query test failures | "What tests are failing?" |
| Aggregate stats | "Summarise my week" |
| Commit info with tests | "Details for commit abc123" |
| Trigger data refresh | "Refresh development history" |
hindsight_timeline
limit(int): Max events, default 50workspace(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 50workspace(string): Filter by pathcommit(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 truelimit(int): Max items
Test Ingestion
Run tests and automatically ingest results:
# 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-runThe test command automatically:
Spawns
cargo nextestwith correct flagsAuto-detects the current git commit
Ingests results to the database
For CI pipelines or custom nextest invocations:
# 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
Source | Data Collected |
Git | Commits (SHA, author, message, timestamp, parents) |
Tests | Run metadata, outcomes, durations, failure output |
Copilot | Chat sessions, prompts, responses, attached files |
Git and Copilot data are ingested automatically. Test results require running hindsight-mcp test.
CLI Reference
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 versionhindsight-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 outputEnvironment Variables
Variable | Description |
| Database path |
| Default workspace |
Database Location
Platform | Default Path |
macOS |
|
Linux |
|
Windows |
|
Troubleshooting
Problem | Solution |
Server does not start | Check binary path; run with |
No data showing | Run |
Log interference | Use |
Development
git clone https://github.com/Rbfinch/hindsight-mcp.git
cd hindsight-mcp
cargo build --releasecargo install cargo-nextest
cargo nextest run --workspacehindsight/
├── crates/
│ ├── hindsight-mcp/ # MCP server binary
│ ├── hindsight-git/ # Git log processing
│ ├── hindsight-tests/ # Test result processing
│ └── hindsight-copilot/ # Copilot session parsingcd crates/hindsight-tests
cargo +nightly fuzz run fuzz_nextest_run
cd crates/hindsight-copilot
cargo +nightly fuzz run fuzz_session_jsonLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
One searchable history across every AI coding tool, with secret scanning and a shared task board.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.3 npmApache 2.0
- AlicenseAqualityDmaintenanceProvides persistent cross-session memory and full-text search for AI coding assistants, storing project context, decisions, and preferences while enabling searchable access to conversation history via local SQLite.81MIT
- AlicenseBqualityDmaintenanceTracks working context and code structure in a portable local SQLite database, enabling seamless context and task continuity across different AI coding tools.121MIT
- AlicenseAqualityDmaintenanceAnalyzes Git commit history and code diffs to auto-remember development context, providing commit timelines, work sessions, unfinished task detection, and daily/weekly reports.9MIT