Provides comprehensive Markdown processing capabilities including rendering to HTML, extracting headings, generating table of contents, and parsing YAML frontmatter from Markdown files.
Enables parsing and extraction of YAML frontmatter from Markdown files for metadata processing and tag-based content organization.
Content Manager MCP Server
A comprehensive TypeScript-based Model Context Protocol (MCP) server for content management, including Markdown processing, document generation, and intelligent note searching.
🚀 Features
📝 Markdown Processing
- Render Markdown to HTML with table of contents generation
- Extract headings and create structured navigation
- Parse frontmatter from Markdown files
- HTML sanitization for safe content processing
🔍 Intelligent Search
- Fuzzy search through notes using Fuse.js
- Exact text matching with context highlighting
- Tag-based filtering using frontmatter metadata
- Date range queries for time-based content discovery
📊 Content Analysis
- Directory statistics showing file counts, sizes, and types
- File discovery with customizable extension filtering
- Content preview with metadata extraction
🛠 Tech Stack
- TypeScript - Type-safe development with latest ES2023 features
- Zod - Runtime schema validation and type inference
- tsup - Fast TypeScript bundler with ESM support
- pnpm - Efficient package management
- Fuse.js - Fuzzy search functionality
- marked - Markdown parsing and rendering
📦 Installation
Prerequisites
- Node.js >= 20.0.0
- pnpm >= 9.0.0
Setup
🔧 Usage
As MCP Server
The server runs via stdio and implements the MCP protocol:
Available Tools
render_markdown
Converts Markdown content to HTML with optional features:
search_notes
Intelligent search through content files:
search_by_tags
Find files by frontmatter tags:
search_by_date_range
Find files by modification date:
generate_table_of_contents
Extract and format headings as a table of contents:
extract_headings
Get structured heading information:
extract_frontmatter
Parse YAML frontmatter from Markdown:
get_directory_stats
Analyze directory content statistics:
find_content_files
Discover files with specific extensions:
read_content_file
Read and parse a single content file:
🏗 Project Structure
🧪 Development
Scripts
pnpm dev
- Development mode with watchpnpm build
- Build for productionpnpm start
- Run built serverpnpm lint
- Check code stylepnpm lint:fix
- Fix code style issuespnpm type-check
- TypeScript type checkingpnpm clean
- Clean build artifacts
Type Safety
This project leverages Zod for runtime validation combined with TypeScript for compile-time safety. All tool arguments are validated at runtime, ensuring robust error handling and type safety.
Error Handling
- Comprehensive error catching and reporting
- Zod validation errors with descriptive messages
- File system error handling
- Graceful degradation for malformed content
📝 Example Usage
Frontmatter Format
The server recognizes YAML frontmatter in Markdown files:
Search Examples
- Fuzzy search:
query: "typescript mcp"
(finds related content) - Exact search:
query: "exact phrase", fuzzy: false
- Tag search:
tags: ["typescript", "documentation"]
- Date search:
startDate: "2024-01-01", endDate: "2024-12-31"
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make changes and add tests
- Ensure types are correct:
pnpm type-check
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
Built with ❤️ using TypeScript, Zod, and the latest modern tooling for robust content management.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables comprehensive content management through Markdown processing, HTML rendering, intelligent fuzzy search, and document analysis. Supports frontmatter parsing, tag-based filtering, table of contents generation, and directory statistics for efficient content organization and discovery.