Aleks Petrov/mcp-docs-service
Built by Metorial, the integration platform for agentic AI.
Aleks Petrov/mcp-docs-service
Server Summary
Read markdown files
Write markdown files
Update markdown files
Delete markdown files
Analyze documentation quality
Manage frontmatter metadata
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.
Requires Node to be installed on your machine.
npm install -g mcp-docs-service
Or use directly with npx:
npx mcp-docs-service /path/to/docs
To use with Cursor, create a .cursor/mcp.json
file in your project root:
{
"mcpServers": {
"docs-manager": {
"command": "npx",
"args": ["-y", "mcp-docs-service", "/path/to/your/docs"]
}
}
}
To use MCP Docs Service with Claude Desktop:
Install Claude Desktop - Download the latest version from Claude's website.
Configure Claude Desktop for MCP:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Edit the configuration file to add the MCP Docs Service:
{
"mcpServers": {
"docs-manager": {
"command": "npx",
"args": ["-y", "mcp-docs-service", "/path/to/your/docs"]
}
}
}
Make sure to replace /path/to/your/docs
with the absolute path to your documentation directory.
Restart Claude Desktop completely.
Verify the tool is available - After restarting, you should see a green dot for docs-manager MCP tool (Cursor Settings > MCP)
Troubleshooting:
~/Library/Logs/Claude/mcp*.log
%APPDATA%\Claude\logs\mcp*.log
When using Claude in Cursor, you can invoke the tools in two ways:
Can you search my documentation for anything related to "getting started"?
Please list all the markdown files in my docs directory.
Could you check if there are any issues with my documentation?
@docs-manager mcp_docs_manager_read_document path=docs/getting-started.md
@docs-manager mcp_docs_manager_list_documents recursive=true
@docs-manager mcp_docs_manager_check_documentation_health
When using Claude Desktop, you can invoke the tools in two ways:
Can you read the README.md file for me?
Please find all documents that mention "API" in my documentation.
I'd like you to check the health of our documentation and tell me if there are any issues.
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!
Here are some common commands you can use with the tools:
@docs-manager mcp_docs_manager_read_document path=docs/getting-started.md
@docs-manager mcp_docs_manager_write_document path=docs/new-document.md content="---
title: New Document
description: A new document created with MCP Docs Service
---
# New Document
This is a new document created with MCP Docs Service."
@docs-manager mcp_docs_manager_edit_document path=README.md edits=[{"oldText":"# Documentation", "newText":"# Project Documentation"}]
@docs-manager mcp_docs_manager_search_documents query="getting started"
@docs-manager mcp_docs_manager_generate_navigation
Contributions are welcome! Here's how you can contribute:
git checkout -b feature/my-feature
git commit -am 'Add my feature'
git push origin feature/my-feature
Please make sure your code follows the existing style and includes appropriate tests.
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.
# Run all tests
npm test
# Run tests with coverage report
npm run test:coverage
The test suite includes:
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.
After running the coverage command, detailed reports are generated in the coverage
directory:
coverage/index.html
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.
We use the MCP Docs Service to maintain the health of our own documentation. The health score is based on:
You can check the health of your documentation with:
npx mcp-docs-service --health-check /path/to/docs
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:
# Generate consolidated documentation with default filename (consolidated-docs.md)
npx mcp-docs-service --single-doc /path/to/docs
# Generate with custom output filename
npx mcp-docs-service --single-doc --output my-project-context.md /path/to/docs
# Limit the total tokens in the consolidated documentation
npx mcp-docs-service --single-doc --max-tokens 100000 /path/to/docs
The consolidated output includes:
MCP Docs Service is designed to be resilient by default. The service automatically handles incomplete or poorly structured documentation without failing:
This makes the service particularly useful for:
The service will always provide helpful feedback rather than failing, allowing you to incrementally improve your documentation over time.
For more detailed information, check out our documentation:
MIT