Logo Xberg

Xberg

Tổ chứcPhổ biến
xberg-io

Polyglot document intelligence with a Rust core: extract text, metadata, images, tables, and structured data from 106 formats across 140 file extensions, plus code intelligence for 371 languages. Fifteen bindings, with CLI, REST API, and MCP server.

Nhà phát hànhxberg-io
Kho mãxberg
Ngôn ngữRust
Bản fork
586
Sao
9.3K
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Xberg cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    9.3K sao và 586 bản fork từ kho mã được liên kết.

Xberg

The fast, precise document-intelligence engine — for every language.

Point Xberg at anything — a PDF, a scanned image, a spreadsheet, an audio file, a URL, a whole archive, or a source tree — and get back clean text, tables, metadata, and structured data. One engine handles format detection, reading, OCR, and extraction, so you never stitch a pipeline together from a dozen libraries.

107 formats · 141 file extensions · 371 code languages · 15 language bindings · 6 output formats · OCR · transcription · embeddings

The fastest, most precise open-source document and PDF-to-Markdown engine — see the benchmarks.

Install · What you get · Capabilities · CLI · Docs

Xberg is the next iteration of Kreuzberg. Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line.


What you get

Point Xberg at anything — a PDF, a spreadsheet, a scanned image, an audio file, a URL, an archive, a source tree — and get back clean, structured content you can use right away. One core does the format detection, reading, and extraction, so you don't assemble a pipeline yourself. Call it from Rust, Python, Node.js, Go, Java, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, WASM, Kotlin, or C FFI, and run it as a library, CLI tool, REST API, or MCP server.

CapabilityWhat you get
107 document formatsPDFs, Office, images, HTML, email, e-books, scientific publications, and structured data across 141 file extensions, with intelligent MIME detection and bounded extraction controls.
URLs & the webPoint Xberg at an http(s) URL — it fetches and extracts a single document, or crawls and follows links (Auto / Document / Crawl modes via the crawlberg engine). Requires the url-ingestion feature.
Audio & video transcriptionSpeech-to-text from MP3, M4A, WAV, WebM, and MP4 tracks via Whisper ONNX (tiny → large-v3). Requires the transcription feature.
Archives, traversedList and recursively extract nested .zip, .tar, .gz, .7z — documents inside documents — guarded by zip-bomb, compression-ratio, and nesting-depth limits.
OCR on demandTesseract, PaddleOCR, Candle, or VLM backends — fallback chains, confidence scores, language auto-detection, extensible via plugins.
Layout & tablesML layout models (PP-DocLayout-V3, RT-DETR) and table structure (TATR, SLANet) reconstruct reading order and cell grids for clean Markdown.
Code intelligenceFunctions, classes, imports, symbols, docstrings from 371 programming languages. Syntax-aware chunking for RAG pipelines.
Embeddings & searchLocal (ONNX) or provider-hosted embeddings (165 providers via liter-llm), sparse and late-interaction, cross-encoder reranking.
EnrichmentNER, keyword extraction (YAKE/RAKE), summarization, translation, redaction, page classification, QR detection, language detection, token reduction (TOON).
Structured extractionSchema-driven JSON straight from any document via local (Ollama, LM Studio, vLLM) or hosted LLMs — no prompt engineering.
6 output formatsPlain text, Markdown, Djot, HTML, JSON tree, or Docling DocTags, plus registered custom renderers.
Runs anywhereLibrary, CLI (14 commands), REST API (xberg serve), MCP server, Docker, Helm — CPU by default, no GPU required. Content-hash caching, parallel batch, per-file timeouts.

Capabilities marked requires a feature are Cargo feature flags on the core crate (url-ingestion, transcription, reranker, layout/ORT). Prebuilt language packages and the Docker image bundle the common set; a from-source build enables only what you select.


Installation

Language Packages

sh
pip install xberg

See Python README for full documentation.

sh
npm install @xberg-io/xberg

See Node.js README for full documentation.

sh
cargo add xberg

See Rust README for full documentation.

sh
go get github.com/xberg-io/xberg/packages/go@latest

⚠️ The repository root is not a Go module — go get github.com/xberg-io/xberg will fail. Always target the /packages/go subdirectory as shown above.

See Go README for full documentation.

Available on Maven Central as io.xberg:xberg. See Java README for the dependency snippet.

sh
dotnet add package XbergIo.Xberg

See C# README for full documentation.

sh
gem install xberg

See Ruby README for full documentation.

sh
composer require xberg-io/xberg

See PHP README for full documentation.

Add {:xberg, "~> 1.0"} to your mix.exs dependencies. See Elixir README for full documentation.

