Install
$ agentstack add mcp-rbfinch-hindsight-mcp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.5 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.5. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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
cargo install hindsight-mcp
Configure 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 listed - In 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 | |------|---------|----------------| | 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" |
Tool Arguments Reference
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
hindsightfailingtests
limit(int): Max tests, default 50workspace(string): Filter by pathcommit(string): Filter by SHA
hindsightactivitysummary
days(int): Days to summarise, default 7
hindsightcommitdetails
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-run
The test command automatically:
- Spawns
cargo nextestwith correct flags - Auto-detects the current git commit
- Ingests results to the database
CI / Advanced Usage
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 Database path [default: ~/.hindsight/hindsight.db]
-w, --workspace 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
hindsight-mcp test [OPTIONS] [-- ...]
Options:
-p, --package Package(s) to test
--bin Binary(ies) to run
-E, --filter Filter expression
--stdin Read from stdin
--dry-run Preview only
--no-commit Do not link to commit
--commit Explicit commit SHA
--show-output Show test output
Environment Variables
| Variable | Description | |----------|-------------| | HINDSIGHT_DATABASE | Database path | | HINDSIGHT_WORKSPACE | Default workspace |
Database Location
| Platform | Default Path | |----------|--------------| | macOS | ~/Library/Application Support/hindsight/hindsight.db | | Linux | ~/.local/share/hindsight/hindsight.db | | Windows | %LOCALAPPDATA%\hindsight\hindsight.db |
Troubleshooting
| 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 |
Development
Building from Source
git clone https://github.com/Rbfinch/hindsight-mcp.git
cd hindsight-mcp
cargo build --release
Running Tests
cargo install cargo-nextest
cargo nextest run --workspace
Workspace Structure
hindsight/
├── crates/
│ ├── hindsight-mcp/ # MCP server binary
│ ├── hindsight-git/ # Git log processing
│ ├── hindsight-tests/ # Test result processing
│ └── hindsight-copilot/ # Copilot session parsing
Fuzzing
cd crates/hindsight-tests
cargo +nightly fuzz run fuzz_nextest_run
cd crates/hindsight-copilot
cargo +nightly fuzz run fuzz_session_json
License
MIT
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Rbfinch
- Source: Rbfinch/hindsight-mcp
- License: MIT
- Homepage: https://github.com/Rbfinch/hindsight-mcp
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.5 Imported from the upstream source.