
md-vision
io.github.japletePublished by GitHub account japletev0.2.1Updated Oct 24, 2026
Read markdown with inlined images and index headings for agentic RAG workflows.
Overview
Read-only stdio MCP server that lets an assistant index markdown headings and read markdown with referenced images inlined as image blocks.
- What you can do
- Index headings: build a compact heading index for a markdown file, URL or folder, with frontmatter, line starts, image counts and character counts.
- Read markdown with images: return a document as alternating text and image blocks, optionally limited to one section or a line range.
- Navigate documents: index first, then read only the sections needed for targeted retrieval.
- When to use it
- Useful when an assistant works over markdown documentation that contains diagrams or screenshots and needs to see the images without one tool call per image. Also fits agentic RAG setups that want a heading index before targeted reads.
- Requirements
- Runs locally via npx from the npm package md-vision; needs Node.js 20 or newer. At least one --allow-path directory and one --allow-domain value (all, none, or specific hosts) must be passed as arguments or the server exits on startup. Restart the MCP host after changing configuration.
Installation
In SourceWeft
- Open md-vision in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
md-vision MCP server
stdio MCP server with two read-only tools for agentic RAG over markdown documentation:
- read_md_with_images — return markdown with referenced images as interleaved image blocks. Avoids an extra tool call for each image to read. Optionally scoped to a specific section or line range.
- index_md — return a compact heading index for a file, URL, or folder of markdown files. Used to dynamically index files for targeted reads.
Typical flow: call index_md to discover headings and structure, then read_md_with_images on the sections you need.
Install: MCP client configuration
Published package: md-vision on npm
In your agent config (.agents/mcp.json or similar), point your MCP host at the server. Example:
With remote markdown (allow all HTTP(S) hosts, or list specific domains):
The server exits on startup if --allow-path or --allow-domain is omitted.
Restart the MCP host after changing configuration.
Restricting allowed paths and domains
Equivalent forms: --allow-path=/path, --allow-domain=host.example, --allow-domain=all, --allow-domain=none.
Do not pass a bare * as a separate shell argument — the shell expands it to filenames in the current directory. Use all or --allow-domain=all instead.
Requirements
- Node.js 20+
Tools
read_md_with_images
Read a markdown file and inline referenced images as MCP image content.
Returns: MCP content array — alternating text and image blocks (PNG, base64) in document order; frontmatter preserved in the leading text. Before each inlined image, a short text block carries the resolved image URL (omitted for data: URIs and other long references). Images beyond max_images stay as markdown image syntax in text.
URI forms: local filesystem paths and http(s):// URLs. Local paths must fall under a configured --allow-path directory. Relative image paths resolve against the markdown file location or document URL. Images may use markdown  syntax or HTML <img src="..."> tags.
index_md
Index headings for navigation before targeted reads.
Returns: Markdown string. For each file:
- YAML frontmatter when present.
- A fenced
tsvcode block with columns:heading,line_start,n_images,char_count.
Each file is wrapped in:
Folder uri values are scanned recursively for *.md / *.markdown in stable sorted order. Headings inside fenced code blocks are not indexed.
Note on deploying agents with this MCP server
stdio MCP servers run as subprocesses of the agent runtime that invokes them. There are two deployment patterns commonly used:
- Agent-in-sandbox (runtime shares the agent’s filesystem): the server can read docs in-place; scope
--allow-pathto the documentation tree you intend to expose. - Sandbox-as-tool (runtime filesystem differs from the tool sandbox): the MCP process usually runs in the runtime environment, so markdown must be copied or synced where the server can read it.
Benchmark (WIP)
See benchmark/ for the MMLongBench-Doc A/B harness comparing
filesystem-only agentic RAG against the same agent with md-vision MCP tools.
Standalone indexing
md-vision can also be used as a library when you want to index markdown outside an MCP host — for example in an offline preprocessing pipeline for agentic RAG.
Install the package:
Index markdown text
Use indexMarkdownText when you already have markdown content in memory.
Example result:
Index a file
Use indexMarkdownFile to load and index a local markdown file.
Index a folder
Use indexMarkdownFolder to recursively index *.md and *.markdown files in stable sorted order.
Output shape
Each indexed file returns structured data:
Headings inside fenced code blocks are ignored because indexing uses the markdown AST rather than regex matching.
Source: README.md at commit 4445673
Tools
0Version history
1- v0.2.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts