agentleFS
japletejaplete/md-vision-mcp/AGENTS.md

md-vision-mcp

AGENTS.md1 starsChanged 6 months agoMITView on GitHub

stdio MCP server: read markdown with inlined images (read_md_with_images) and index headings across files or folders (index_md). For agentic RAG and documentation workflows. Implemented. Entry: src/server.ts → dist/server.js (md-vision bin). Tests: test/**/*.test.ts. User-facing install and examples: README.md. MCP authoring patterns: .agents/skills/build-mcp-server/. Node 20+, TypeScript, ESM (tsup). MCP SDK + zod. unified/remark (GFM, frontmatter). sharp, resvg, file-type, fast-glob. vitest, nock, tmp-promise. **read_md_with_images** — uri (local path or URL), optional section (exact heading text, e.g. ## Intro), optional line_range [start, end] (section…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,638 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run npm test after code changes.

    line 28
  2. Very specific:

    Use .js extensions in relative imports.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

MD Vision MCP server

stdio MCP server: read markdown with inlined images (read_md_with_images) and index headings across files or folders (index_md). For agentic RAG and documentation workflows.

Status

Implemented. Entry: src/server.ts → dist/server.js (md-vision bin). Tests: test/**/*.test.ts.

Layout

PathRole
src/server.tsMCP bootstrap, tool registration, stdio transport
src/tools/Tool handlers and zod input schemas
src/markdown/remark AST: parse, sections, line ranges, index rows
src/images/Image load, MIME sniff, sharp/resvg → PNG
src/io/URI fetch, path/domain allowlists
src/mcp/result.tsMCP content / error helpers

User-facing install and examples: README.md. MCP authoring patterns: .agents/skills/build-mcp-server/.

Stack

Node 20+, TypeScript, ESM (tsup). MCP SDK + zod. unified/remark (GFM, frontmatter). sharp, resvg, file-type, fast-glob. vitest, nock, tmp-promise.

Rules

  • Run npm test after code changes.
  • Use .js extensions in relative imports. No CommonJS.
  • stdio: never log to stdout; use console.error only.
  • .npmrc enforces 14-day release age for npm deps.

Tools (contract)

read_md_with_images — uri (local path or URL), optional section (exact heading text, e.g. ## Intro), optional line_range [start, end] (section when matched, else line_range), optional max_images (default 10, max 50). Returns text + image blocks; frontmatter preserved via remark-stringify.

index_md — uri (file, folder, or URL). Per file: frontmatter + TSV (heading, line_start, n_images, char_count) in <file path="..." lines=X chars=Y>. Headings inside fenced code are skipped (AST, not regex).

Images: markdown ![](...) and HTML <img src="...">; resolve relative to doc base; MIME via file-type then mime-types; raster → sharp PNG, SVG → resvg PNG.

Access

CLI: --allow-path and --allow-domain (both required, repeatable or =value). Server fails to start without at least one of each. --allow-domain=all allows any HTTP(S) host; --allow-domain=none disables URLs. Avoid bare * (shell glob).

Dev

npm test
npm run build
npx @modelcontextprotocol/inspector node dist/server.js --allow-path . --allow-domain all

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.