background-vault-analysis

background-vault-analysis

A lightweight MCP server for intelligent, non-invasive analysis of Obsidian vaults.

Category
访问服务器

README

Background Vault Analysis System 🧠✨

A lightweight MCP (Model Context Protocol) server for intelligent, non-invasive analysis of Obsidian vaults. Provides actionable insights, change tracking, and comprehensive reporting to improve your knowledge management practices.

🚀 Features

🔍 Intelligent Vault Analysis

  • Non-invasive scanning - Reads your vault without making any changes
  • Markdown parsing - Extracts links, tags, frontmatter, and content structure
  • Orphan detection - Identifies isolated notes that need connections
  • Hub identification - Finds your most connected knowledge centers
  • Content metrics - Word counts, link density, and structural analysis

💡 Actionable Insights

  • Prioritized recommendations - High/medium/low priority actionable suggestions
  • Structural insights - Improve vault organization and connectivity
  • Content guidance - Optimize note length and detail
  • Productivity tracking - Monitor writing patterns and vault growth

📊 Change Monitoring

  • File-level tracking - Monitor additions, modifications, and deletions
  • Activity patterns - Identify productive periods and trends
  • Evolution analysis - Track how your vault grows over time
  • Daily summaries - See recent activity at a glance

📋 Flexible Reporting

  • Markdown reports - Human-readable analysis summaries
  • JSON exports - Structured data for programmatic use
  • CSV formats - Data analysis and spreadsheet integration
  • Customizable sections - Focus on what matters to you

🛠️ Installation & Setup

Prerequisites

  • Node.js v18 or higher
  • Obsidian vault (any size)
  • MCP-compatible client (Claude Desktop, etc.)

Quick Start

  1. Clone and build:
git clone <repository-url> background-vault-analysis
cd background-vault-analysis
npm install
npm run build
  1. Test the system:
node dist/test.js
  1. Configure your MCP client:

Add to your MCP configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "background-vault-analysis": {
      "command": "node",
      "args": ["/path/to/background-vault-analysis/dist/index.js"]
    }
  }
}

📋 Available Tools

🔍 scan_vault

Performs comprehensive analysis of your Obsidian vault.

Parameters:

  • vaultPath (required) - Path to your Obsidian vault
  • mode - Analysis depth: quick, deep, or incremental (default: quick)
  • focus - Analysis focus: health, content, relationships, or all (default: all)

Example:

await mcp.call('scan_vault', {
  vaultPath: '/Users/username/Documents/MyVault',
  mode: 'deep',
  focus: 'all'
});

💡 get_insights

Retrieves actionable insights and recommendations.

Parameters:

  • vaultPath (required) - Path to your vault
  • category - Filter by: orphans, connections, gaps, productivity, or all (default: all)
  • timeframe - Time range: day, week, month, or all (default: all)
  • priority - Priority filter: high, medium, low, or all (default: all)

Example:

await mcp.call('get_insights', {
  vaultPath: '/Users/username/Documents/MyVault',
  category: 'orphans',
  priority: 'high'
});

📊 track_changes

Monitors vault evolution and activity patterns.

Parameters:

  • vaultPath (required) - Path to your vault
  • since - Start date for analysis (ISO format, optional)
  • granularity - Time resolution: hourly, daily, or weekly (default: daily)

Example:

await mcp.call('track_changes', {
  vaultPath: '/Users/username/Documents/MyVault',
  since: '2024-01-01',
  granularity: 'daily'
});

📋 generate_report

Creates comprehensive analysis reports.

Parameters:

  • vaultPath (required) - Path to your vault
  • format - Report format: markdown, json, or csv (default: markdown)
  • sections - Include sections: ['overview', 'insights', 'metrics', 'changes']
  • timeframe - Analysis period (optional)

Example:

await mcp.call('generate_report', {
  vaultPath: '/Users/username/Documents/MyVault',
  format: 'markdown',
  sections: ['overview', 'insights', 'metrics']
});

💾 Data Storage

The system stores analysis data in your home directory:

~/.background-vault-analysis/
├── vaults.json          # Vault registry
├── snapshots.json       # Analysis snapshots
├── insights.json        # Generated insights
└── changes.json         # Change tracking data

Privacy: All data stays local on your machine. No cloud storage or external services.

🎯 Usage Examples

Daily Vault Health Check

// Quick scan for immediate insights
const analysis = await mcp.call('scan_vault', {
  vaultPath: '/Users/username/MyVault',
  mode: 'quick',
  focus: 'health'
});

// Get high-priority recommendations
const insights = await mcp.call('get_insights', {
  vaultPath: '/Users/username/MyVault',
  priority: 'high'
});

Weekly Progress Review

// Track changes over the past week
const changes = await mcp.call('track_changes', {
  vaultPath: '/Users/username/MyVault',
  since: '2024-08-01',
  granularity: 'daily'
});

// Generate comprehensive report
const report = await mcp.call('generate_report', {
  vaultPath: '/Users/username/MyVault',
  format: 'markdown'
});

Deep Vault Analysis

// Full analysis with all insights
const analysis = await mcp.call('scan_vault', {
  vaultPath: '/Users/username/MyVault',
  mode: 'deep',
  focus: 'all'
});

// Export data for external analysis
const dataExport = await mcp.call('generate_report', {
  vaultPath: '/Users/username/MyVault',
  format: 'json'
});

🔧 Architecture

Components

  • AnalysisDatabase - JSON-based local storage
  • VaultAnalyzer - Core scanning and analysis engine
  • InsightGenerator - Recommendation and insight creation
  • ChangeTracker - File modification monitoring
  • ReportGenerator - Multi-format report creation

Design Principles

  • Non-invasive - Only reads, never modifies your vault
  • Lightweight - Minimal dependencies and fast execution
  • Local-first - All data stored locally for privacy
  • Extensible - Modular design for easy feature additions

📊 Sample Output

Analysis Results

🔍 Vault Analysis Complete

Path: /Users/username/MyVault
Mode: quick
Focus: all

Results:
- Notes analyzed: 247
- Links found: 1,156
- Orphans detected: 23
- Analysis time: 145ms

Key Findings:
- Large vault with 247 notes - consider organization strategies
- High linking density (4.7 links/note) - excellent connectivity
- Low orphan rate (9%) - excellent note connectivity
- Found 12 hub notes with 10+ backlinks - great knowledge centers

Insights Example

💡 Vault Insights (all | all priority)

Found 3 actionable insights:

**23 Orphaned Notes Found** (medium)
9% of your notes (23 out of 247) have no incoming links, making them difficult to discover.
Action: Review orphaned notes and create connections to related content. Start with recent notes or those with valuable information.

**Knowledge Hub Notes Identified** (low)
You have 12 notes that serve as knowledge hubs with many connections. These are valuable reference points.
Action: Maintain and expand these hub notes. Consider adding overviews, summaries, or organizing them as MOCs (Maps of Content).

**Strong Note Connectivity** (low)
Your notes average 4.7 backlinks each, indicating good interconnectedness.
Action: Continue building connections between ideas. Consider creating overview notes that link to clusters of related content.

🤝 Contributing

This is a focused, lightweight tool designed for personal knowledge management. The codebase is well-structured and documented for easy understanding and modification.

Development Setup

npm install
npm run build
npm run test  # Run the test suite
npm run dev   # Build and run in development mode

Code Structure

src/
├── analysis/           # Core analysis components
│   ├── vault-analyzer.ts
│   └── change-tracker.ts
├── database/           # Data storage
│   └── analysis-db.ts
├── insights/           # Insight generation and reporting
│   ├── insight-generator.ts
│   └── report-generator.ts
├── index.ts           # Main MCP server
├── types.ts           # TypeScript definitions
└── test.ts            # Test suite

📄 License

MIT License - Use freely for personal and commercial projects.

🔗 Related Projects


Built with ❤️ for the Obsidian community

Helping you understand and improve your knowledge management practices through intelligent analysis.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选