sh
npm install @xberg-io/xberg-wasm

See WebAssembly README for full documentation.

Available on Maven Central as io.xberg:xberg-android. See Kotlin README for the dependency snippet.

Add via Swift Package Manager. See Swift README for full documentation.

sh
dart pub add xberg

See Dart README for full documentation.

Add via zig fetch. See Zig README for full documentation.

Build from source as part of this workspace. See C (FFI) README for full documentation.

CLI & Deployment

sh
brew install xberg-io/tap/xberg

Windows users can install the same binary through Scoop:

powershell
scoop bucket add xberg https://github.com/xberg-io/scoop-bucket
scoop install xberg

14 commands: extract, batch, detect, formats, version, cache, tree-sitter, doctor, serve, mcp, api, embed, chunk, and completions.

See CLI usage guide for detailed documentation.

sh
docker pull ghcr.io/xberg-io/xberg:latest

Run in API, CLI, or MCP modes. See Docker guide for examples.

sh
xberg serve --host 0.0.0.0 --port 8000

One POST endpoint handles all formats. Returns JSON or Markdown. Stream large files. See API server guide.

sh
xberg mcp --transport stdio

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). 4 resources (formats, models, OCR languages, embedding presets).

Add to Claude Desktop or Cursor:

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

See MCP integration guide.

AI Coding Assistants

Install the Xberg plugin from xberg-io/xberg. Ships extraction APIs, OCR backends, configuration, and language conventions.

text
/plugin marketplace add xberg-io/xberg
/plugin install xberg@xberg
text
/plugins add https://github.com/xberg-io/xberg

Search for xberg and select Install Plugin.

Settings → Plugins → Add from URL → https://github.com/xberg-io/xberg, then select xberg.

text
gemini extensions install https://github.com/xberg-io/xberg
text
droid plugin marketplace add https://github.com/xberg-io/xberg
droid plugin install xberg@xberg
text
copilot plugin marketplace add https://github.com/xberg-io/xberg
copilot plugin install xberg@xberg

Add to opencode.json:

json
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@xberg-io/opencode-xberg"]
}

Quick Start

Extract text from a document:

rust
use xberg::{extract, ExtractInput, ExtractionConfig};

#[tokio::main]
async fn main() -> xberg::Result<()> {
    let config = ExtractionConfig::default();
    let output = extract(
        ExtractInput::from_uri("document.pdf"),
        &config
    ).await?;

    println!("{}", output.results[0].content);
    Ok(())
}

Common use cases — see Quick start guide for language-specific examples, OCR, batch processing, and API configuration.


Capabilities

Supported File Formats (107 formats · 141 file extensions · 56 MIME aliases)

107 formats across 140 unique file extensions, with 56 compatibility MIME aliases, intelligent format detection, and comprehensive metadata extraction.

Office Documents

CategoryFormatsCapabilities
Word Processing.docx, .docm, .doc, .dotx, .dotm, .dot, .odt, .pages, .wpd, .wp, .wp5, .wp6Full text, tables, images, metadata, styles
Spreadsheets.xlsx, .xlsm, .xlsb, .xls, .xla, .xlam, .xltm, .xltx, .xlt, .ods, .numbersSheet data, formulas, cell metadata, charts
Presentations.pptx, .pptm, .ppt, .pps, .ppsx, .potx, .potm, .pot, .odp, .keySlides, speaker notes, images, metadata
PDF.pdfText, tables, images, metadata, OCR support
eBooks.epub, .fb2Chapters, metadata, embedded resources
Database.dbf, .sqlite, .sqlite3, .db, .gpkg, .gpkxBounded table extraction, schema metadata, GeoPackage detection
Hangul.hwp, .hwpxKorean document format, text extraction

Images (OCR-Enabled)

CategoryFormatsFeatures
Raster.png, .jpg, .jpeg, .gif, .webp, .bmp, .tiff, .tifOCR, table detection, EXIF metadata, dimensions, color space
Advanced.jp2, .jpg2, .j2c, .j2k, .jpc, .jbig2, .jb2, .pnm, .pbm, .pgm, .ppmOCR via pure-Rust JPEG2000 decoder, JBIG2 support, table detection
HEIC family.heic, .heics, .heif, .heifs, .hif, .avif, .avcsEXIF metadata, optional pixel decoding
Vector.svgDOM parsing, embedded text, graphics metadata

Audio & Video

