Hindsight MCP

io.github.Rbfinch由 GitHub 帳號 Rbfinch 發布v0.1.5更新於 Oct 27, 2026

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

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,將 git 提交、測試結果與 GitHub Copilot 工作階段彙整到 SQLite,讓助理能檢索並摘要你的開發歷程。

可以做什麼
  • 全文檢索提交記錄與 Copilot 對話訊息
  • 依工作區檢視提交與測試執行的時間軸
  • 查詢失敗的測試,以及含關聯測試結果的單一提交詳情
  • 依指定天數彙總開發活動統計
  • 觸發資料重新整理,匯入 git、Copilot 或全部來源
適用情境
適合想在 VS Code 中讓助理回答自身專案歷程問題時使用,例如最近在做什麼、哪些提交涉及某個主題、哪些測試失敗,而不必手動翻查 git 紀錄與聊天內容。
執行需求
以本機執行檔透過 stdio 執行(可用 cargo 安裝或使用平台壓縮檔);文件中的設定需要 VS Code 1.99+ 與 GitHub Copilot,測試匯入需要 cargo-nextest。資料存於本機 SQLite 資料庫,路徑可用 HINDSIGHT_DATABASE 指定,HINDSIGHT_WORKSPACE 可設定預設工作區。
安裝前請注意
它會讀取並保存 Copilot 聊天工作階段(含提示、回覆與附件檔案)以及提交與測試失敗輸出到本機資料庫,請留意資料庫位置與存取權限。匯入工具會寫入該資料庫,test 指令會在工作區執行 cargo nextest。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Hindsight MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

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 ingesthindsight-mcp test
# Test specific packagehindsight-mcp test -p my-crate
# Preview without writing to databasehindsight-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 modeNEXTEST_EXPERIMENTAL_LIBTEST_JSON=1 cargo nextest run \  --message-format libtest-json 2>/dev/null | \  hindsight-mcp test --stdin
# Using ingest command with explicit commitNEXTEST_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

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
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.gitcd hindsight-mcpcargo build --release
Running Tests
bash
cargo install cargo-nextestcargo 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
bash
cd crates/hindsight-testscargo +nightly fuzz run fuzz_nextest_run
cd crates/hindsight-copilotcargo +nightly fuzz run fuzz_session_json

License

MIT

來源:README.md,提交 dab92d5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.5最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分