# Section Anything

> Section Anything is an open-source MCP server for files and documents. Gives agents a PDF's heading tree and section text so they read only what they need. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://omniwot.github.io/section-anything/
- **Repository:** https://github.com/omniwot/section-anything
- **MCP Registry name:** io.github.Omniwot/section-anything
- **Categories:** files and documents, AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

A PDF can be long, and the idea here is to let an agent look at the outline first and then fetch only chosen sections by index. The MCP server has four read-only tools: `outline_pdf` for a one-line-per-section outline, `section_pdf` for the same tree as JSON (about five times the tokens), `read_sections` for the text of selected sections, and `estimate_cost` for the paid modes.

It is the MCP front end of an open-source Python library for PDFs with a text layer, built for retrieval-augmented generation. The default free mode uses rules and runs locally with no model, so `outline_pdf` costs $0. Paid quick and standard modes use an OpenAI or Anthropic key from the server's environment and are capped per document by `--max-usd` (default 0.50; 0 keeps every run free). `--root DIR` restricts which folders the server may read.

The README marks the project as pre-release 0.1, with an API that may change before 1.0. It runs through `uvx` and is also available as a command-line tool and an agent skill.

## Features

- **Outline first:** Returns one line per section with its index, heading and pages.
- **Section text:** Reads the text of chosen sections by index.
- **JSON heading tree:** Provides the full tree with heading paths, parents and pages.
- **Free local mode:** Rule-based sectioning with no model and no cost.
- **Cost cap:** Paid modes stop at a per-document dollar limit, and estimates are available first.
- **Folder restriction:** `--root` limits which directories the server can read.

## Good for

- Let an agent skim a long report's outline before reading
- Split PDFs into chunks that follow headings for RAG
- Check what a model-assisted run would cost before paying
- Read one chapter of a paper without loading the whole file

## Install

### Claude Code (Terminal)

```sh
claude mcp add section-anything --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' -- uvx section-anything-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "section-anything": {
      "command": "uvx",
      "args": [
        "section-anything-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "section-anything": {
      "command": "uvx",
      "args": [
        "section-anything-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "section-anything": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "section-anything-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "section-anything": {
      "command": "uvx",
      "args": [
        "section-anything-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "section-anything": {
      "command": "uvx",
      "args": [
        "section-anything-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

## Tools

- `outline_pdf`: Returns the outline as text, one line per section with index, heading and pages.
- `section_pdf`: Returns the same heading tree as JSON.
- `read_sections`: Returns the text of chosen sections.
- `estimate_cost`: Estimates what quick and standard modes would cost.

## FAQ

### Does it need an API key?

Not in free mode. Quick and standard modes use an OpenAI or Anthropic key set in the environment.

### How do I install it?

Run `claude mcp add --transport stdio section-anything -- uvx --from "section-anything[mcp]" section-anything-mcp`, or use the same command in another host's `mcpServers` config.

### Can I keep it from spending money?

Yes. Pass `--max-usd 0` to keep every run free; the default per-document cap is 0.50.

### What PDFs does it work on?

PDFs with a text layer.

### Is Section Anything free?

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

### How do I add Section Anything to Claude Code?

Run this command in your terminal: claude mcp add section-anything --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' -- uvx section-anything-mcp

### What are the best alternatives to Section Anything?

The closest alternatives to Section Anything are Claude Code Ultimate Guide, ASTra, CARTESIAN ECU, Invoices and SigPen.

## Alternatives

- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [ASTra](https://ai-powered.com/mcp/astra): ASTra is a freemium MCP server for files and documents.
- [CARTESIAN ECU](https://ai-powered.com/mcp/cartesian-ecu): CARTESIAN ECU is a paid MCP server for files and documents.
- [Invoices](https://ai-powered.com/mcp/invoices): Invoices is a paid MCP server for files and documents.
- [SigPen](https://ai-powered.com/mcp/sigpen): SigPen is a freemium MCP server for files and documents.
- [ConvertAudioToText](https://ai-powered.com/mcp/convertaudiototext): ConvertAudioToText is a freemium MCP server for design and media.
- [signafAIde](https://ai-powered.com/mcp/signafaide): signafAIde is a freemium MCP server for security.
- [Toolkien](https://ai-powered.com/mcp/toolkien): Toolkien is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/section-anything
