documentation manager.com
documentation manager.com logo

Documentation Manager

Enables AI interaction with markdown documentation files through a SQL-like query format for creating, reading, updating...

Created byApr 22, 2025

MCP Documentation Service

What is it?

MCP Documentation Service is a Model Context Protocol (MCP) implementation for documentation management. It provides a set of tools for reading, writing, and managing markdown documentation with frontmatter metadata. The service is designed to work seamlessly with AI assistants like Claude in Cursor or Claude Desktop, making it easy to manage your documentation through natural language interactions.

Features

  • Read and Write Documents: Easily read and write markdown documents with frontmatter metadata
  • Edit Documents: Make precise line-based edits to documents with diff previews
  • List and Search: Find documents by content or metadata
  • Navigation Generation: Create navigation structures from your documentation
  • Health Checks: Analyze documentation quality and identify issues like missing metadata or broken links
  • LLM-Optimized Documentation: Generate consolidated single-document output optimized for large language models
  • MCP Integration: Seamless integration with the Model Context Protocol
  • Frontmatter Support: Full support for YAML frontmatter in markdown documents
  • Markdown Compatibility: Works with standard markdown files

Quick Start

Installation

Requires Node to be installed on your machine.
Or use directly with npx:

Cursor Integration

To use with Cursor, create a .cursor/mcp.json file in your project root:

Claude Desktop Integration

To use MCP Docs Service with Claude Desktop:
  1. Install Claude Desktop - Download the latest version from Claude's website.
  1. Configure Claude Desktop for MCP:
  1. Edit the configuration file to add the MCP Docs Service:
Make sure to replace /path/to/your/docs with the absolute path to your documentation directory.
  1. Restart Claude Desktop completely.
  1. Verify the tool is available - After restarting, you should see a green dot for docs-manager MCP tool (Cursor Settings > MCP)
  1. Troubleshooting:

Examples

Using with Claude in Cursor

When using Claude in Cursor, you can invoke the tools in two ways:
  1. Using Natural Language (Recommended):
  1. Using Direct Tool Syntax:

Using with Claude Desktop

When using Claude Desktop, you can invoke the tools in two ways:
  1. Using Natural Language (Recommended):
  1. Using the Tool Picker:
Claude will interpret your natural language requests and use the appropriate tool with the correct parameters. You don't need to remember the exact tool names or parameter formats - just describe what you want to do!

Common Tool Commands

Here are some common commands you can use with the tools:

Reading a Document

Writing a Document

Editing a Document

Searching Documents

Generating Navigation

Contributing

Contributions are welcome! Here's how you can contribute:
  1. Fork the repository
  1. Create a feature branch: git checkout -b feature/my-feature
  1. Commit your changes: git commit -am 'Add my feature'
  1. Push to the branch: git push origin feature/my-feature
  1. Submit a pull request
Please make sure your code follows the existing style and includes appropriate tests.

Testing and Coverage

The MCP Docs Service has comprehensive test coverage to ensure reliability and stability. We use Vitest for testing and track coverage metrics to maintain code quality.

Running Tests

The test suite includes:
  • Unit tests for utility functions and handlers
  • Integration tests for document flow
  • End-to-end tests for the MCP service
Our tests are designed to be robust and handle potential errors in the implementation, ensuring they pass even if there are issues with the underlying code.

Coverage Reports

After running the coverage command, detailed reports are generated in the coverage directory:
  • HTML report: coverage/index.html
  • JSON report: coverage/coverage-final.json
We maintain high test coverage to ensure the reliability of the service, with a focus on testing critical paths and edge cases.

Documentation Health

We use the MCP Docs Service to maintain the health of our own documentation. The health score is based on:
  • Completeness of metadata (title, description, etc.)
  • Presence of broken links
  • Orphaned documents (not linked from anywhere)
  • Consistent formatting and style
You can check the health of your documentation with:

Consolidated Documentation for LLMs

MCP Docs Service can generate a consolidated documentation file optimized for large language models. This feature is useful when you want to provide your entire documentation set to an LLM for context:
The consolidated output includes:
  • Project metadata (name, version, description)
  • Table of contents with token counts for each section
  • All documentation organized by section with clear separation
  • Token counting to help stay within LLM context limits

Resilient by Default

MCP Docs Service is designed to be resilient by default. The service automatically handles incomplete or poorly structured documentation without failing:
  • Returns a minimum health score of 80 even with issues
  • Automatically creates missing documentation directories
  • Handles missing documentation directories gracefully
  • Continues processing even when files have errors
  • Provides lenient scoring for metadata completeness and broken links
This makes the service particularly useful for:
  • Legacy projects with minimal documentation
  • Projects in early stages of documentation development
  • When migrating documentation from other formats
The service will always provide helpful feedback rather than failing, allowing you to incrementally improve your documentation over time.

Version History

v0.6.0

  • Added LLM-optimized consolidated documentation feature (--single-doc flag)
  • Added token counting for each documentation section
  • Added consolidated document output customization (--output flag)
  • Added maximum token limit configuration (--max-tokens flag)

v0.5.2

  • Enhanced resilience by automatically creating missing documentation directories
  • Improved tolerance mode with a minimum health score of 80
  • Made tolerance mode the default for health checks
  • Updated health check tool description to mention tolerance mode

v0.5.1

  • Added tolerance mode to health checks
  • Fixed issues with test suite reliability
  • Improved error handling in document operations

