Sponsored by Deepsite.site

docs-to-mcp-cli

Created By
AzureDevOpsAPI8 months ago
A CLI utility for turning your docs into a stdio MCP server
Content

docs-to-mcp-cli

A CLI tool that generates a self-contained, runnable MCP (Model Context Protocol) server that exposes markdown documentation via specific tools.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to access external tools and data sources. By converting your documentation to an MCP server, you allow AI assistants to:

  • Browse through your documentation
  • Search for specific information
  • Access the full content of any document
  • Use your documentation to provide more accurate and contextual responses

Installation

You can install the tool globally:

npm install -g @tiberriver256/docs-to-mcp-cli

Or use it directly with npx:

npx @tiberriver256/docs-to-mcp-cli --docs "path/to/docs/**/*.md" --packageName MyDocsServer

Usage

docs-to-mcp-cli --docs <pattern> --packageName <n> [--outDir <dir>] [--toolName <name>]

Options

  • -d, --docs <pattern>: Glob pattern for markdown files (required)
  • -p, --packageName <n>: Name for the generated MCP server (required)
  • -o, --outDir <dir>: Output directory for the bundled server (default: "dist")
  • -t, --toolName <name>: Name of the tool/package/library being documented (used in tool descriptions)
  • -v, --version: Output the current version

Examples

# Generate a server from all markdown files in the docs directory
docs-to-mcp-cli --docs "docs/**/*.md" --packageName ProjectDocs

# Specify a custom tool name and output directory
docs-to-mcp-cli --docs "documentation/**/*.md" --packageName APIDocsServer --toolName "My API" --outDir build

# Run the generated server
node dist/index.js

Generated Server Tools

The generated MCP server provides the following tools to AI assistants:

  • list_docs: Lists all available documents with a preview of their content
  • get_doc: Gets the full content of a specific document by its path
  • search_docs: Searches across all documents using fuzzy matching

Integration with AI Assistants

Once your MCP server is running, AI assistants that support the Model Context Protocol can connect to it and access your documentation. This enables the AI to provide more accurate and contextual responses based on your specific documentation.

Development

To build the CLI tool locally:

# Clone the repository
git clone https://github.com/Tiberriver256/docs-to-mcp-cli.git
cd docs-to-mcp-cli

# Install dependencies
npm install

# Build the project
npm run build

# Link for local development
npm link

Current Version

The current version is 1.1.2. See the CHANGELOG.md for details on recent updates.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.