CategoryFormatsFeatures
Audio.mp3, .mpga, .m4a, .wav, .webmWhisper transcription
MP4 audio track.mp4, .mpg4, .mp4v, .m4vAudio-track transcription only
MPEG audio track.mpeg, .mpg, .mpe, .m1v, .m2vAudio-track transcription only
WebM audio track.webmAudio-track transcription only

Web & Data

CategoryFormatsFeatures
Markup.html, .htm, .xhtml, .xht, .xml, .kml, .svgDOM parsing, metadata (Open Graph, Twitter Card), link extraction
Structured Data.json, .geojson, .jsonl, .ndjson, .yaml, .yml, .toml, .csv, .tsvSchema detection, nested structures, validation
Text & Markdown.txt, .adoc, .asciidoc, .vtt, .md, .markdown, .commonmark, .qmd, .rmd, .djot, .dj, .mdx, .doctags, .rst, .org, .rtfAsciiDoc, CommonMark, MyST Markdown, Quarto, R Markdown, Djot, MDX, DocTags, reStructuredText, Org Mode

Email & Archives

CategoryFormatsFeatures
Email.eml, .msg, .pstHeaders, body (HTML/plain), attachments, threading
Archives.zip, .tar, .tgz, .gz, .7zFile listing, nested archives, metadata, recursive extraction

Academic & Scientific

CategoryFormatsFeatures
Citations.bib, .ris, .nbib, .enwStructured parsing: RIS, PubMed/MEDLINE, EndNote XML, BibTeX/BibLaTeX
Scientific.tex, .latex, .typ, .typst, .jats, .nxmlLaTeX, Typst, PubMed JATS
Text notebooks.ipynb, .md, .py, .R, .jlJupyter, MyST-NB, Jupytext percent/light, saved outputs, cell visibility tags
Publishing.fb2, .docbook, .dbk, .docbook4, .docbook5, .opmlFictionBook, DocBook XML, OPML outlines

Code Intelligence (371 Languages)

Extract structure from 371 programming languages via tree-sitter:

FeatureDescription
Structure ExtractionFunctions, classes, methods, structs, interfaces, enums
Import/Export AnalysisModule dependencies, re-exports, wildcard imports
Symbol ExtractionVariables, constants, type aliases, properties
Docstring ParsingGoogle, NumPy, Sphinx, JSDoc, RustDoc, and 10+ formats
Syntax-Aware ChunkingSplit code by semantic boundaries for RAG pipelines
DiagnosticsParse errors with line/column positions

Powered by tree-sitter-language-pack.

Output Formats (6)

FormatUse caseExample
PlainRaw text, no markup"Chapter 1\nIntroduction"
MarkdownReadable, structured, RAG-friendly"# Chapter 1\n## Introduction"
DjotModern lightweight markupSimilar to Markdown but stricter
HTMLStyled, browser-ready<h1>Chapter 1</h1>
JSONMachine-readable tree structureHierarchical sections with heading levels
DocTagsDocling-compatible tag stream for document elements and tables<text>Chapter 1</text>

Deployment Modes

ModeCommandTransportUse case
Libraryxberg::extract()Async functionsEmbed in your application
CLIxberg extract document.pdf14 commandsScripts, batch jobs, CI/CD
REST APIxberg serveHTTP POSTMicroservice, serverless deployment
MCP Serverxberg mcpstdio or HTTPClaude, Cursor, IDE agents
Dockerdocker run ghcr.io/xberg-io/xbergAll modesContainer deployment

OCR Backends

  • Tesseract — Native C FFI (Linux/macOS/Windows) and WASM (browser)
  • PaddleOCR — ONNX Runtime, mobile-optimized models
  • Candle — Pure Rust, CPU-only, lightweight
  • VLM — GPT-4 Vision, Claude Vision, Gemini Vision, or 165 providers via liter-llm

Fallback chains. Extensible via plugin system.

Embeddings

Local (ONNX Runtime):

  • Preset models: fast, balanced (default), quality, multilingual
  • Dimensions: 384, 768, 1024

Provider-hosted:

  • OpenAI, Anthropic, Google, Hugging Face, Mistral, Cohere, and 165 providers total
  • Via liter-llm integration

Reranking:

  • Local ONNX rerankers (cross-encoder models)
  • Provider-hosted: Cohere Rerank, others

Structured LLM Extraction

Local engines: Ollama, LM Studio, vLLM

Remote: OpenAI, Anthropic, Google, Mistral, Cohere, and 165 providers via liter-llm

Schema validation. Temperature, top-p, frequency penalty tuning.

