MCP server for versioned document retrieval, metadata access, and diff capabilities
Project description
Folios
A Model Context Protocol (MCP) server for versioned document management. Folios provides AI agents with access to your document library.
Features
- Versioned Documents - Store multiple versions of documents with simple
{id}_v{version}.mdnaming - Rich Metadata - YAML frontmatter with author, reviewer, approver, status, and type
- Auto-parsed Chapters - H1/H2 headings automatically extracted as document structure
- Version Comparison - Generate diffs between any two versions
- Flexible Filtering - Query documents by status, type, or author
Installation
# Using uvx (recommended)
uvx folios
# Using pip
pip install folios
Quick Start
1. Create your documents folder
Documents follow the naming convention {id}_v{version}.md:
documents/
├── 123456_v1.md
├── 123456_v2.md
└── 789012_v1.md
2. Add YAML frontmatter to each document
---
id: 123456
version: 1
title: "Stress Analysis Design Practice"
type: "Design Practice"
author: "J. Smith"
reviewer: "A. Johnson"
approver: "M. Williams"
date: "2025-01-15"
status: "Approved"
---
# Introduction
Your document content here...
## Background
More content...
3. Run the server
export FOLIOS_PATH=/path/to/your/documents
folios
Or with uvx:
FOLIOS_PATH=/path/to/docs uvx folios
MCP Tools
| Tool | Parameters | Description |
|---|---|---|
get_document_content |
document_id, version? |
Retrieve document content (latest if version omitted) |
get_document_metadata |
document_id, version? |
Get metadata including auto-parsed chapters |
diff_document_versions |
document_id, from_version, to_version |
Diff between two versions |
list_documents |
status?, document_type?, author? |
List documents with optional filters |
list_document_versions |
document_id |
List all versions of a document |
Document Schema
Metadata Fields
| Field | Type | Description |
|---|---|---|
id |
int | Unique document identifier |
version |
int | Version number (sequential integers) |
title |
str | Document title |
type |
str | Document type |
author |
str | Document author |
reviewer |
str | Document reviewer |
approver |
str | Document approver |
date |
str | Date (ISO format recommended) |
status |
str | Document status |
chapters |
list | Auto-parsed from H1/H2 headings |
Document Types
Design Practice- Standard design methodologyGuideline- Recommended approachesBest Practice- Industry best practicesTRS- Technical Requirement SpecificationDVP- Design Verification PlanDVR- Detail Verification Review
Document Statuses
Draft- Work in progressIn Review- Under reviewApproved- Approved for useWithdrawn- No longer valid
Configuration
| Environment Variable | Description | Default |
|---|---|---|
FOLIOS_PATH |
Path to documents folder | ./documents |
Example Usage with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"folios": {
"command": "uvx",
"args": ["folios"],
"env": {
"FOLIOS_PATH": "/path/to/your/documents"
}
}
}
}
Development
git clone https://github.com/alex-pradas/folios
cd folios
uv sync
# Run locally
FOLIOS_PATH=./examples/documents uv run folios
# Run tests
uv run pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file folios-0.1.0.tar.gz.
File metadata
- Download URL: folios-0.1.0.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbebb0accc942ab8cd3b9874d7ddcbd858250ba84ac1decb8e116d37c5287cf7
|
|
| MD5 |
8cd3eba6bdbbdbed4dd51621eb23ac01
|
|
| BLAKE2b-256 |
20120667bff26ac8d9da5563831cb8adbd5e22e089a3ebb3dbd8dde81346d809
|
File details
Details for the file folios-0.1.0-py3-none-any.whl.
File metadata
- Download URL: folios-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
113d9b328ca28409fa5259f7a4efa4d6e2eb424c36b5e9ad4f6f4c4e9d4bbe3e
|
|
| MD5 |
549659cbe7305f12b56b023e317c7ea8
|
|
| BLAKE2b-256 |
e276a52e5921ea7efd53d9fc6d1cb253b60004a53ba804ca1b58374e4c23d1c6
|