Logo di md-anything

md-anything

Community
ojspace

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

Autoreojspace
Repositorymd-anything
LinguaTypeScript
Fork
5
Stelle
49
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    md-anything mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    49 stelle e 5 fork nel repository collegato.

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

Installazione

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

Usa MCP md-anything con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso md-anything, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi md-anything come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di md-anything.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "md-anything": {
      "command": "npx",
      "args": [
        "-y",
        "md-anything"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di md-anything, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di md-anything.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare md-anything per aiutarmi con questa attività?
md-anything
Certo. Ho letto.
Ecco cosa ho trovato con md-anything.

Domande frequenti

A cosa serve il server MCP md-anything?

md-anything è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare md-anything MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare md-anything con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP md-anything con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando md-anything, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego md-anything MCP a TypingMind?

md-anything funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre md-anything MCP in TypingMind?

md-anything mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare md-anything MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se md-anything richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