md-anything logo

md-anything

Community
ojspace

Local-first CLI + MCP server: Any file → AI-ready Markdown + JSON

Publisherojspace
Repositorymd-anything
LanguageTypeScript
Forks
5
Stars
49
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    md-anything exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    49 stars and 5 forks from the linked repository.

md-anything

Convert files, URLs, and media into honest Markdown for terminal workflows and MCP-powered agents.

md-anything currently ships two surfaces:

  • a local-first CLI: mda
  • a stdio MCP server: md-anything-mcp

npm version npm downloads CI GitHub stars License: MIT

Install

bash
curl -fsSL https://raw.githubusercontent.com/ojspace/md-anything/main/install.sh | bash

Or install globally with Bun or npm:

bash
bun install -g md-anything
npm install -g md-anything

Quick sanity check:

bash
mda --help
mda doctor

Quick start

bash
# Convert one file or URL
mda tests/fixtures/sample.txt
mda convert report.pdf
mda convert "https://example.com/article"

# Batch-convert a folder
mda ingest ./notes -o ./output -r

# Check optional tool availability
mda doctor

# Copy-paste examples
mda examples
mda demo

What is supported

md-anything uses three support levels:

  • strong: works well out of the box
  • best-effort: useful, but quality depends on content and local tools
  • optional: requires extra tools or an opt-in remote fallback
InputSupportNotes
.txt, .md, .markdown, .json, .html, .htmstrongNative or straightforward extraction
http:// / https:// URLsstrongFetch + HTML extraction
.pdfstrongunpdf by default, pdftotext can improve some files
YouTube URLsbest-effortTranscript-first, honest fallback when unavailable
Images (.png, .jpg, .webp, .gif, etc.)best-effortMetadata-only by default, OCR with tesseract, richer remote fallback via OpenRouter
.epubbest-effortExtraction depends on unzip; doctor will tell you if it is missing
.mobi, .azwbest-effortRequires Calibre ebook-convert
Audio (.mp3, .wav, etc.)optionalLocal whisper-cpp or whisper, optional OpenRouter fallback
Video (.mp4, .mov, etc.)optionalRequires ffmpeg plus whisper-cpp / whisper, optional OpenRouter fallback

CLI reference

bash
# Single input
mda <input>
mda convert <input>

# Write Markdown to a file
mda convert report.pdf -o report.md

# Omit frontmatter
mda convert report.pdf --no-frontmatter

# Machine-readable JSON
mda convert report.pdf --json

# Batch-convert a folder
mda ingest ./notes
mda ingest ./notes -o ./output
mda ingest ./vault -r -o ./output

# Environment/capability checks
mda doctor

# Help and examples
mda --help
mda examples
mda demo

Flags

FlagDescription
-o, --output <path>Output file for convert or output directory for ingest
--no-frontmatterOmit YAML frontmatter from generated Markdown
--jsonReturn machine-readable JSON instead of Markdown
-r, --recursiveRecurse into subdirectories during ingest
-h, --helpShow help

JSON output

convert --json returns a stable machine-readable envelope:

bash
mda convert report.pdf --json
json
{
  "input": "report.pdf",
  "markdown": "# Report Title\n...",
  "kind": "pdf",
  "supportLevel": "strong",
  "chunks": [],
  "metadata": {
    "extraction": "unpdf",
    "extraction_status": "ok",
    "support_level": "strong",
    "usefulness_score": 0.85
  },
  "provenance": {
    "documentId": "..."
  },
  "warnings": []
}

ingest --json returns counts plus per-document metadata:

bash
mda ingest ./notes --json
json
{
  "converted": 12,
  "skipped": 2,
  "failed": 0,
  "docs": [
    {
      "fileName": "note.md",
      "title": "My Note",
      "summary": "This is a summary of the note.",
      "sourceType": "pdf",
      "source": "report.pdf",
      "chunks": [],
      "metadata": {
        "extraction_status": "ok"
      },
      "provenance": {
        "documentId": "..."
      }
    }
  ]
}

Argument errors stay machine-readable too:

json
{
  "error": "Missing input for convert command.",
  "code": "missing_input",
  "examples": [
    "mda convert tests/fixtures/sample.txt",
    "mda convert \"https://example.com/article\""
  ]
}

MCP server

One-command setup

bash
mda mcp install claude        # Claude Desktop
mda mcp install claude-code   # Claude Code CLI
mda mcp install cursor        # Cursor
mda mcp install windsurf      # Windsurf
mda mcp install vscode        # VS Code + GitHub Copilot (writes .vscode/mcp.json)
mda mcp install antigravity   # Antigravity (writes .vscode/mcp.json)
mda mcp install opencode      # OpenCode

