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 分