| Crates.io | hindsight-mcp |
| lib.rs | hindsight-mcp |
| version | 0.1.5 |
| created_at | 2026-01-18 05:49:50.724253+00 |
| updated_at | 2026-01-19 04:55:41.18273+00 |
| description | MCP server bridging AI and development history |
| homepage | https://github.com/Rbfinch/hindsight-mcp |
| repository | https://github.com/Rbfinch/hindsight-mcp |
| max_upload_size | |
| id | 2051858 |
| size | 621,265 |
An MCP server for AI-assisted coding that leverages development history.
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:
cargo install cargo-nextestcargo install hindsight-mcp
Create .vscode/mcp.json in your project:
{
"servers": {
"hindsight": {
"type": "stdio",
"command": "hindsight-mcp",
"args": ["--workspace", "${workspaceFolder}"]
}
}
}
Cmd+Shift+P)hindsight is listedThat's it! Copilot will use hindsight tools to answer questions about your development history.
| Tool | Purpose | Example Prompt |
|---|---|---|
hindsight_timeline |
Chronological activity view | "Show recent commits and test runs" |
hindsight_search |
Full-text search | "Find commits about authentication" |
hindsight_failing_tests |
Query test failures | "What tests are failing?" |
hindsight_activity_summary |
Aggregate stats | "Summarise my week" |
hindsight_commit_details |
Commit info with tests | "Details for commit abc123" |
hindsight_ingest |
Trigger data refresh | "Refresh development history" |
limit (int): Max events, default 50workspace (string): Filter by pathquery (string): Search query (required)source (string): "all", "commits", or "messages"limit (int): Max results, default 20limit (int): Max tests, default 50workspace (string): Filter by pathcommit (string): Filter by SHAdays (int): Days to summarise, default 7sha (string): Commit SHA (required)workspace (string): Path to ingest (required)source (string): "git", "copilot", or "all"incremental (bool): Only new data, default truelimit (int): Max itemsRun 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-run
The test command automatically:
cargo nextest with correct flagsFor 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)
| 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.
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
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
| Variable | Description |
|---|---|
HINDSIGHT_DATABASE |
Database path |
HINDSIGHT_WORKSPACE |
Default workspace |
| Platform | Default Path |
|---|---|
| macOS | ~/Library/Application Support/hindsight/hindsight.db |
| Linux | ~/.local/share/hindsight/hindsight.db |
| Windows | %LOCALAPPDATA%\hindsight\hindsight.db |
| Problem | Solution |
|---|---|
| Server does not start | Check binary path; run with --verbose |
| No data showing | Run hindsight_ingest tool via Copilot |
| Log interference | Use --quiet in production |
git clone https://github.com/Rbfinch/hindsight-mcp.git
cd hindsight-mcp
cargo build --release
cargo install cargo-nextest
cargo nextest run --workspace
hindsight/
├── crates/
│ ├── hindsight-mcp/ # MCP server binary
│ ├── hindsight-git/ # Git log processing
│ ├── hindsight-tests/ # Test result processing
│ └── hindsight-copilot/ # Copilot session parsing
cd crates/hindsight-tests
cargo +nightly fuzz run fuzz_nextest_run
cd crates/hindsight-copilot
cargo +nightly fuzz run fuzz_session_json
MIT