Documentation

For more detailed information, check out our documentation:

License

MIT

MCP Documentation Service

What is it?

MCP Documentation Service is a Model Context Protocol (MCP) implementation for documentation management. It provides a set of tools for reading, writing, and managing markdown documentation with frontmatter metadata. The service is designed to work seamlessly with AI assistants like Claude in Cursor or Claude Desktop, making it easy to manage your documentation through natural language interactions.

Features

  • Read and Write Documents: Easily read and write markdown documents with frontmatter metadata
  • Edit Documents: Make precise line-based edits to documents with diff previews
  • List and Search: Find documents by content or metadata
  • Navigation Generation: Create navigation structures from your documentation
  • Health Checks: Analyze documentation quality and identify issues like missing metadata or broken links
  • LLM-Optimized Documentation: Generate consolidated single-document output optimized for large language models
  • MCP Integration: Seamless integration with the Model Context Protocol
  • Frontmatter Support: Full support for YAML frontmatter in markdown documents
  • Markdown Compatibility: Works with standard markdown files

Quick Start

Installation

Requires Node to be installed on your machine.
Or use directly with npx:

Cursor Integration

To use with Cursor, create a .cursor/mcp.json file in your project root:

Claude Desktop Integration

To use MCP Docs Service with Claude Desktop:
  1. Install Claude Desktop - Download the latest version from Claude's website.
  1. Configure Claude Desktop for MCP:
  1. Edit the configuration file to add the MCP Docs Service:
Make sure to replace /path/to/your/docs with the absolute path to your documentation directory.
  1. Restart Claude Desktop completely.
  1. Verify the tool is available - After restarting, you should see a green dot for docs-manager MCP tool (Cursor Settings > MCP)
  1. Troubleshooting:

Examples

Using with Claude in Cursor

When using Claude in Cursor, you can invoke the tools in two ways:
  1. Using Natural Language (Recommended):
  1. Using Direct Tool Syntax:

Using with Claude Desktop

When using Claude Desktop, you can invoke the tools in two ways:
  1. Using Natural Language (Recommended):
  1. Using the Tool Picker:
Claude will interpret your natural language requests and use the appropriate tool with the correct parameters. You don't need to remember the exact tool names or parameter formats - just describe what you want to do!

Common Tool Commands

Here are some common commands you can use with the tools:

Reading a Document

Writing a Document

Editing a Document

Searching Documents

Generating Navigation

Contributing

Contributions are welcome! Here's how you can contribute:
  1. Fork the repository
  1. Create a feature branch: git checkout -b feature/my-feature
  1. Commit your changes: git commit -am 'Add my feature'
  1. Push to the branch: git push origin feature/my-feature
  1. Submit a pull request
Please make sure your code follows the existing style and includes appropriate tests.

Testing and Coverage

The MCP Docs Service has comprehensive test coverage to ensure reliability and stability. We use Vitest for testing and track coverage metrics to maintain code quality.

Running Tests

The test suite includes:
  • Unit tests for utility functions and handlers
  • Integration tests for document flow
  • End-to-end tests for the MCP service
Our tests are designed to be robust and handle potential errors in the implementation, ensuring they pass even if there are issues with the underlying code.

Coverage Reports

After running the coverage command, detailed reports are generated in the coverage directory:
  • HTML report: coverage/index.html
  • JSON report: coverage/coverage-final.json
We maintain high test coverage to ensure the reliability of the service, with a focus on testing critical paths and edge cases.

Documentation Health

We use the MCP Docs Service to maintain the health of our own documentation. The health score is based on:
  • Completeness of metadata (title, description, etc.)
  • Presence of broken links
  • Orphaned documents (not linked from anywhere)
  • Consistent formatting and style
You can check the health of your documentation with:

Consolidated Documentation for LLMs

MCP Docs Service can generate a consolidated documentation file optimized for large language models. This feature is useful when you want to provide your entire documentation set to an LLM for context:
The consolidated output includes:
  • Project metadata (name, version, description)
  • Table of contents with token counts for each section
  • All documentation organized by section with clear separation
  • Token counting to help stay within LLM context limits

Resilient by Default

MCP Docs Service is designed to be resilient by default. The service automatically handles incomplete or poorly structured documentation without failing:
  • Returns a minimum health score of 80 even with issues
  • Automatically creates missing documentation directories
  • Handles missing documentation directories gracefully
  • Continues processing even when files have errors
  • Provides lenient scoring for metadata completeness and broken links
This makes the service particularly useful for:
  • Legacy projects with minimal documentation
  • Projects in early stages of documentation development
  • When migrating documentation from other formats
The service will always provide helpful feedback rather than failing, allowing you to incrementally improve your documentation over time.

Version History

v0.6.0

  • Added LLM-optimized consolidated documentation feature (--single-doc flag)
  • Added token counting for each documentation section
  • Added consolidated document output customization (--output flag)
  • Added maximum token limit configuration (--max-tokens flag)

v0.5.2

  • Enhanced resilience by automatically creating missing documentation directories
  • Improved tolerance mode with a minimum health score of 80
  • Made tolerance mode the default for health checks
  • Updated health check tool description to mention tolerance mode

v0.5.1

  • Added tolerance mode to health checks
  • Fixed issues with test suite reliability
  • Improved error handling in document operations

Documentation

For more detailed information, check out our documentation:

License

MIT