DevDocs MCP Server

DevDocs MCP Server

Enables AI assistants like Claude to search and retrieve technical documentation from a local DevDocs instance for hundreds of programming languages and frameworks.

Category
访问服务器

README

DevDocs MCP Server

A Model Context Protocol (MCP) stdio process that enables AI assistants like Claude to access your local DevDocs instance via HTTP, providing seamless search and retrieval of technical documentation for hundreds of programming languages, frameworks, and tools.

Quick Start

# Install via Homebrew
brew tap emaland/devdocs-mcp
brew install devdocs-mcp

# Start DevDocs
devdocs-mcp-start

# Configure Claude
claude mcp add --env DEVDOCS_URL=http://localhost:9292 devdocs /usr/local/bin/devdocs-mcp

# Restart Claude and start using!

Architecture: This is not an HTTP server - it's a stdio-based process that communicates with Claude using the MCP protocol. The MCP server connects to a separately running DevDocs instance (typically on http://localhost:9292) to fetch documentation.

Example use (Claude)

search svelte docs for how to manage state and describe to me what it says

⏺ I'll search the Svelte documentation for information about state management and describe what it says.

⏺ devdocs - search_docs (MCP)(slug: "svelte", query: "state management") ⎿ No matches found for 'state management' in svelte documentation

⏺ devdocs - search_docs (MCP)(slug: "svelte", query: "state") ⎿ Search results for 'state' in svelte:

 • $state [Runes] - path: `$state`
 … +1 line (ctrl+r to expand)

⏺ devdocs - get_doc_content (MCP)(slug: "svelte", path: "$state", format: "text") ⎿ $state On this page $state $state.raw $state.snapshot Passing state into functions Passing state across modules The $state rune allows you to create reactive st ate, which means that your UI reacts when it changes. <script> let count = $state(0); </script> <button onclick={() => count++}> clicks: {count} </button> Unlik e other frameworks you may have encountered, there is no API for interacting with state — count is just a number, rather than an object or a function, and you c … +46 lines (ctrl+r to expand)

⏺ Based on the Svelte documentation, here's what it says about state management:

Svelte State Management with $state Rune

[...]

Prerequisites

  1. DevDocs running locally on port 9292 (see options below)
  2. Pandoc for high-quality HTML to Markdown conversion:
    brew install pandoc
    

DevDocs Installation Options

Option 1: Quick Start with Pre-built Image (Multi-GB Download)

docker run --name devdocs -d -p 9292:9292 ghcr.io/freecodecamp/devdocs:latest

Note: This pulls the official DevDocs image which includes ALL documentation sets (multiple gigabytes).

Option 2: Build Custom Image with Selected Docs (via Homebrew)

If you installed via Homebrew, you can build a custom DevDocs image with only the docs you need:

# List available documentation sets
devdocs-mcp-build --list

# Build with specific docs only
devdocs-mcp-build svelte tailwindcss react

# Or use preset collections
devdocs-mcp-build --minimal     # Just essential docs
devdocs-mcp-build --popular     # Common documentation
devdocs-mcp-build --frontend    # Frontend-focused

This approach creates a much smaller image with only the documentation sets you need.

Option 3: Build Minimal DevDocs Manually

For a smaller, faster setup with only the documentation you need:

  1. Clone the DevDocs repository:

    git clone https://github.com/freeCodeCamp/devdocs.git
    cd devdocs
    
  2. Modify the DevDocs Dockerfile to include only specific docs:

    # Edit the DevDocs Dockerfile and change this line:
    - RUN thor docs:download --all && \
    + RUN thor docs:download svelte tailwindcss vite && \
    

    You can specify any documentation sets you need. Popular options include:

    • react vue angular svelte (frontend frameworks)
    • python javascript typescript go rust (languages)
    • django rails express fastapi (backend frameworks)
    • postgresql mongodb redis (databases)
    • docker kubernetes terraform (DevOps)

    Run thor docs:list in the DevDocs directory to see all available options.

  3. Build the custom image:

    # For most systems:
    docker buildx build -t devdocs:latest --load .
    
  4. Run your custom DevDocs:

    docker run --name devdocs -d -p 9292:9292 devdocs:latest
    

Installation

Using Homebrew (Recommended)

# Install the MCP server
brew tap emaland/devdocs-mcp
brew install devdocs-mcp

# Configure Claude
claude mcp add --env DEVDOCS_URL=http://localhost:9292 devdocs /usr/local/bin/devdocs-mcp

# Test the connection (optional)
devdocs-mcp-cli list

From Source

  1. Install uv:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Clone and set up the project:

    git clone https://github.com/emaland/devdocs-mcp.git
    cd devdocs-mcp
    uv sync
    
  3. Ensure DevDocs is running (see Prerequisites above)

  4. Add MCP server to Claude:

    claude mcp add --env DEVDOCS_URL=http://localhost:9292 devdocs /path/to/devdocs-mcp/devdocs_mcp_server.py
    

Available Commands (Homebrew Installation)

After installing via Homebrew, you get these commands:

Command Purpose
devdocs-mcp MCP server (called automatically by Claude)
devdocs-mcp-cli CLI tool to test and explore DevDocs
devdocs-mcp-start Start DevDocs Docker container
devdocs-mcp-stop Stop DevDocs Docker container
devdocs-mcp-build Build custom DevDocs with selected docs

Using Docker Compose

