• STRUCTURE
  • NAVIGATION
  • FORMAT
  • REVIEW

How to create a Table of Contents with your AI

Connect the Markdown Utilities Engine to your AI client once. From then on, your agent handles the document structure for you.

Ask AI about this page

Short answer

How can I make an AI generate a Markdown TOC?

Give your agent a long Markdown file and ask it to build a nested Table of Contents. It uses the Markdown Utilities Engine to map headers and create functional GitHub-style anchor links. You'll get a structured list that makes navigation easy.

The results.

Where your document lands.

The AI handles the structural logic so you don't have to manually type out every header and link.

STRUCTURE

Nested hierarchy

The agent identifies your H1 through H6 headers. It builds a logical, nested list that reflects your document's actual organization.

NAVIGATION

Working anchor links

Every entry in the list is a clickable GitHub-style link. Clicking a title jumps you straight to that section in the Markdown file.

FORMAT

Clean Markdown

The output is pure Markdown. You can paste it directly into your existing files without fixing broken syntax or weird spacing.

REVIEW

Human oversight

The AI provides the structure, but you decide if the hierarchy makes sense. You remain in control of the final document layout.

The workflow

What your AI does when the file arrives.

The AI processes the raw text to find structure and build the navigation map.

  1. Scan headers

    The agent reads through your document to find every heading level.

    generate_toc
  2. Map anchors

    It creates unique, URL-friendly identifiers for every section it finds.

    generate_toc
  3. Build hierarchy

    The agent organizes these headers into a nested list based on their depth.

    generate_toc
  4. Finalize links

    It attaches the anchor links to the text to ensure the TOC is functional.

    generate_toc

Try it

Copy these to start.

Use these prompts to trigger the TOC generation immediately.

Starting points

These are basic ways to start. Swap out the file names or repo paths for your actual data.

Markdown Utilities Engine Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_XebVH2xW9hGkErGNE5Hc8aUij1ybmdpCkRVKPgoA/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Markdown Utilities Engine capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "markdown-utilities-engine-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_XebVH2xW9hGkErGNE5Hc8aUij1ybmdpCkRVKPgoA/mcp"
    }
  }
}
Copy into chat04
  • Generate a nested Table of Contents for this Markdown file.

  • Create a GitHub-style TOC with anchor links for the README.md in this repo.

  • Look at this long technical spec and build a hierarchical Table of Contents.

  • Add a clickable Table of Contents to the top of this document.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Markdown Utilities Engine once, then ask.

Just click the link to connect the MCP to your preferred client. Your credentials stay encrypted, and you can start prompting right away.

Connect Markdown Utilities Engine to your AI

FAQ

How this task behaves.

  • 01

    Will the AI change my actual content?

    No. The agent only generates the Table of Contents text. It does not modify your existing headers or body text unless you explicitly ask it to rewrite the file.

  • 02

    Does it work with non-Markdown files?

    No. This specific tool is designed for Markdown files to ensure the anchor links and header syntax work correctly.

  • 03

    Can the AI delete my sections?

    No. The tool only reads the file to build the list. It has no capability to delete content from your files.

  • 04

    What kind of links does it make?

    It creates GitHub-style anchor links, which are standard for Markdown files on platforms like GitHub or VS Code.

  • 05

    Can I choose the nesting depth?

    Yes. You can tell your agent to only include H1 and H2 headers, or to include all levels down to H6.

  • More questions about Markdown Utilities Engine? The Connector page answers them. See everything the Markdown Utilities Engine Connector can do

Connect Markdown Utilities Engine to Claude, Cursor, ChatGPT & more