# ofershap/mcp-server-markdown [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/ofershap/mcp-server-markdown  
**GitHub Stars:** 8  
**npm Downloads (last month):** 394  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ofershap-mcp-server-markdown

## Description
Search, extract sections, list headings, and find code blocks across markdown files.

## Tools
Capabilities this server exposes over MCP:

- **list_files** — List all .md files in a directory recursively. Returns relative paths sorted alphabetically.
- **search_docs** — Full-text search across all .md files in a directory. Returns file, line number, and matching line. Limited to 50 results.
- **get_section** — Extract a section by heading from a markdown file. Returns content from that heading until the next heading of same or higher level.
- **list_headings** — List all headings (# through ######) in a markdown file as a table of contents.
- **find_code_blocks** — Find all fenced code blocks in a markdown file. Optionally filter by language (e.g. typescript, python).
- **get_frontmatter** — Parse YAML frontmatter (between --- delimiters) at the start of a markdown file. Returns key-value metadata.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-server-markdown": {
    "command": "npx",
    "args": ["-y","mcp-server-markdown"]
  }
}
```

## Documentation

## What the ofershap/mcp-server-markdown MCP server does

ofershap/mcp-server-markdown MCP server exposes tools for searching and navigating local Markdown documentation. It works with `.md` files on disk and can inspect an individual file or search recursively through a directory. The tool results are structured around Markdown concepts such as headings, sections, fenced code blocks, and YAML frontmatter.

Typical uses include locating references to a term across a documentation tree, retrieving a named section from a README, generating a table of contents from a file, finding examples written in a particular programming language, or reading metadata stored at the beginning of a Markdown document.

## How it works

The server is launched through npm with `npx mcp-server-markdown`. An MCP client starts the process and supplies directory or file paths when calling the tools.

`list_files` recursively finds `.md` files under a directory and returns relative paths in alphabetical order. `search_docs` performs a case-insensitive full-text search and returns the matching file, line number, and line; its result set is limited to 50 matches.

For file structure, `list_headings` returns headings from level one through level six as a table of contents. `get_section` accepts a heading and returns its content through the next heading at the same or a higher level. `find_code_blocks` detects fenced code blocks and can filter them by a language such as TypeScript or Python. `get_frontmatter` parses YAML metadata enclosed by `---` delimiters at the start of a file.

## Setup and configuration

The ofershap/mcp-server-markdown MCP server can be configured as a stdio process in supported clients. The basic command is:

```bash
npx mcp-server-markdown
```

Cursor and Claude Desktop configurations use `npx` with `-y` and `mcp-server-markdown` as the package argument. VS Code can use the same command and arguments in user settings or a workspace `.vscode/mcp.json` file. The repository also documents an Agent Plugin installation for Cursor: clone the repository and copy or symlink it to `~/.cursor/plugins/local/mcp-server-markdown`, then reload Cursor.

No environment variables or remote service credentials are documented as required. For local development, the repository instructions use `npm install`, `npm test`, and `npm run build` after cloning.

## Tools and capabilities

The six MCP tools are:

- `list_files`: recursively lists Markdown files.
- `search_docs`: searches all Markdown files in a directory, with up to 50 results.
- `get_section`: extracts a heading-defined section from one file.
- `list_headings`: produces a heading table of contents.
- `find_code_blocks`: finds fenced blocks, optionally by language.
- `get_frontmatter`: reads YAML frontmatter metadata.

These capabilities make the ofershap/mcp-server-markdown MCP server suitable for documentation assistants that need targeted retrieval from local content instead of treating every file as undifferentiated text.

_Full upstream README: https://allmcps.com/mcp/ofershap-mcp-server-markdown/readme_

