Skip to content
MCP server

Section Anything

Gives agents a PDF's heading tree and section text so they read only what they need

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.1.0
Listing updated
3 days ago

About Section Anything

Section Anything is an open-source MCP server for files and documents. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

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

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.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>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Configuration

  • OPENAI_API_KEYOnly for the paid quick and standard modes with OpenAI models
  • ANTHROPIC_API_KEYOnly for the paid modes with a Claude model

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

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.

What it does

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

Pricing

Open source

Free mode is local; paid modes use your own OpenAI or Anthropic key

Prices change. Check omniwot.github.io before you buy.

Section Anything 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 to Section Anything

  1. MCP server for searching the Claude Code Ultimate Guide from any MCP client

    Runs locally
    • Open source
    • 6.5K GitHub stars
    • AI models and LLM tooling
  2. ASTra

    MCP server

    Let agents read, edit, validate and undo Word .docx files with exact operations

    Runs locally
    • 5 tools
    • Freemium
    • Files and documents
  3. CARTESIAN ECU

    MCP server

    Check and repair ECU and TCU flash-file checksums from Claude (Ultimate plan)

    Not checked yet
    • 5 tools
    • Remote
    • Paid
    • Files and documents
  4. Invoices

    MCP server

    MCP server that reads supplier invoices and returns data plus DATEV, CSV or Excel files

    • 4 tools
    • Remote
    • Paid
    • Files and documents
  5. SigPen

    MCP server

    MCP server that drafts e-signature documents while you approve every send

    Not checked yet
    • 13 tools
    • Remote
    • Freemium
    • Files and documents
  6. Transcribe audio and video links from Claude or ChatGPT and read the results

    Not checked yet
    • 5 tools
    • Remote
    • Freemium
    • Design and media