Metadata-Version: 2.4
Name: vault-bridge
Version: 1.0.4
Summary: Bridge your AI assistant to local knowledge vaults — read, write, and search notes without cloud dependencies
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: fastmcp-slim[server]<4.0,>=3.4
Requires-Dist: pyyaml>=6.0
Requires-Dist: structlog>=24.1
Requires-Dist: pydantic-settings>=2.3
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"

# Vault Bridge

Bridge your AI assistant to local knowledge vaults — read, write, search, and manage notes without cloud dependencies.

## Features

- **read_note** — Read a note with optional frontmatter parsing
- **write_note** — Write notes with YAML frontmatter support
- **list_notes** — List notes with glob filtering and recursion
- **search_notes** — Regex search across vault content
- **search_frontmatter** — Query notes by frontmatter key/value
- **get_daily_note** — Get or create daily notes with templates

## Installation

```bash
pip install vault-bridge
```

## Usage

```bash
vault-bridge
```

Or configure in your MCP client:

```json
{
  "mcpServers": {
    "vault": {
      "command": "vault-bridge",
      "env": {
        "VAULT_BRIDGE_VAULT_PATH": "C:/path/to/vault"
      }
    }
  }
}
```

## Configuration

| Environment Variable | Default | Description |
|---------------------|---------|-------------|
| `VAULT_BRIDGE_VAULT_PATH` | Current directory | Path to vault root |
| `VAULT_BRIDGE_MAX_FILE_SIZE` | 10MB | Max file size for operations |
| `VAULT_BRIDGE_DEFAULT_ENCODING` | utf-8 | Text encoding |
| `VAULT_BRIDGE_INDEX_FRONTMATTER` | true | Parse YAML frontmatter |
| `VAULT_BRIDGE_FOLLOW_SYMLINKS` | false | Follow symlinks |

## Tool Reference

### read_note
```json
{
  "path": "Projects/roadmap.md",
  "include_frontmatter": true
}
```

### write_note
```json
{
  "path": "Projects/new-idea.md",
  "content": "# New Idea\n\nDetails here...",
  "frontmatter": { "tags": ["idea", "draft"], "status": "wip" }
}
```

### list_notes
```json
{
  "path": "Projects",
  "glob_pattern": "**/*.md",
  "recursive": true
}
```

### search_notes
```json
{
  "pattern": "MCP",
  "path": ".",
  "max_results": 50
}
```

### search_frontmatter
```json
{
  "key": "status",
  "value": "done",
  "operator": "eq"
}
```

### get_daily_note
```json
{
  "date": "2026-08-21",
  "folder": "Daily Notes",
  "create_if_missing": true
}
```
