← Back to directory
X

Xberg

Official
Polyglot document intelligence engine for extracting text, tables, metadata, and structured data from 101 formats and code from 371 languages.
GitHub source repository ↗
★ 9.2k Stars Category · Filesystem Very popular Source revision e598e83ee266
58FMRS · C
Reliability
8/20
Security and permissions
12/20
Maintenance
16/20
Documentation
12/20
Setup experience
10/20

Suitable for users who need to extract information from diverse documents and code, offering rich features and multiple integration options.

Read the FMRS scoring method →

Xberg is a Rust-core document intelligence framework supporting extraction of text, tables, metadata, and images from 101 formats (115 file extensions) plus code intelligence for 371 programming languages. It offers 15 language bindings (Rust, Python, Node.js, Go, Java, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, WASM, Kotlin, C FFI) with CLI, REST API, and MCP server interfaces. The MCP server provides 9 tools (extract, extract_batch, detect_mime_type, cache_stats, list_formats, cache_clear, get_version, cache_manifest, cache_warm), 3 prompts (extract_document, extract_with_ocr, semantic_search), and 4 resources (formats, models, OCR languages, embedding presets).

Tools

extract
Extract text, tables, metadata, and images from a single document.
extract_batch
Extract content from multiple documents in parallel.
detect_mime_type
Detect MIME type of a file.
cache_stats
Show statistics for the extraction cache.
list_formats
List all supported file formats and MIME types.
cache_clear
Clear the extraction cache.
get_version
Get version information for Xberg.
cache_manifest
View the cache manifest.
cache_warm
Warm the cache to speed up subsequent extractions.

Setup

Install the CLI via Homebrew: brew install xberg-io/tap/xberg, then configure your client. For example, add to your Claude Desktop or Cursor config: { "mcpServers": { "xberg": { "command": "xberg", "args": ["mcp"] } } }.

claude_desktop_config.json
{
  "mcpServers": {
    "xberg": {
      "command": "xberg",
      "args": [
        "mcp"
      ]
    }
  }
}

Fit and risk

Best for

  • Developers and data engineers who need to process diverse document formats and extract structured data.
  • AI agents that need document processing capabilities within an MCP environment.
  • RAG pipelines that require extracting semantic information from codebases.

Not for

  • General MCP scenarios that do not require document extraction or OCR.
  • Users needing real-time collaborative document editing, as Xberg focuses on extraction.
  • Simple text conversion with low performance requirements.

Required permissions

  • Read access to the local file system to access documents for extraction.
  • May access network to fetch URLs or call remote OCR/LLM APIs if configured.
  • Write access to cache directories to store extracted results.

Risks and side effects

  • Potential security risk when processing malicious files; it is recommended to limit file sources.
  • OCR or LLM calls may require additional API keys or network connectivity.
  • Large file processing may consume significant memory and CPU resources.

Troubleshooting

  1. Ensure the xberg CLI is correctly installed and in PATH.
  2. Verify the command path in your configuration file.
  3. Run `xberg doctor` to check backend dependencies (like Tesseract) are available.
  4. Check logs for detailed error messages.

Use cases

Extract text and tables from PDFs, Office documents, images, etc., for RAG or data processing.
Perform OCR on scanned documents with backends like Tesseract and PaddleOCR.
Extract functions, classes, imports, and other structures from source code for code analysis.
Use local or remote LLMs for schema-driven structured data extraction and document understanding.

Supported clients

Claude DesktopFull support
CursorFull support