MCP Server Documentation Access for llms.txt Files
Enable MCP server documentation access for AI agents, supporting llms.txt and other remote or local files for seamless knowledge retrieval.
npx -y @da1z/docsmcpOverview
This MCP (Model Context Protocol) server exposes documentation and other text assets to AI agents and tooling so they can retrieve knowledge from local or remote sources. It makes llms.txt files and arbitrary documentation reachable over HTTP, normalizes common discovery patterns, and supports backend storage options such as a local filesystem, Git repositories, or remote URLs. The server is useful when you want agents to access curated context (APIs, docs, design notes) without embedding those assets directly into the model.
By providing a small, predictable HTTP surface and optional manifests, the MCP server reduces friction for retrieval-augmented workflows: agents can discover llms.txt, fetch documents, and stream content for indexing, summarization, or contextual completion. This approach enables incremental updates and consistent access control while keeping integrations simple for developers building AI assistants and tooling.
Features
- Serve llms.txt and other plain-text or markdown files to AI agents
- Support for local filesystem, Git-backed docs, and remote HTTP sources
- Discovery endpoints (manifest / well-known) for automatic agent discovery
- Optional access control and CORS configuration for hosted deployments
- Docker-friendly and minimal dependency install for development
- Simple HTTP API that returns raw content and metadata (size, mime, updated)
Installation / Configuration
Clone the repository and run with Docker or locally. Example commands below assume a Unix-like environment.
Clone:
Run with Docker:
# build and run
Run locally (Python/Node runtime may vary; this demonstrates a generic entry):
# install deps (example for a Python/uvicorn-based server)
Configuration environment variables (common):
| Variable | Default | Description |
|---|---|---|
| MCP_PORT | 8080 | Port the server listens on |
| MCP_STORAGE_PATH | ./docs | Local path to serve files from |
| MCP_ORIGINS | * | CORS allowed origins (comma-separated) |
| MCP_REMOTE_SOURCES | (none) | Comma-separated list of remote docs or Git URLs to include |
API examples (assumes server at http://localhost:8080):
# discover server manifest (well-known entry)
# fetch repository llms.txt (served at root)
# fetch a specific file (markdown, text)
Available Resources
The MCP server exposes a small set of resources useful to agents and developers:
- /.well-known/mcp — JSON manifest describing available contexts and endpoints (discovery)
- /llms.txt — combined or repository-level llms.txt used to declare agents’ instructions or allowed resources
- /files/{path} — raw file content (supports markdown, text, txt, code)
- Optional storage backends:
- Local filesystem directory
- Git repository clone (periodic sync)
- Remote HTTP/HTTPS URLs (proxied or indexed)
- Cloud object storage (S3-compatible) via configuration
Sample .well-known/mcp response (illustrative):
Sample llms.txt:
# llms.txt - allowed and recommended contexts
Allow: /files/specs/*
Deny: /files/private/*
Priority: /files/overview.md
Use Cases
Agent context retrieval
- An assistant can use the /.well-known/mcp manifest to discover where llms.txt lives and then fetch /llms.txt to learn which document paths are safe or high-priority for answering user queries.
RAG (Retrieval-Augmented Generation) ingestion
- Periodically pull /files/* content to index into a vector store. The manifest can enumerate remote Git or HTTP sources to include in the ingestion pipeline.
Automated documentation summarization
- A job fetches the latest docs via /files and runs summarizers to produce concise changelogs or release notes for models to reference.
Secure shared knowledge for multi-agent systems
- Use CORS and access controls to limit which agents or services can fetch sensitive context while still exposing public docs.
Concrete example — fetch and index:
=
=
= .
= .
# pass 'content' to vectorizer / tokenizer / indexer
Notes for Developers
- Keep llms.txt authoritative: agents commonly use