# Xberg

> Xberg is an open-source MCP server for files and documents. Open-source document extraction engine for text, tables and OCR, run on your own. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Linux, macOS, Windows, Web
- **Website:** https://xberg.io
- **Repository:** https://github.com/xberg-io/xberg
- **MCP Registry name:** io.github.xberg-io/xberg
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-11-27

## About

Xberg takes a document, scan, spreadsheet, archive or source tree and returns clean text, tables, metadata and structured data in one pass. Format detection, reading and OCR are handled by a single core, so teams do not have to chain several libraries together to get usable output.

The engine is available as a library in many languages, as a command-line tool, as a REST server started with a serve command, and as an MCP server that AI clients can call over stdio. Results can be rendered as plain text, Markdown, Djot, HTML, a JSON tree or DocTags, and code files are parsed for functions, classes, imports and symbols.

It suits developers building retrieval pipelines, document classification or compliance review who want extraction to run on local hardware. Some capabilities such as URL ingestion, transcription and certain rerankers depend on optional feature flags at build time. Pro and Enterprise add a self-hosted platform container with single sign-on and an audit log, with pricing discussed by sales.

## Features

- **Broad format coverage:** Reads PDFs, Office files, images, email, e-books, archives and structured data across 107 format families.
- **OCR backends:** Offers Tesseract, PaddleOCR, Candle and vision-language model options with fallback chains for scanned pages.
- **Code structure extraction:** Pulls functions, classes, imports and symbols from source files in a large set of programming languages.
- **Multiple output formats:** Renders extracted content as plain text, Markdown, Djot, HTML, JSON tree or DocTags.
- **Embeddings and reranking:** Generates local ONNX or provider-hosted embeddings and supports cross-encoder reranking for search.
- **Schema-driven LLM extraction:** Produces JSON matching a supplied schema from documents using local or hosted language models.

## Good for

- Turning PDFs and scanned invoices into clean text and tables for a vector database
- Parsing source code into symbols and chunks for code search and RAG
- Routing and classifying incoming documents by extracted content and metadata
- Reviewing contracts and regulatory filings while preserving table structure
- Giving an AI coding assistant a command-line or MCP tool for reading documents

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add xberg -- npx -y @xberg-io/xberg-cli
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "xberg": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add xberg -- npx -y @xberg-io/xberg-cli
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.xberg]
command = "npx"
args = ["-y", "@xberg-io/xberg-cli"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user xberg npx -- -y @xberg-io/xberg-cli

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "xberg": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/xberg-cli"
      ]
    }
  }
}
```

## FAQ

### What is the difference between Core, Pro and Enterprise?

Core is the open-source extraction engine that you embed or self-host. Pro is the full platform as one container for a team, adding single sign-on and an audit log. Enterprise is the distributed platform for many teams, adding SAML, SCIM, data rooms and on-prem installs.

### Is Xberg free to use?

The Core engine is MIT licensed and free for personal, internal and commercial use. Pro and Enterprise pricing is shared through a sales conversation.

### Does Xberg need a GPU?

The project describes CPU as the default, and no GPU is required.

### How do I run Xberg as an MCP server?

Run the xberg mcp command with stdio transport and add it to a client such as Claude Desktop or Cursor using the command and arguments shown in the README.

### How do I add Xberg to Claude Code?

Run this command in your terminal: claude mcp add xberg -- npx -y @xberg-io/xberg-cli

### What are the best alternatives to Xberg?

The closest alternatives to Xberg are Rag, Docs MCP, MCP Local Rag, Space Ocr and Doc Extract MCP.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Rag](https://ai-powered.com/mcp/rag): Rag is an open-source MCP server for knowledge and memory.
- [Docs MCP](https://ai-powered.com/mcp/docs-mcp-5): Docs MCP is a freemium MCP server for files and documents.
- [MCP Local Rag](https://ai-powered.com/mcp/mcp-local-rag-2): MCP Local Rag is an open-source MCP server for knowledge and memory.
- [Space Ocr](https://ai-powered.com/mcp/space-ocr): Space Ocr is a freemium MCP server for files and documents.
- [Doc Extract MCP](https://ai-powered.com/mcp/doc-extract-mcp): Doc Extract MCP is an open-source MCP server for files and documents.
- [Smart OCR](https://ai-powered.com/mcp/smart-ocr): Smart OCR is a paid MCP server for files and documents.
- [MCP File Processor](https://ai-powered.com/mcp/mcp-file-processor): MCP File Processor is an open-source MCP server for files and documents.
- [PDF Text Extractor](https://ai-powered.com/mcp/pdf-text-extractor-2): PDF Text Extractor is a paid MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/xberg