Restart the client after install. For VS Code, open Command Palette → MCP: List Servers to verify.

Requires Bun in PATH. Install globally with bun install -g md-anything so md-anything-mcp is available. If you used install.sh, only the mda binary is installed — use bunx md-anything-mcp in manual configs below.

Manual config

Claude Desktop / Claude Code / Cursor / Windsurf / OpenCode (mcpServers format):

json
{
  "mcpServers": {
    "md-anything": {
      "command": "md-anything-mcp"
    }
  }
}

Config file locations:

ClientConfig path
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Linux)~/.config/Claude/claude_desktop_config.json
Claude Code~/.claude/settings.json
Cursor~/.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
OpenCode~/.config/opencode/config.json

VS Code / GitHub Copilot / Antigravity — create .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "md-anything": {
      "type": "stdio",
      "command": "md-anything-mcp"
    }
  }
}

Using bunx instead of a global install:

json
{
  "mcpServers": {
    "md-anything": {
      "command": "bunx",
      "args": ["md-anything-mcp"]
    }
  }
}

Tools

ToolDescription
convertConvert a workspace file or safe remote URL to Markdown
ingestBatch-convert a workspace folder
doctorReport current capabilities and optional upgrades

The server also exposes resources (md-anything://doctor, md-anything://workspace/{path}) and prompts (analyze_document, summarize_document_chunks).

MCP safety rules

  • local paths must stay inside the current workspace root
  • only http:// and https:// URLs are allowed
  • private, localhost, and link-local URLs are blocked by default
  • set MDA_MCP_ALLOW_PRIVATE_URLS=1 to override (use with caution)

Optional local and remote upgrades

The default install stays lightweight. No models are bundled, and cloud fallbacks are opt-in.

Install only what you need:

bash
brew install poppler         # pdftotext for stronger PDF extraction
brew install tesseract       # OCR for images
brew install --cask calibre  # ebook-convert for MOBI/AZW
brew install ffmpeg          # media extraction for video/audio workflows
brew install whisper-cpp     # local transcription (preferred)
whisper-cpp --download-model base.en

Also supported:

  • unzip for EPUB extraction
  • whisper (pip install openai-whisper) as a transcription fallback
  • OPENROUTER_API_KEY as an opt-in remote fallback for image, audio, and video workflows

Use mda doctor to see exactly what your machine can do right now.

Vision

The goal is for md-anything to become the default open-source layer for document ingestion in agent pipelines — local-first, format-agnostic, and honest about what it can and can't extract. No SaaS lock-in, no cloud required for core workflows.

Roadmap directions: DOCX/PPTX support, streaming output, semantic chunking, watch mode, Python/Go SDK wrappers.

Why it is built this way

  • Local-first by default: core workflows work without cloud APIs
  • Graceful fallback: weak extraction still returns honest Markdown instead of a hard failure
  • Agent-ready: CLI JSON output, chunk/provenance metadata, and an MCP server all share the same core pipeline
  • Lightweight: optional tools upgrade specific formats without turning the base install into a heavyweight bundle

Development

bash
git clone https://github.com/ojspace/md-anything
cd md-anything
bun install

Validate changes with:

bash
bun run lint
bun run build
bun run test:required

Other useful commands:

bash
bun test
bun run test
bun run test:fixtures
bun run src/cli.ts doctor

Project layout

text
src/
  cli.ts            CLI entry point
  mcp.ts            MCP stdio server
  mcp-support.ts    MCP path/url guardrails and structured content helpers
  core/             shared conversion, ingest, runtime, chunks, usefulness
  providers/        one provider per input kind
  formatters/       final Markdown rendering
tests/
  unit/
  integration/
  fixtures/
  generated-fixtures/

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "md-anything": {
      "command": "md-anything-mcp",
      "args": []
    }
  }
}

Use md-anything MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once md-anything is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add md-anything as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the md-anything MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "md-anything": {
      "command": "npx",
      "args": [
        "-y",
        "md-anything"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the md-anything MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the md-anything MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use md-anything to help me with this task?
md-anything
Sure. I read it.
Here is what I found using md-anything.

Frequently asked questions

What is the md-anything MCP server used for?

md-anything is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use md-anything MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use md-anything with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use md-anything MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With md-anything connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect md-anything MCP to TypingMind?

md-anything runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does md-anything MCP provide in TypingMind?

md-anything exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use md-anything MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If md-anything requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