Get the FREE Ultimate OpenClaw Setup Guide →

go -mds

A Go implementation of a Model Context Protocol (MCP) server that serves markdown files with frontmatter support from a filesystem.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio warashi-go-mcp-server-mds docker run -i warashi/go-mcp-server-mds \
  --env MCP_MD_PATH="Directory containing Markdown files to serve (mounted into the container or provided at runtime)"

How to use

This MCP server exposes Markdown files from a filesystem through the Model Context Protocol. It scans a provided directory for Markdown documents, reads their content, and exposes metadata including any YAML or TOML frontmatter found at the top of each file. You can list all available Markdown documents and retrieve individual documents with their metadata and full content. Frontmatter support allows you to access metadata like title, date, and tags, enabling richer filtering and description of documents within MCP tooling. The server registers each Markdown file as a resource with a file:// URI, making it easy to reference documents in MCP clients and tooling.

How to install

Prerequisites:

  • Docker installed and running (recommended for the provided configuration).
  • Optional: Go toolchain if you prefer building locally from source (not required for the Docker approach).

Using Docker (recommended):

  1. Pull and run the MCP Markdown Server container: docker run -d --name warashi-mds -v /path/to/markdowns:/markdowns -e MCP_MD_PATH=/markdowns warashi/go-mcp-server-mds Note: Replace /path/to/markdowns with the directory containing your Markdown files. The container reads files from the path provided via the MCP_MD_PATH environment variable.
  2. Interact with the server using MCP tooling or by connecting to the container's exposed endpoints as defined by your MCP client.

Building from source (optional):

  1. Ensure Go is installed (https://golang.org/dl/).
  2. Clone the repository: git clone https://github.com/Warashi/go-mcp-server-mds.git
  3. Build the CLI/server binary (if available) and run according to the repository's instructions: go build ./... ./mcp-server-mds -path /path/to/markdowns

If you prefer the provided CLI directly, you can install the tool (as described in the README) and run it against a directory containing Markdown files.

Additional notes

Notes and tips:

  • Frontmatter support: The server can parse both YAML and TOML frontmatter at the top of Markdown files. Use YAML delimeters (---) or TOML delimeters (+++) at the start of your files. The parsed frontmatter is exposed as metadata for each resource.
  • Resource URIs: Each Markdown file is exposed as a resource with a file:// URI corresponding to its filesystem path. This allows MCP clients to reference and fetch content easily.
  • Performance: When serving large directories, consider mounting a specific subset of files to keep memory usage predictable.
  • Tools available: Use list_{server-name}markdown_files to enumerate all files with metadata, and read{server-name}_markdown_file to fetch a specific file along with its metadata and content.
  • Environment configuration: Use the MCP_MD_PATH (or equivalent) to point to the directory containing Markdown files. Adjust file permissions as needed to ensure the server can read the files.

Related MCP Servers

Sponsor this space

Reach thousands of developers