Enrichment

  • NER — GLiNER or LLM-based entity recognition
  • Redaction — Mask PII (phone, email, SSN, credit card, addresses)
  • Summarization — Document and section summaries via LLM
  • Translation — Multi-language via LLM
  • Page Classification — Tag document pages (cover, toc, content, etc.)
  • QR Code Detection — Extract and decode QR codes from images
  • Keyword Extraction — YAKE or RAKE algorithms
  • Language Detection — Detect document language
  • Layout Detection — RT-DETR + TATR models for document structure
  • Table Extraction — Cell-level structure and content
  • Token Reduction — TOON wire format (~30–50% fewer tokens than JSON)

CLI Reference

CommandSubcommandsPurpose
extract—Extract text from a single document (path, URL, or stdin)
batch—Extract from multiple documents in parallel
detect—Identify MIME type of a file
formats—List all supported formats and MIME types
version—Show Xberg version
cachestats, clear, manifest, warmManage extraction cache and models
tree-sitterdownload, list, cache-dir, cleanManage code-intelligence grammars
doctor—Diagnose the local installation and runtime dependencies
serve—Start REST API server (default: http://127.0.0.1:8000)
mcp—Start MCP server (stdio or HTTP transport)
apischemaOutput OpenAPI 3.1 specification
embed—Generate embeddings for text (local or provider-hosted)
chunk—Split text into chunks (text, markdown, YAML, or semantic)
completions—Generate shell completion scripts

Run xberg --help or xberg <command> --help for detailed options.


Documentation

Full guides, API references for every binding, format reference, and configuration docs live at xberg.io.


Built with Xberg

Projects that declare Xberg as a dependency. Xberg was previously published as kreuzberg, and most of these projects declare the package under that name.

ProjectWhat it isStars
basemindAI context and content layer for coding agents over one MCP server: code map, document RAG, shared memory and web crawlStars
deluluA suite of MCP servers and CLI tools that give your LLM better search and fewer hallucinationsStars
docs-mcp-serverGrounded documentation MCP server, an open-source alternative to Context7, Nia and Ref.ToolsStars
eratoThe open-source AI platformStars
fastmail-cliCLI and MCP server for Fastmail: email, contacts, masked email, attachments and text extractionStars
ghfdb-portalWeb portal for the Global Heat Flow DatabaseStars
hawki-toolkit-file-converterPrepares and converts PDF files for the HAWKI toolkitStars
haystack-core-integrationsIntegrations that extend Haystack with extra components and document storesStars
kreuzaktA search engine for humans and computers, aimed at your most boring documentsStars
lilbeeThe whole local AI stack in one executable, with conversational search and cited answers over your files, code and the webStars
llm-workflow-enginePower CLI and workflow manager for LLMsStars
MANSPIDERSpiders entire networks for files sitting on SMB shares, searching filenames or contents with regexStars
otoroshi-llm-extensionConnect, secure and manage LLM models behind one OpenAI-compatible APIStars
sift-kgTurns a collection of documents into a knowledge graph, extracting entities and relationships with an LLMStars
sirchmunkTurns raw data into a self-evolving, real-time search and intelligence layerStars
support-chatbotLevel-1 support chatbot for the Netherlands Red Cross 510 teamStars

Using Xberg in your project? Open a PR adding it to this list.


Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Join our Discord community for questions and discussion.


Part of Xberg.io

  • Xberg — the open-source content-intelligence engine: text, tables, and metadata from 107 formats (141 file extensions), with OCR, transcription, and code intelligence. MIT.
  • Xberg Pro — a complete self-hosted content-intelligence backend in a single container. Commercial.
  • Xberg Enterprise — the distributed, governed content-intelligence platform, scaled on Kubernetes with team governance and support. Commercial.
  • crawlberg — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
  • html-to-markdown — fast, lossless HTML→Markdown engine.
  • liter-llm — universal LLM API client with native bindings for 14 languages and 165 providers.
  • tree-sitter-language-pack — tree-sitter grammars and code-intelligence primitives.
  • alef — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.

License

MIT License (MIT) — see LICENSE for details.

Cài đặt

TypingMind
{
  "mcpServers": {
    "xberg": {
      "command": "python",
      "args": [
        "path/to/your/main.py"
      ]
    }
  }
}

Dùng MCP Xberg với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Xberg, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Xberg làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Xberg.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "xberg-root"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Xberg, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Xberg.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Xberg giúp tôi làm việc này không?
Xberg
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Xberg.

Câu hỏi thường gặp

Máy chủ MCP Xberg dùng để làm gì?

Xberg là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Xberg với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Xberg với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Xberg với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Xberg, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Xberg với TypingMind?

Xberg hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Xberg cung cấp những công cụ nào trong TypingMind?

Xberg cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Xberg không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Xberg yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