Local Docs MCP Server logo

Local Docs MCP Server

Community
umputun

MCP serving local docs

Publisherumputun
Repositorylocal-docs-mcp
LanguageGo
Forks
2
Stars
21
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Local Docs MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    21 stars and 2 forks from the linked repository.

Local Docs MCP Server build  Coverage Status

Implementation of the Model Context Protocol (MCP) server for local documentation access. Provides Claude with seamless access to markdown documentation from multiple sources.

Features

  • Multi-source documentation: Access docs from commands, project docs, and project root
  • Smart search: Fuzzy matching with exact/substring match priority
  • YAML frontmatter support: Optional metadata for enhanced search (description, tags)
  • Always-on caching: File list caching with automatic invalidation on changes (~3000x faster)
  • File watching: Automatic cache invalidation when documentation files change
  • Safe path handling: Prevents directory traversal and validates paths
  • Source prefixes: Explicitly specify documentation source (e.g., commands:file.md)
  • Size limits: Prevents reading files larger than 5MB

Documentation Sources

  1. Shared Docs (~/.claude/commands/**/*.md): User commands and knowledge bases (configurable)
  2. Project Docs ($CWD/docs/**/*.md): Project-specific documentation with configurable exclusions
  3. Project Root ($CWD/*.md): Root-level docs like README.md (opt-in)

YAML Frontmatter Support

Documentation files can optionally include YAML frontmatter for enhanced searchability:

markdown
---
description: Enforce Test-Driven Development approach for Go code with test-first workflow
tags: [testing, development, go]
---

# Your Documentation Content

Supported fields:

  • description: Text description used to boost search relevance
  • tags: Array or comma-separated list of tags for categorization

Search behavior:

  • Description matches add +0.5 to search score
  • Exact tag matches add +0.3 to search score
  • Partial tag matches add +0.15 to search score
  • Frontmatter is automatically stripped from read_doc output
  • list_all_docs includes description and tags in file metadata

Note: Frontmatter is completely optional - plain markdown files work perfectly without it.

Installation

Download Binary

Download the latest release from the releases page.

Using Go

bash
go install github.com/umputun/local-docs-mcp/app@latest

Using Homebrew (macOS)

bash
brew tap umputun/apps
brew install umputun/apps/local-docs-mcp

Build from Source

bash
git clone https://github.com/umputun/local-docs-mcp.git
cd local-docs-mcp
make build
make install

Configure Claude

Add to ~/.claude.json:

json
{
  "mcpServers": {
    "local-docs": {
      "command": "local-docs-mcp"
    }
  }
}

Or use absolute path:

json
{
  "mcpServers": {
    "local-docs": {
      "command": "/path/to/local-docs-mcp"
    }
  }
}

Restart Claude Code to load the server.

Configuration

Command Line Options

bash
# customize documentation directories
local-docs-mcp --shared-docs-dir=~/.my-docs --docs-dir=documentation

# enable root-level markdown scanning
local-docs-mcp --enable-root-docs

# exclude directories from project docs scan
local-docs-mcp --exclude-dir=plans --exclude-dir=drafts

# multiple exclusions via environment variable
EXCLUDE_DIRS=plans,drafts,archive local-docs-mcp

Available options:

  • --shared-docs-dir - shared documentation directory (default: ~/.claude/commands)
  • --docs-dir - project docs directory (default: docs)
  • --enable-root-docs - scan root-level *.md files (default: disabled)
  • --exclude-dir - directories to exclude from project docs scan (default: plans)
  • --cache-ttl - cache time-to-live (default: 1h)
  • --max-file-size - maximum file size in bytes to index (default: 5242880 - 5MB)
  • --dbg - enable debug logging

Caching

File list caching is always enabled for significantly faster repeated queries. The cache TTL can be configured:

bash
# use default 1h TTL
local-docs-mcp

# custom TTL
local-docs-mcp --cache-ttl=30m

# via environment variable
CACHE_TTL=2h local-docs-mcp

Performance: Cache hits are ~3,000x faster than filesystem scans (66 nanoseconds vs 201 microseconds). The cache automatically invalidates when documentation files change, ensuring fresh data.

How it works:

  • First query scans filesystem and populates cache
  • Subsequent queries return instantly from memory
  • File watcher detects changes and invalidates cache within 500ms
  • TTL provides safety fallback (default: 1 hour)

Usage

Once configured, Claude can query documentation naturally:

  • "Show me docs for routegroup"
  • "Find documentation about testing"
  • "List all available commands"
  • "What's in the go-architect command?"

Available Tools

search_docs

Search for documentation files by name with fuzzy matching.

Input: {"query": "search-term"}

Output: Top 10 matching files with scores

read_doc

Read a specific documentation file.

Input: {"path": "file.md"} or {"path": "commands:action/commit.md"}

Output: File content with metadata

list_all_docs

List all available documentation files from all sources.

Output: Complete file listing with sizes and source information

Security

  • Path traversal prevention
  • File size limits (5MB)
  • UTF-8 validation
  • No symlink following outside base directories
  • Absolute path rejection

License

This project is licensed under the MIT License - see the LICENSE file for details.

Installation

TypingMind
{
  "mcpServers": {
    "local-docs-mcp": {
      "command": "local-docs-mcp",
      "args": []
    }
  }
}

Use Local Docs MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Local Docs MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Local Docs MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Local Docs MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "local-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Local Docs MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Local Docs MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Local Docs MCP Server to help me with this task?
Local Docs MCP Server
Sure. I read it.
Here is what I found using Local Docs MCP Server.

Frequently asked questions

What is the Local Docs MCP Server MCP server used for?

Local Docs MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Local Docs MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Local Docs MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Local Docs MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Local Docs MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Local Docs MCP Server MCP to TypingMind?

Local Docs MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Local Docs MCP Server MCP provide in TypingMind?

Local Docs MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Local Docs MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Local Docs MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