Repo Docs MCP

Repo Docs MCP

A generic MCP server that exposes local repository checkouts, allowing users to search and read code and documentation through natural language. It supports multiple instances, enabling seamless interaction with various codebases via configurable tool prefixes and URI schemes.

Category
Visit Server

README

Repo Docs MCP (Bun)

Generic MCP stdio server that exposes a local repository checkout (docs + code) to any MCP host.

Designed for the “one codebase, many instances” workflow:

  • you run the same server binary multiple times,
  • each instance points at a different repo via env,
  • each instance gets its own tool prefix + URI scheme.

What it provides

Tools (names are prefixed)

Given MCP_TOOL_PREFIX=telegraph, tools are:

  • telegraph_read_repo_file — read any text file from the repo checkout
  • telegraph_list_docs — list doc pages as slug -> docs/... (slug is inferred from the docs file path)
  • telegraph_get_doc — read a doc page by slug
  • telegraph_search_docs — search inside the docs directory
  • telegraph_search_code — search inside common code directories
  • telegraph_refresh_index — rebuild the docs index
  • telegraph_git_fetchgit fetch --prune --tags for the repo (optional helper)
  • telegraph_info — print server settings (paths, prefixes, etc.)

Resources (names are prefixed by URI scheme)

Given MCP_URI_SCHEME=telegraph, resources are:

  • telegraph://readme
  • telegraph://contributing
  • telegraph://doc/{slug}

Prompts

  • {prefix}_doc_writer — starter workflow for “write a guide / answer about this repo”.

Install

bun install
bun run build

Run (stdio)

MCP_REPO_ROOT=/ABS/PATH/to/repo \
MCP_TOOL_PREFIX=myrepo \
MCP_URI_SCHEME=myrepo \
bun run start

In stdio mode, logs go to stderr on purpose (stdout is reserved for MCP JSON-RPC).

Environment variables

Required:

  • MCP_REPO_ROOT — absolute path to the local repo checkout

Optional:

  • MCP_TOOL_PREFIX — tool name prefix (default: repo)
  • MCP_URI_SCHEME — resource URI scheme (default: derived from tool prefix)
  • MCP_REPO_LABEL — text label used in the prompt (default: basename of repo root)
  • MCP_DOCS_DIR — docs directory relative to repo root (default: docs)
  • MCP_DOCS_EXTS — comma-separated docs extensions (default: .md,.mdx)
  • MCP_CODE_DIRS — comma-separated dirs to search for code (default: src,config,routes,database,resources,tests)
  • MCP_CODE_EXTS — comma-separated extensions for code search (default: .php,.md,.json,.yml,.yaml,.xml,.ts,.js)

Limits:

  • MCP_MAX_FILE_BYTES (default: 512KB)
  • MCP_DEFAULT_MAX_CHARS (default: 50k chars)

Git helper:

  • MCP_GIT_AUTO_FETCH=1 — run git fetch --prune --tags once at server start (default: off)
  • MCP_GIT_FETCH_TIMEOUT_MS — timeout for the fetch command (default: 30000)

Compatibility:

  • If MCP_REPO_ROOT is not set, the server will fall back to MCP_TELEGRAPH_ROOT (legacy name).

Codex config (two instances; one codebase)

Add this to ~/.codex/config.toml:

[mcp_servers.telegraph_docs]
command = "/ABS/PATH/TO/bun"
cwd = "/ABS/PATH/TO/mcp"
args = ["run", "build/index.js"]

[mcp_servers.telegraph_docs.env]
MCP_REPO_ROOT = "/ABS/PATH/TO/telegraph"
MCP_TOOL_PREFIX = "telegraph"
MCP_URI_SCHEME = "telegraph"
MCP_REPO_LABEL = "defstudio/telegraph"


[mcp_servers.laravel_data_docs]
command = "/ABS/PATH/TO/bun"
cwd = "/ABS/PATH/TO/mcp"
args = ["run", "build/index.js"]

[mcp_servers.laravel_data_docs.env]
MCP_REPO_ROOT = "/ABS/PATH/TO/laravel-data"
MCP_TOOL_PREFIX = "laravel_data"
MCP_URI_SCHEME = "laravel-data"
MCP_REPO_LABEL = "spatie/laravel-data"

Claude Desktop config (two instances)

See claude_desktop_config.example.json.

Notes

  • Docs slugs are inferred from file paths (ordering prefixes like 01., 01-, 01_ are stripped).
  • If a doc file is index.md inside a folder, the slug is the folder name (e.g. guide/index.mdguide).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured