Skip to main content
Glama

markdown_mcp

A Model Context Protocol (MCP) server that combines:

  • Web → markdown — token-efficient fetching (web_outline, web_section, web_content, web_search)

  • TechFlow docs — search and browse embedded documentation (search_docs, get_doc, list_categories)

Everything runs from a single entry file: index.js.

Installation

git clone <repo-url>
cd markdown_mcp
npm install
npx playwright install chromium

Related MCP server: Web Fetch MCP Server

Usage

Point your MCP client at index.js (use an absolute path on your machine).

Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "markdown_mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/markdown_mcp/index.js"]
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "markdown_mcp": {
      "command": "node",
      "args": ["/path/to/markdown_mcp/index.js"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "markdown_mcp": {
      "command": "node",
      "args": ["/path/to/markdown_mcp/index.js"]
    }
  }
}

Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "markdown_mcp": {
      "command": "node",
      "args": ["/path/to/markdown_mcp/index.js"]
    }
  }
}

The web2md npm binary (if linked from this package) also runs index.js.

Available Tools

Web fetching

Tool

Description

web_outline

Get page structure with heading tree and token counts. Use this first. (~200 tokens)

web_section

Fetch specific section(s) by heading name. Supports partial matches.

web_content

Get full page as markdown with configurable token cap.

web_search

Search for a term within a page. Returns matching sections with context excerpts.

Documentation

Tool

Description

search_docs

Full-text search over embedded TechFlow documentation.

get_doc

Load a document by ID (e.g. DOC-001).

list_categories

List documentation categories and counts.

# Step 1: Get the outline (cheap, ~200 tokens)
web_outline url="https://docs.example.com/api"

# Step 2: Fetch only the sections you need
web_section url="https://docs.example.com/api" headings="Authentication"

# Step 3: Or search for a specific term
web_search url="https://docs.example.com/api" query="rate limit"

This tiered approach saves a large share of tokens compared to fetching full pages.

Features

  • Playwright rendering for JavaScript-heavy sites (SPAs)

  • Automatic fallback to simple fetch if Playwright fails

  • 24-hour local disk cache (~/.cache/web2md/)

  • External web content wrapped with security tags to reduce prompt-injection risk

  • Token estimation for web tool outputs

Requirements

  • Node.js 18+

  • Playwright Chromium (npx playwright install chromium)

About the maintainer

This project is maintained by Haider Manzoor. You can browse other public repositories and activity on their GitHub profile.

License

MIT

Available Tools

7 tools
get_docA

Retrieve a specific document by ID. Returns the full document content including headers, code examples, and metadata.

Inputs: doc_id (required).

list_categoriesB

List all documentation categories with document counts. Useful for browsing available documentation topics.

Inputs: no named parameters.

search_docsA

Search TechFlow engineering documentation. Returns matching documents ranked by relevance with titles, categories, and content snippets.

Inputs: query (required).

web_contentA

Get full page content as markdown. Automatically truncates to max_tokens. Use web_outline + web_section for better efficiency.

Inputs: url (required), render_js, max_tokens.

web_outlineA

Get the outline/structure of a webpage. Returns headings with estimated token counts. USE THIS FIRST to understand page structure before fetching content. Very cheap (~200 tokens output).

Inputs: url (required), render_js.

web_sectionA

Get specific section(s) of a webpage by heading name. Use after web_outline to fetch only what you need. Supports partial heading matches.

Inputs: url (required), headings (required), render_js.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    The web tools target the same page via distinct retrieval modes (outline, section, full content, in-page search), and the descriptions explicitly guide sequencing. The documentation tools are clearly separate, though web_content vs web_section still have some conceptual overlap.

    Naming Consistency3/5

    Naming is readable and grouped by domain, but conventions are mixed: web_section/web_content/web_outline are noun-style with a web_ prefix, while search_docs/get_doc/list_categories use verb_noun. web_search blurs the two patterns.

    Tool Count5/5

    Seven tools is well-scoped for a read-only web and documentation retrieval server. Each tool covers a distinct retrieval strategy or browse operation.

    Completeness4/5

    The surface covers web outline, section, full-page, and in-page search plus documentation search, retrieval, and category listing. A minor gap is that list_categories only shows counts, with no direct way to list document IDs within a category.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables token-efficient web page fetching by converting HTML to Markdown with tiered access (outline, section, search) to minimize LLM context usage.
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables reading web pages and PDFs as clean Markdown, extracting main content and letting agents query for relevant passages, outline sections, search in-page, and list links while respecting robots.txt and blocking private addresses.
      4
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Fetches web pages, JS-rendered sites, and PDFs — through the user's own Oxylabs or Bright Data key — and caches each as a compact Markdown outline with of section ids, so an agent can read just the one section it needs instead of the whole page. Also enables web search, link following, and local file reading, with per-fetch provider, cost, and token reporting.
      163
      Apache 2.0