mcp-tools Format Conversion
Provides tools for the Brave Search API, enabling web, news, image, video, and place searches, as well as LLM-oriented results.
mcp-tools
A ready-to-use MCP toolkit that gives AI agents practical local capabilities: document OCR, speech recognition, speaker diarization, image understanding, document conversion, and browser-based web access. An optional Brave Search launcher adds API-backed search.
Built for developers running MCP clients on Linux or WSL2, mcp-tools provides
seven stdio server entry points, 33 repository-owned tools, reproducible uv
environments, and one repository-relative launcher. Start with a CPU-only MCP
round trip; add the CUDA or external-service profiles you actually need.
OCR · ASR · diarization · vision · PDF/SVG conversion · browser fetch · web search
Quick start · Capabilities · Client setup · Examples · Contributing
Why this project exists
Giving an agent useful local media and document abilities often means operating several unrelated runtimes: one for OCR, another for speech, a browser process, a document renderer, and a vision backend. This repository keeps those services behind the same MCP stdio interface while preserving separate, locked runtime profiles where their dependencies conflict.
The local inference services communicate with loopback backends and do not send input documents, audio, or images to a hosted inference API. Model downloads, Browser Fetch targets, and Brave Search still use the network. Model weights and browser binaries are not stored in Git.
Related MCP server: go-docs-mcp
Capabilities
Capability | MCP tools | What it does | Execution and requirements |
Document and image conversion |
| Checks actual PDF files and chapter locations before rendering Markdown/HTML, extracts PDF text, polishes portable reports, or rasterizes SVG | Local CPU; Chromium is the default PDF renderer; inspection, text extraction, and SVG need neither a browser nor CUDA |
Model architecture diagrams |
| Creates editable SVGs with semantic colors, measured text/math, explicit layout constraints, obstacle routing, and geometry checks | Local CPU; Chromium, fontconfig/Noto fonts, shared MathJax, and component-local ELK runtime |
Browser fetch |
| Renders JavaScript-heavy pages and returns Markdown, text, HTML, or PNG | Local Chrome/Chromium process plus network access to the target site |
Document OCR |
| Converts images and scanned PDFs into ordered Markdown artifacts through a durable job queue | Local NVIDIA GPU; current backend is PP-DocLayoutV3 plus PaddleOCR-VL-1.6 |
Speech recognition |
| Transcribes common audio formats and automatically chunks long recordings | Local NVIDIA GPU; selectable Qwen3-ASR-1.7B default or bounded 0.6B profile, plus system FFmpeg |
Speaker-aware transcription |
| Produces speaker-attributed, timestamped text or a transcript plus separate speaker timeline | Local NVIDIA GPU; |
Image understanding |
| Answers visual questions, reads visible text, and analyzes charts | Local NVIDIA GPU; repository-local CUDA llama.cpp build and user-provided GGUF/projector files |
Resumable image audit |
| Runs structured single-image checks and resumable labeled-directory audits | Same local Vision runtime; outputs JSONL, JSON, CSV, and progress artifacts |
Web search | Upstream Brave Search MCP tools | Searches web, news, images, video, places, and LLM-oriented results | External Brave Search API; Node.js, |
The standalone asr-pipeline CLI exposes the same
long-audio transcription, diarization, timestamping, and merge stages used by
transcribe_diarized.
The optional PDF Local Links VS Code extension is a local
fork of vscode-pdf. It opens PDF and other local file references in VS Code,
including cross-repository files in the same WSL connection. It has its own
Node build and VSIX package and is not an MCP server or a Python dependency.
Quick start
The shortest reliable path exercises a real server through MCP without CUDA, a browser, an API key, or committed binary fixtures. It requires Linux x86-64 or WSL2, Git, and uv.
git clone https://github.com/lanxiukai/mcp-tools.git
cd mcp-tools
# Restore the locked Python 3.12 CPU environment.
uv sync --project environments/mcp-local --locked
# Inspect installed runtimes and optional model-backed capabilities.
bin/mcp-tools doctor
# Create a temporary PDF, call pdf_to_text over MCP stdio, and verify the result.
environments/mcp-local/.venv/bin/python examples/pdf_to_text_demo.pySuccessful output ends with:
Connected tools: inspect_pdf_links, resolve_pdf_destination, markdown_to_pdf, html_to_pdf, svg_to_png, pdf_to_text
Extracted text: Hello from mcp-tools over MCP stdio.
MCP round trip: OKThe demo removes its temporary files. See examples/ for
its implementation.
Connect the first server
Every service is launched through bin/mcp-tools, so client configuration needs
one executable path plus a stable service argument instead of a separate Python
and script path for each component.
For Codex CLI, run this from the repository root:
codex mcp add mcp-tools-format -- "$(pwd)/bin/mcp-tools" format-conversion
codex mcp listThen ask the client:
Extract the embedded text from
/absolute/path/to/report.pdfwithpdf_to_text.
For Claude Desktop, Cursor, VS Code, OpenCode, and generic clients, see the
copy-pasteable configurations in
docs/client-configuration.md.
Installation profiles
install.sh restores locked environments; it does not use the Linux
distribution Python. Run it from the repository root.
Profile | Command | Includes | Additional requirements |
Shared CPU |
| Format Conversion, SVG Diagram, Browser Fetch, and the lightweight Vision Local MCP frontend | Cairo/Pango, Node.js/npm, Playwright Chromium, browser system libraries, and fonts for the complete feature set |
ASR |
| Qwen3-ASR and the ASR Pipeline | NVIDIA GPU, compatible CUDA driver, system FFmpeg, model download access |
OCR |
| PaddleOCR-VL recognition and PP-DocLayoutV3 layout | NVIDIA GPU, compatible CUDA driver, model download access |
All Python profiles |
| CPU, ASR, and OCR profiles | All requirements above; this can download several gigabytes |
Two capabilities need separate provisioning:
Vision Local backend:
bash install.sh --cpu-onlyinstalls only the MCP frontend. Build the pinned CUDA llama.cpp server withbash vision-local/install_runtime.sh, provide the documented model and projector files, and verify them withvision_status. Seevision-local/README.md.Brave Websearch: no Python profile is needed. Install Node.js 22 or newer, set
BRAVE_API_KEYin the MCP client's environment, and launchbin/mcp-tools brave-websearch.
The default ASR 1.7B and Vision 9B configurations are 12 GiB reference
profiles and are not advertised as 8 GB-compatible. Dedicated 8gb profiles
use ASR 0.6B and Vision 4B with bounded runtime settings; real sequential tests
observed conservative maxima of 4658 MiB and 5518 MiB across two sequential
whole-device runs under an 8000 MiB ceiling.
The repository does not currently provide Docker images, non-NVIDIA GPU
profiles, or a macOS Python lock target.
MCP client setup
The launcher accepts one of these stable server names:
Server name | Runtime profile | MCP entry point |
|
| Markdown/HTML/PDF/SVG tools |
|
| Editable model diagrams, math, and geometry checks |
|
| Rendered page tools |
|
| ASR and diarization tools |
|
| Durable OCR tools |
|
| Vision and batch tools |
| Node.js / upstream package | Brave Search tools |
The transport is standard MCP stdio. A generic command-based client entry is:
{
"mcpServers": {
"mcp-tools-format": {
"command": "/absolute/path/to/mcp-tools/bin/mcp-tools",
"args": ["format-conversion"]
}
}
}Use absolute paths: desktop clients commonly start servers from a different
working directory. Put secrets in the client's environment settings rather
than in tracked configuration. Detailed configurations and client-specific
file locations are in
docs/client-configuration.md.
Real-world workflows
Extract text from a scanned PDF
User request:
Extract the text from this scanned PDF and summarize it.
Recommended routing:
Call
pdf_to_textfirst because born-digital PDFs are faster and more accurate to extract directly.If the result is empty or loses required layout, call
ocr_document.Read the returned Markdown artifact paths, then summarize their contents.
For a large scan, use ocr_submit, poll with ocr_status, and wait in bounded
windows with ocr_wait.
Transcribe a meeting and identify speakers
User request:
Transcribe this meeting recording, identify the speakers, and keep word timestamps.
Call transcribe_diarized. It runs preprocessing, pyannote diarization,
timestamped Qwen3-ASR transcription, and speaker/text merging. HF_TOKEN is
required. Use transcribe_audio when speaker identity is not needed.
Convert Markdown into a readable PDF
User request:
Convert this Markdown report into a polished PDF using the print theme.
Call markdown_to_pdf with theme="print". Chromium is the default renderer;
engine="weasyprint" is available for simpler documents. The tool returns the
output path and file size.
Rasterize an SVG safely
User request:
Convert this SVG diagram to a 1600-pixel-wide PNG.
Call svg_to_png with output_width=1600. The CPU-only converter preserves
the aspect ratio when only one dimension is supplied, blocks external file and
network resources, bounds the requested canvas, and atomically publishes a
validated PNG.
Create a model architecture diagram
Call create_diagram(template="stylegan2", output_path="/absolute/path/model.svg")
for an editable diagram, compact findings, and an inline preview. Use
update_diagram with ID-based changes and the returned revision to revise it.
render_diagram remains available for custom specs. The SVG Diagram guide
explains mixed text/math labels, semantic themes, ports, groups, and layout.
A stdio demo renders three complete examples.
Read a JavaScript-rendered page
User request:
Fetch this page after JavaScript renders and return the article as Markdown.
Call fetch_page. It tries nodriver first and falls back to Playwright. Use
cookies or a proxy only when you are authorized to access the target content.
Architecture
flowchart LR
Client[MCP client] --> Launcher[bin/mcp-tools]
Launcher --> Diagram["SVG Diagram<br/>stdio / CPU"]
Launcher --> Format["Format Conversion<br/>stdio / CPU"]
Launcher --> Browser["Browser Fetch<br/>stdio / local browser"]
Launcher --> ASR[ASR stdio]
Launcher --> OCR[OCR stdio]
Launcher --> Vision[Vision stdio]
Launcher --> Brave[Brave upstream stdio]
ASR --> ASRAPI["Loopback FastAPI<br/>Qwen3-ASR / CUDA"]
OCR --> OCRAPI["Loopback FastAPI<br/>PaddleOCR-VL / CUDA"]
Vision --> Llama["Loopback llama.cpp<br/>GGUF vision / CUDA"]
Brave --> BraveAPI[Brave Search API]ASR and OCR automatically manage their loopback backends. On a 12 GiB GPU they stop competing resident services before loading another model. Vision uses an independent pinned llama.cpp build and three runtime profiles. Keep all heavyweight GPU workloads serialized on limited-VRAM machines. The 8 GB GPU integration harness refuses to start when a heavyweight service port is active and waits for memory release between ASR and Vision. Deliberate overlap tests require an explicit budget above 8000 MiB and are not authorized by the 8 GB profile switch.
Configuration
All variables are optional unless the requirement column says otherwise. Set them in the MCP client process environment.
Variable | Required | Purpose and example |
| For speaker diarization | Hugging Face token with accepted pyannote model access; use |
| For Brave Websearch | Brave Search API credential; use |
| No | Shared OCR/Vision local model root; defaults to |
| No | Loopback ASR backend address; defaults to |
| No |
|
| No | Explicit local model or Hub ID; custom weights are outside the recorded 8 GB result |
| No | Seconds before the ASR backend releases the GPU; default |
| No | MCP startup error log path; default |
| No | Loopback OCR backend address; defaults to |
| No | Replace the OCR model ID/path or its local search root; otherwise use |
| No | Explicit PP-DocLayoutV3 directory; otherwise use configured model roots or the PaddleX managed cache |
| No | Durable queue and artifact directory; defaults below |
| No | Completed artifact retention; default |
| No | Set |
| If the default build is absent | llama.cpp server path; for example |
| If the default model is absent | Interactive GGUF model path; for example |
| If the default projector is absent | Interactive vision projector path; for example |
| No | Root containing the Vision model directories used by all profiles; defaults to |
| No |
|
| No | Interactive loopback port; default |
| For non-default bounded paths/settings | 8 GB model, projector, port, context, GPU-layer, batch, timeout, and log variables; bounded port defaults to |
| For non-default batch paths/settings | Batch equivalents of model, projector, port, context, timeout, and log variables; batch port defaults to |
| No | Timeout shown by |
| No | Mode shown by |
| No | Override the browser user agent |
| No | Default PNG output directory; default |
| No |
|
| No | Override the pinned local MathJax Node entry point |
Backend tuning variables are documented in
ocr/README.md,
vision-local/README.md,
browser-fetch/README.md, and
the launcher header in brave-websearch/run.sh.
Troubleshooting
Symptom | Check |
Launcher reports a missing interpreter | Restore the named profile with |
Client shows no tools | Use an absolute launcher path, run |
CPU demo hangs only inside a restricted sandbox | Allow local process/stdio IPC or run the demo in the host terminal; the server itself does not need network access for this demo |
CUDA is unavailable | Run |
A model cannot be loaded | Check the documented model path, free disk space, download access, and whether a partial snapshot is being mistaken for a complete one |
Diarization reports authentication failure | Accept the pyannote model terms and pass |
Browser launch fails | Run the CPU installer or |
| The PDF is probably scanned or image-only; use |
Vision reports missing artifacts | Run |
OCR or ASR stops when the other starts | This is intentional shared-GPU exclusion for the reference 12 GiB setup; check the component status tool before retrying |
Documentation
Document | Use it for |
Claude Desktop, Cursor, VS Code, Codex, OpenCode, and generic stdio configuration | |
Tool parameters, return shapes, and deeper runtime notes | |
Manual calls, smoke tests, and test fixtures | |
Risk tiers, per-tool hardening coverage, stress results, defects, and tested platform scope | |
Locked uv profiles and profile-specific test commands | |
ASR formats, model resolution, REST backend, and troubleshooting | |
OCR queue, artifacts, backend configuration, and model switching | |
CUDA llama.cpp build, model profiles, and batch audit artifacts | |
PDF engines, clickable web and cross-repository file links, SVG rasterization, safety limits, themes, fonts, and CLI usage | |
Browser engines, cookies, proxies, and site-specific limitations | |
Private vulnerability reporting and supported versions | |
Version history |
Historical hardware measurements and fixture-specific verification reports live
under docs/. Treat them as dated evidence for their stated hardware,
not universal benchmarks.
Contributing
See CONTRIBUTING.md for profile setup, tests, linting,
adding an MCP tool, and the pull-request checklist. Bug reports and feature
requests have guided forms under .github/ISSUE_TEMPLATE/.
Run the normal CPU-safe contributor gate with scripts/check.sh. It covers
Ruff, shell syntax, CPU tests, all six repository-owned MCP frontends, the
PDF-to-text example, documentation links, GitHub YAML, diagnostics, and
whitespace checks. GitHub Actions runs this gate on both ubuntu-22.04 and
ubuntu-24.04; GPU integration remains opt-in and local.
Good contribution entry points include:
add a protocol-level test for one existing stdio server (
good first issue);improve a component's actionable error messages (
good first issue);add a repo-owned Vision model download helper (
help wanted);validate and document another Linux NVIDIA GPU/driver combination (
help wanted);design a CPU or non-NVIDIA backend without changing the stable MCP tool names (
help wanted).
Roadmap
These are planned ideas, not current features:
add an optional, license-aware Vision model download helper;
add tested CPU or non-NVIDIA alternatives for selected inference services;
publish profile-specific containers only after GPU and artifact persistence behavior can be tested reproducibly;
add portable client-config generation and validation.
License
Repository source and documentation are licensed under the MIT License. Runtime dependencies and downloaded models retain their own licenses and usage terms; review them before redistribution.
This server cannot be deployed
Maintenance
Related MCP Connectors
Privacy-first PDF tools over MCP: merge, split, rotate, delete, compress, protect, inspect.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Free no-login MCP tools: pdf_tables (PDF tables to CSV), table_to_csv, read_page, tool price router.
MCP tools for AI agents: render URLs to image/PDF, check link health, convert HTML/CSV/JSON.
Related MCP Servers
- AlicenseAqualityAmaintenancePDF extraction that actually works. The only extractor that audits every page. #2 on opendataloader-bench. 5 MCP tools for AI agents: metadata, convert, analyze, batch, structured extraction.7166 PyPI84MIT
- AlicenseAqualityBmaintenanceGo MCP server for multi-format document access — PDF, TXT, MD, DOCX, CSV, images. 12 tools including OCR, search, table extraction, and URL fetch. Single binary, no runtime.1311MIT
- AlicenseNot gradedqualityBmaintenanceA local MCP server for intelligent PDF management that converts papers to markdown and enables hybrid grep and semantic search, allowing token-efficient exploration of academic documents.6MIT
- AlicenseNot gradedqualityCmaintenanceIt enables AI agents and MCP clients to read, fill, create, export, and reconstruct fillable PDF forms, plus extract, search, and edit text and layout blocks, entirely against local files over stdio.Apache 2.0