ZM

zcaceres/markdownify-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

2998 stars 255 forks 品質 81 トレンド 46MIT

ほぼあらゆるものをMarkdownに変換するためのモデルコンテキストプロトコルサーバー

概要

Markdownifyは、さまざまなファイル形式やウェブコンテンツをMarkdown形式に変換するモデルコンテキストプロトコル(MCP)サーバーです。PDF、画像、音声ファイル、ウェブページなどを、読みやすく共有可能なMarkdownテキストに変換するためのツールセットを提供します。 - 複数のファイル形式をMarkdownに変換:- PDF - 画像 - 音声(文字起こし付き) - DOCX - XLSX - PPTX - ウェブコンテンツをMarkdownに変換: - YouTube動画の文字起こし - Bing検索結果 - 一般的なウェブページ - 既存のMarkdownファイルの取得 1. このリポジトリをクローンする 2.依存関係をインストールする: 事前インストールステップで.venvでPythonの仮想環境が作成され、markitdown[all]をインストールします。 3. プロジェクト構築:4. サーバー開始: - bun run devを使ってTypeScriptコンパイラをウォッチモードで起動 - サーバー動作をカスタマイズするためにsrc/server.tsを修正 - src/toolsでツールを追加または変更する

概要(AI 翻訳)

Markdownifyは、さまざまなファイル形式やウェブコンテンツをMarkdown形式に変換するモデルコンテキストプロトコル(MCP)サーバーです。PDF、画像、音声ファイル、ウェブページなどを、読みやすく共有可能なMarkdownテキストに変換するためのツールセットを提供します。

特徴

  • 複数のファイル形式をMarkdownに変換する:
  • PDF
  • 画像
  • 音声(書き起こし付き)
  • DOCX
  • XLSX
  • PPTX
  • ウェブコンテンツのMarkdownへの変換:
  • YouTube動画トランスクリプト
  • Bing検索結果
  • 一般ウェブページ
  • 既存のMarkdownファイルの取得

始めて

  1. このリポジトリをクローンする
  2. 依存関係のインストール:

preinstallステップで.venvにPython仮想環境が作成され、markitdown[all]をインストールします。

  1. プロジェクトを構築する:

  2. サーバー開始:

開発

  • bun run dev を使って TypeScript コンパイラをウォッチモードで起動する
  • サーバーの動作をカスタマイズするためにsrc/server.tsを修正する
  • [src/tools.tsでツールを追加または修正すること

デスクトップアプリでの使用

このサーバーをデスクトップアプリと統合するには、アプリのサーバー構成に以下のものを追加してください:

環境変数

すべてのパスは適切な値にデフォルト設定されます。インストールレイアウトに合わない場合にのみオーバーライドします。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Markdownify MCP Server

Markdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format. It provides a set of tools to transform PDFs, images, audio files, web pages, and more into easily readable and shareable Markdown text.

Features

  • Convert multiple file types to Markdown:
    • PDF
    • Images
    • Audio (with transcription)
    • DOCX
    • XLSX
    • PPTX
  • Convert web content to Markdown:
    • YouTube video transcripts
    • Bing search results
    • General web pages
  • Retrieve existing Markdown files

Getting Started

  1. Clone this repository

  2. Install dependencies:

    bun install
    

    The preinstall step creates a Python virtual environment at .venv and installs markitdown[all].

  3. Build the project:

    bun run build
    
  4. Start the server:

    bun start
    

Development

  • Use bun run dev to start the TypeScript compiler in watch mode
  • Modify src/server.ts to customize server behavior
  • Add or modify tools in src/tools.ts

Usage with Desktop App

To integrate this server with a desktop app, add the following to your app’s server configuration:

{
  "mcpServers": {
    "markdownify": {
      "command": "node",
      "args": [
        "{ABSOLUTE PATH TO FILE HERE}/dist/index.js"
      ]
    }
  }
}

Environment variables

All paths default to sensible values; override only when the defaults don’t fit your install layout.

Variable Default Purpose
MARKITDOWN_PATH /.venv/bin/markitdown, then markitdown on PATH Absolute path to the markitdown executable. Set this when you’ve installed markitdown system-wide (e.g. pipx install "markitdown[pdf]") instead of using the bundled venv.
REPOMIX_PATH /node_modules/.bin/repomix, then repomix on PATH Absolute path to the repomix executable used by git-repo-to-markdown.
MD_ALLOWED_PATHS unset (unrestricted) Path-delimiter-separated list (: on POSIX, ; on Windows) of directories the server is allowed to read. When set, all file-input tools (pdf-to-markdown, get-markdown-file, etc.) reject paths outside these directories.
MD_SHARE_DIR unset Deprecated alias for MD_ALLOWED_PATHS (single directory). Still honored for backward compatibility.

Usage with Docker

Build and run:

docker build -t markdownify-mcp .
docker run --rm -i \
  -v "$HOME/Documents:/data:ro" \
  -e MD_ALLOWED_PATHS=/data \
  markdownify-mcp

Notes for the Docker MCP catalog (mcp/markdownify):

  • Mount any host directories you want the server to read into the container, then pass the container paths to the tools (e.g. /data/foo.pdf, not /Users/you/Documents/foo.pdf).
GitHub で README 全文を見る

インストール

docker run --rm -i \
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "markdownify": { "command": "node", "args": [ "{ABSOLUTE PATH TO FILE HERE}/dist/index.js" ] } } }