# any2llm

> any2llm is an open-source MCP server for files and documents. Converts PDFs, Office files and code into Markdown with page numbers for AI citations. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/ahmetemreapo/any2llm
- **GitHub stars:** 1
- **License:** MIT
- **MCP Registry name:** io.github.ahmetemreapo/any2llm
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-12-05

## About

Most document converters strip page numbers, which makes it hard to verify where an AI chat got an answer. This tool turns a folder of PDFs, Word, PowerPoint, Excel, EPUB, HTML and source code into Markdown where each PDF page is tagged with its number, so citations can be checked against the original.

It works in three ways: as a command-line tool that writes numbered attachment files and a citation prompt to a folder, as a pipe-friendly stream on standard output, or as a local MCP server that lets Claude, Cursor and similar apps read a chosen folder on request. Large collections are split into batches sized to fit a chat's context window, with instructions on the order to upload them.

Extraction runs on your own machine. Common credential files are skipped and likely secrets are flagged for review before anything is uploaded. It suits people working with supplier offers, contracts, research papers, course material and codebases.

## Features

- **Page-tagged PDF output:** Each PDF page's text is wrapped in a page tag so answers can point to a specific page.
- **Mixed folder conversion:** One run handles PDF, Word, PowerPoint, Excel, EPUB, HTML, CSV, Markdown and code files.
- **Batching for context limits:** Large folders are split into batches that fit a chat's context window, with upload order printed.
- **Local MCP server:** Exposes read-only list and read tools to Claude, Cursor and other MCP apps for a chosen folder.
- **Secret and credential handling:** Credential-style files are skipped and likely secrets in extracted text are flagged.
- **Optional OCR for scans:** Pages without extractable text can be read with OCR using selected languages.

## Good for

- Asking an AI chat questions about a folder of contracts and checking the cited PDF page
- Extracting payment deadlines or supplier terms from spreadsheets and PDFs
- Summarising research papers or course material with page references
- Letting an MCP-enabled assistant read a documents folder on request
- Feeding a codebase or notes into a command-line LLM tool

## Install

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

```sh
claude mcp add any2llm -- uvx any2llm
```

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": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "any2llm": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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 any2llm -- uvx any2llm
```

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

```toml
[mcp_servers.any2llm]
command = "uvx"
args = ["any2llm"]
```

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user any2llm uvx -- any2llm

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

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": {
    "any2llm": {
      "command": "uvx",
      "args": [
        "any2llm"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, all 2 tools only read data. From the server's own tool labels and tool names; not verified by us.

- `list_documents` (name suggests: reads): Shows what a folder contains.
- `read_documents` (name suggests: reads): Returns Markdown with PDF page tags, in batches when content is large.

## FAQ

### Which file types are supported?

PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), EPUB, HTML, CSV, JSON, YAML, Markdown and source code files.

### Does any2llm send my files anywhere?

Extraction and OCR run locally on your computer. The tool notes that tiktoken may download its vocabulary on first use.

### How do I connect any2llm to Claude Code?

Run claude mcp add any2llm -- uvx any2llm mcp ~/Documents, substituting the folder you want the AI to read.

### What are the size limits?

Up to 32 MiB per file, 500 pages per PDF, 128 MiB uncompressed per Office or EPUB archive, and 120 seconds of extraction per file.

### Is any2llm free?

Yes. any2llm is open source, so you can use and self-host it for free.

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

Run this command in your terminal: claude mcp add any2llm -- uvx any2llm

### What are the best alternatives to any2llm?

The closest alternatives to any2llm are Document Converter, PDF to MD, Doc To Markdown, PDF to Text MCP: OCR, DOCX & RAG Chunks and Markdown Formatter.

## Where this comes from

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

## Alternatives

- [Document Converter](https://ai-powered.com/mcp/document-converter): Document Converter is an open-source MCP server for files and documents.
- [PDF to MD](https://ai-powered.com/mcp/pdf-to-md): PDF to MD is a freemium MCP server for files and documents.
- [Doc To Markdown](https://ai-powered.com/mcp/doc-to-markdown): Doc To Markdown is an MCP server for files and documents.
- [PDF to Text MCP: OCR, DOCX & RAG Chunks](https://ai-powered.com/mcp/pdf-to-text-mcp-ocr-docx-and-rag-chunks): PDF to Text MCP: OCR, DOCX & RAG Chunks is a paid MCP server for files and documents.
- [Markdown Formatter](https://ai-powered.com/mcp/markdown-formatter): Markdown Formatter is an open-source MCP server for files and documents.
- [Distill MCP](https://ai-powered.com/mcp/distill-mcp-2): Distill MCP is an open-source MCP server for files and documents.
- [Packforai MCP](https://ai-powered.com/mcp/packforai-mcp-2): Packforai MCP is a freemium MCP server for files and documents.
- [PDF.chat](https://ai-powered.com/mcp/pdf-chat): PDF.chat is a freemium MCP server for files and documents.

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