Queries Markdown files by front matter metadata, enabling filtering and retrieval of notes based on tags, dates, and folders in Markdown-based knowledge bases.
Queries notes in Obsidian vaults by front matter metadata, allowing filtering by tags, creation/update dates, and folders to retrieve recent thinking and notes.
markdown-frontmatter-mcp
A Model Context Protocol (MCP) server that queries Markdown files by front matter metadata. Designed for Obsidian vaults and other Markdown-based knowledge bases.
The Problem
You have a Markdown knowledge base (Obsidian, etc.) with front matter like:
You want to ask an AI: "What have I been thinking about [X] lately?"
Existing tools can search by keywords or do semantic search, but none let you query by front matter metadata — filtering by tags AND recency.
The Solution
This MCP server exposes one tool: query_recent_notes
Returns:
File path
Title (from H1 or filename)
Tags
Created/updated dates
Excerpt (first ~200 chars)
Installation
From PyPI (coming soon)
From Source
Configuration
Environment Variable
Set KB_PATH to point to your knowledge base:
MCP Client Configuration
TypingMind
Add to your MCP config:
Claude Desktop
Add to ~/.config/Claude/claude_desktop_config.json:
Usage Examples
Once configured, you can ask the AI:
"Get my recent thinking on AI systems"
The AI will call:
"What personal growth stuff have I been working on?"
"Catch me up on what's been on my mind"
Front Matter Requirements
For files to be queryable, they need YAML front matter with:
createdordate: When the note was created (YYYY-MM-DD)updated(optional): When last meaningfully edited (YYYY-MM-DD)tags(optional): List of tags for filtering
Example:
How It Works
Walks the specified folders in your knowledge base
Parses YAML front matter from each
.mdfileFilters by:
Date:
createdorupdatedwithin thedayswindowTags: matches ANY of the specified tags
Returns results sorted by most recently touched
Skipped Directories
The server automatically skips:
.obsidian.git.smart-env.versiondbnode_modulesAny directory starting with
.
Development
Testing Locally
Then send JSON-RPC messages via stdin:
License
MIT