Skip to main content
Glama
llamakko

chezmoi-documentation-mcp-server

by llamakko

chezmoi Documentation MCP Server

Model Context Protocol (MCP) server for the official chezmoi documentation.

This server is inspired by the shape of the AWS documentation MCP server and focuses on the workflows that are most useful for docs-heavy assistants:

  • Search the official chezmoi documentation

  • Read a documentation page and convert it to Markdown

  • Read specific sections from a documentation page

  • List known documentation pages discovered from the site navigation

Features

  • Uses the official https://www.chezmoi.io/ site as its source of truth

  • Converts Material for MkDocs pages into LLM-friendly Markdown

  • Builds and caches a local in-memory search index by crawling the docs site

  • Restricts fetched content to the official chezmoi documentation host

  • Runs over stdio by default

Related MCP server: MCP Docs Server

Prerequisites

  • Python 3.10 or newer

  • An MCP client such as Claude Desktop, Cursor, or VS Code

Installation

Install on VS Code

If you have uv installed, you can add this server to VS Code from GitHub:

Install on VS Code

Equivalent CLI command:

code --add-mcp '{"name":"chezmoi-documentation","command":"uvx","args":["--from","git+https://github.com/llamakko/chezmoi-documentation-mcp-server.git","chezmoi-documentation-mcp-server"],"env":{"FASTMCP_LOG_LEVEL":"ERROR"}}'

This adds the server to your VS Code user profile.

Local development install

python3 -m venv .venv
. .venv/bin/activate
pip install -e .

Example MCP client configuration