Run DevDocs in Docker (the MCP server runs as a stdio process through Claude):

docker-compose up -d

Note: This starts DevDocs in a container. The MCP server itself runs as a subprocess of Claude, not in Docker.

CLI Tool

A command-line interface is provided for testing and exploring the MCP endpoints:

# If installed via Homebrew
devdocs-mcp-cli list
devdocs-mcp-cli search svelte component
devdocs-mcp-cli interactive

# Or if running from source
uv run python scripts/cli.py list

# Search in a specific documentation set
uv run python scripts/cli.py search svelte component
uv run python scripts/cli.py search tailwindcss color

# Get content from a documentation page
uv run python scripts/cli.py get svelte introduction
uv run python scripts/cli.py get tailwindcss installation

# Interactive mode for exploration
uv run python scripts/cli.py interactive

# Use different output formats
uv run python scripts/cli.py list --format json
uv run python scripts/cli.py get svelte introduction --format html

# Connect to a different DevDocs instance
uv run python scripts/cli.py --url http://localhost:3000 list

Interactive Mode

The interactive mode provides a REPL-like interface:

devdocs> list                    # List all documentation sets
devdocs> slugs                   # Show just the slugs for easy copying
devdocs> search svelte state     # Search for 'state' in Svelte docs
devdocs> get svelte introduction # Get content from a page
devdocs> help                    # Show available commands
devdocs> quit                    # Exit

Development

Install development dependencies:

uv sync --group dev

Run tests:

# Run all pytest tests
uv run pytest

# Run tests with verbose output
uv run pytest -v

# Run integration tests only
uv run python tests/test_integration.py

# Run all tests including linting
uv run python scripts/test.py

Code formatting:

uv run black .
uv run ruff check .

Available Tools

list_docs

Lists all available documentation sets in the DevDocs instance.

Example output:

• Svelte (v5.33.11) - slug: `svelte`
• Tailwind CSS (v4.1.11) - slug: `tailwindcss`
• React - slug: `react`

search_docs

Search for entries within a specific documentation set.

Parameters:

  • slug: Documentation set identifier (e.g., "svelte", "tailwindcss")
  • query: Search term to find matching entries

Example:

search_docs(slug="svelte", query="component")

get_doc_content

Retrieve the full content of a specific documentation page.

Parameters:

  • slug: Documentation set identifier
  • path: Path to the documentation page
  • format: Return format ("text" or "html", defaults to "text")

Example:

get_doc_content(slug="svelte", path="introduction", format="text")

Usage with Claude Desktop

Quick Setup

  1. Ensure DevDocs is running (see Prerequisites section above for options)

  2. Configure Claude Desktop:

    Using Claude CLI (recommended):

    # If running from source:
    claude mcp add --env DEVDOCS_URL=http://localhost:9292 devdocs /path/to/mcp/devdocs_mcp_server.py
    
    # If installed via Homebrew:
    claude mcp add --env DEVDOCS_URL=http://localhost:9292 devdocs /usr/local/bin/devdocs-mcp
    

    Or manually edit Claude's config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
    {
      "mcpServers": {
        "devdocs": {
          "command": "uv",
          "args": ["run", "python", "devdocs_mcp_server.py"],
          "cwd": "/path/to/devdocs/mcp",
          "env": {
            "DEVDOCS_URL": "http://localhost:9292"
          }
        }
      }
    }
    
  3. Restart Claude Desktop to load the MCP server.

See CLAUDE_SETUP.md for detailed setup instructions and troubleshooting.

Environment Variables

  • DEVDOCS_URL: URL of the DevDocs instance (default: http://localhost:9292)

Quick Start

# Quick setup with automatic configuration
./scripts/quick-setup.sh

# Or use the install script for more options
./scripts/install.sh

Scripts

All scripts are located in the scripts/ directory:

  • scripts/quick-setup.sh - Quick setup with uv and Docker
  • scripts/install.sh - Installation wizard with multiple options
  • scripts/build-devdocs.sh - Build custom DevDocs with selected documentation
  • scripts/cli.py - Interactive CLI for testing MCP endpoints
  • scripts/test.py - Run all tests including linting
  • scripts/dev.py - Development helper scripts
  • scripts/update-homebrew-sha.sh - Update SHA256 hashes for Homebrew formula
  • scripts/run_mcp_server.sh - Run the MCP server with Docker

The devdocs CLI wrapper remains for convenient access to the CLI:

  • ./devdocs list - List available documentation
  • ./devdocs search svelte component - Search documentation
  • ./devdocs interactive - Interactive mode

Building Custom DevDocs

Instead of downloading the full multi-GB DevDocs image, you can build a custom image with only the documentation you need:

# Build with specific docs
./scripts/build-devdocs.sh svelte tailwindcss react

# Build with popular documentation sets
./scripts/build-devdocs.sh --popular

# Build with frontend-focused docs
./scripts/build-devdocs.sh --frontend

# List all available documentation sets
./scripts/build-devdocs.sh --list

# Build for specific platform
./scripts/build-devdocs.sh --platform linux/arm64 python django

After building, the script will:

  1. Create a custom Docker image (e.g., devdocs:custom)
  2. Optionally update docker-compose.yml to use your custom image
  3. Allow you to use devdocs-mcp-start and devdocs-mcp-stop with your custom build

This is especially useful for:

  • Reducing disk space (custom builds are much smaller)
  • Faster startup times
  • Including only relevant documentation for your projects

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选