go -mds
A Go implementation of a Model Context Protocol (MCP) server that serves markdown files with frontmatter support from a filesystem.
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):
- 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.
- 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):
- Ensure Go is installed (https://golang.org/dl/).
- Clone the repository: git clone https://github.com/Warashi/go-mcp-server-mds.git
- 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
sandbox
A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
mcp-auth-proxy
MCP Auth Proxy is a secure OAuth 2.1 authentication proxy for Model Context Protocol (MCP) servers
github-brain
An experimental GitHub MCP server with local database.
chromedp
MCP server for browser automation using chromedp
mcp -pipecd
An MCP Server for PipeCD
go -example
An idiomatic, minimal example of building an MCP (Model Context Protocol) server in Go, complete with essential tooling for developing Go-based microservices.