{
  "mcpServers": {
    "chezmoi-documentation": {
      "command": "/ABSOLUTE/PATH/TO/chezmoi-documentation-mcp-server/.venv/bin/python",
      "args": ["-m", "chezmoi_documentation_mcp_server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}

If you prefer to install without a local checkout, you can switch the command to uvx or your preferred package runner.

Prefer absolute paths and avoid wrapping the server launch in a shell command. This follows the MCP guidance for reducing local-server execution risk.

Tools

search_documentation

Search the official chezmoi documentation. The first search builds a cached index by crawling the site, so it may take longer than later searches.

Parameters:

  • query: Search terms

  • limit: Maximum number of results to return

read_documentation

Fetch a chezmoi documentation page and convert the main content to Markdown.

Parameters:

  • url: Absolute URL, root-relative path, or documentation path

read_sections

Fetch a page and return only the requested sections.

Parameters:

  • url: Absolute URL, root-relative path, or documentation path

  • sections: A list of section names to match against page headings

list_documentation_pages

List documentation pages discovered from the official site.

Parameters:

  • section: Optional filter applied to URL and title

  • limit: Maximum number of pages to return

Environment variables

Variable

Description

Default

CHEZMOI_DOCUMENTATION_BASE_URL

Base URL for docs crawling

https://www.chezmoi.io/

CHEZMOI_DOCUMENTATION_ALLOW_UNOFFICIAL_BASE_URL

Set to true only for local development against a non-official docs mirror

CHEZMOI_DOCUMENTATION_MAX_PAGES

Maximum number of pages to crawl for the search index

350

CHEZMOI_DOCUMENTATION_CONCURRENCY

Concurrent fetches while building the index

10

CHEZMOI_DOCUMENTATION_CACHE_TTL_SECONDS

Cached search index lifetime in seconds

3600

CHEZMOI_DOCUMENTATION_REQUEST_TIMEOUT_SECONDS

HTTP timeout per request in seconds

20

CHEZMOI_DOCUMENTATION_MAX_REDIRECTS

Maximum redirects to follow after validating each hop

5

CHEZMOI_DOCUMENTATION_MAX_RESPONSE_BYTES

Maximum HTML response size in bytes

3145728

CHEZMOI_DOCUMENTATION_MAX_DOCUMENT_CHARS

Maximum Markdown/text characters returned from a page or section

120000

CHEZMOI_DOCUMENTATION_MAX_QUERY_LENGTH

Maximum search or filter query length

240

CHEZMOI_DOCUMENTATION_MAX_SECTION_COUNT

Maximum requested sections per call

12

CHEZMOI_DOCUMENTATION_MAX_SECTION_LENGTH

Maximum section heading match length

120

CHEZMOI_DOCUMENTATION_MAX_URL_LENGTH

Maximum documentation URL length

2048

CHEZMOI_DOCUMENTATION_MAX_SEARCH_RESULTS

Upper bound for search_documentation(limit=...)

20

CHEZMOI_DOCUMENTATION_MAX_LIST_RESULTS

Upper bound for list_documentation_pages(limit=...)

200

CHEZMOI_DOCUMENTATION_RATE_LIMIT_CALLS

Maximum tool calls per rate-limit window

30

CHEZMOI_DOCUMENTATION_RATE_LIMIT_PERIOD_SECONDS

Rate-limit window length in seconds

60

MCP_USER_AGENT

Optional custom user agent for HTTP requests. If unset, the server uses its built-in user agent string

built-in

Security

This server applies a small set of MCP-aligned hardening measures:

  • Validates tool inputs and rejects oversized URL, query, and section arguments

  • Restricts fetches to the official chezmoi docs host by default

  • Validates every redirect hop before following it

  • Caps response size and returned document length

  • Sanitizes returned text and Markdown

  • Uses an in-memory rate limit for tool invocations

  • Runs over stdio explicitly

Official MCP references used for these choices:

Development

Run tests:

PYTHONPATH=src python3 -m unittest discover -s tests

Run a low-impact live smoke check against the official docs:

PYTHONPATH=src python3 scripts/smoke_check.py

The smoke check fetches one representative documentation page and verifies that page parsing and section extraction still work. It intentionally avoids a broad crawl so it can be run regularly with minimal load on chezmoi.io.

Validate pinned GitHub Actions with pinact:

brew install pinact
pinact run --check

Update pinned GitHub Actions with pinact:

pinact run -u

GitHub Actions also includes a scheduled Smoke Check workflow that runs weekly and is available via workflow_dispatch.

GitHub Release Setup

Before pushing a release tag, configure the github-release environment in your repository settings.

This project uses Semantic Versioning. Release tags follow the vMAJOR.MINOR.PATCH format, for example v0.1.0.

Recommended settings:

  • Add required reviewers

  • Enable Prevent self-review

  • Restrict deployments to selected tags such as v*

  • Disable admin bypass if your workflow allows it

  • Add an environment variable named RELEASE_ENV_READY with the value true

The release workflow is intentionally configured to fail until RELEASE_ENV_READY=true is present in the github-release environment. This prevents accidentally publishing from an unprotected environment.

The workflow also verifies that the tagged commit is reachable from the repository default branch before it builds a release.

For public repositories, the release workflow generates artifact attestations for files in dist/. You can verify them with GitHub CLI:

gh attestation verify dist/* -R OWNER/REPO

Available Tools

4 tools
list_documentation_pagesB

List documentation pages discovered from the official chezmoi documentation site.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
sectionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden but only states the action. It does not disclose behaviors like pagination, default limits, how the 'section' parameter affects results, or what 'discovered' means.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is appropriately concise but arguably too terse for a tool with optional parameters and sibling alternatives, missing opportunities to add essential context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of sibling tools and optional parameters, the description is incomplete. It does not clarify when to use this tool instead of search_documentation or read_documentation, nor does it explain parameter semantics. The output schema may cover return values, but the overall context is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description offers no explanation of the 'limit' or 'section' parameters. The agent must rely solely on the schema defaults, which lack contextual meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists documentation pages from the official chezmoi documentation site, using a specific verb and resource. It distinguishes itself from siblings like search_documentation and read_documentation by focusing on listing all discovered pages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied through the verb 'list' and the resource, suggesting this is the tool for obtaining an overview of available pages. However, it does not explicitly compare with sibling tools or state when not to use them, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_documentationA

Read a chezmoi documentation page and convert its main content to Markdown.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the full burden of behavioral disclosure. It states the main action (read and convert to Markdown) but does not mention any side effects, prerequisites, or edge cases (e.g., how 'main content' is determined, whether it is a network call, or error behavior). This provides some transparency but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the core action ('Read a chezmoi documentation page') and adds the key detail of Markdown conversion. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, output schema present, no nested objects), the description covers the essential behavior. However, it does not mention the existence of siblings or when to choose this over them, but for a straightforward read operation the description is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. The single parameter 'url' is given meaning by the description's reference to 'a chezmoi documentation page', indicating the URL points to that page. This adds enough context beyond the bare parameter name, though it could be more explicit about URL formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb 'read' and resource 'chezmoi documentation page', and adds the conversion detail 'convert its main content to Markdown'. This distinguishes it from siblings like search_documentation (search) and list_documentation_pages (list) by focusing on retrieving a specific page's content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need a specific documentation page's content as Markdown, but does not explicitly state when to use this tool versus the siblings or provide any exclusions. There is clear context but no explicit comparison or conditions, so it stops short of strong guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_sectionsB

Read selected sections from a chezmoi documentation page.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
sectionsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states 'Read selected sections' without disclosing what happens if a section is missing, how sections are matched, or any other behavioral details. The description adds little beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loaded with the key verb and resource. Every word earns its place with no wasted or redundant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists, the description is too sparse to fully guide usage. It does not clarify the expected format of sections, the relationship between url and page content, or any prerequisites. The low parameter semantics and lack of behavioral guidance make this incomplete for a new user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'selected sections' but does not explain what the `url` parameter is for beyond implying it points to a page, nor what the `sections` array should contain (e.g., heading names, slugs). The description adds minimal semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Read selected sections') on a resource ('chezmoi documentation page'), distinguishing it from siblings like read_documentation (which likely reads a whole page) and search_documentation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: the description and sibling names suggest this tool is for reading specific sections rather than entire pages. However, there is no explicit guidance on when to choose this vs read_documentation, or how sections should be identified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_documentationB

Search the official chezmoi documentation and return ranked matches.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds that results are 'ranked matches', which is useful behavioral context beyond the tool's name. However, without annotations, it does not disclose any limitations, whether the search covers full text, or any side effects. Still, the read-only nature is implied by 'search', and the output schema covers return details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the action and resource directly. No waste, every word contributes to understanding the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description lacks usage guidelines and parameter semantics. Given the simplicity of the tool, a complete description should at least note that 'query' is required and 'limit' controls the number of results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not mention the 'query' or 'limit' parameters. The agent gets no semantic guidance on how to construct values, especially the meaning of 'limit' and any constraints on 'query'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'search' with a clear resource 'official chezmoi documentation' and an outcome 'return ranked matches'. This clearly distinguishes it from sibling tools like read_documentation and list_documentation_pages, which imply different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tools. It does not mention scenarios or alternatives, leaving the agent without contextual selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct action: searching, reading a full page, reading specific sections, and listing available pages. There is no meaningful overlap between these operations.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (search_documentation, read_documentation, read_sections, list_documentation_pages), making the set predictable and easy to navigate.

Tool Count5/5

Four tools is well-scoped for a documentation server, covering the essential tasks without unnecessary duplication. Each tool has a clear purpose and earns its place.

Completeness5/5

The tool surface covers the full workflow for documentation access: discovering pages, searching content, reading entire pages, and reading specific sections. No obvious gaps exist for the stated purpose.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables access to OpenTelemetry documentation by fetching and converting pages to markdown format and searching content using Google Custom Search. Provides comprehensive documentation lookup and search capabilities for OpenTelemetry concepts, instrumentation, and configuration.
    2
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides direct access to local documentation files through simple search and overview tools, enabling LLMs to query project-specific markdown documentation without requiring vector databases or RAG pipelines.
    MIT
  • A
    license
    B
    quality
    F
    maintenance
    Automatically crawls documentation websites, converts them to organized markdown files, and generates condensed cheat sheets. Intelligently categorizes content into tools/APIs and provides local-first access to downloaded documentation.
    3
    GPL 3.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Indexes documentation sites by base URL and serves keyword search, optional semantic search, and Markdown page retrieval as MCP tools, all from a single SQLite file.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/llamakko/chezmoi-documentation-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server