AX
Axle-Bucamp/MCP-Docusaurus
an MCP tool for Docusorus agent system. Usefull to make git doc with human interaction.
๐ง MCP Docusaurus Toolkit
A modular Content Management Platform (MCP) to manage, embed, and search Docusaurus documentation using FastAPI, self-hosted embeddings, and PostgreSQL + pgvector.
๐ Features
- ๐ Auto-generate site map from Docusaurus docs
- ๐ Create, update, and continue editing Markdown docs
- ๐ง Vectorize content using pluggable embedding models
- ๐ Perform RAG-style semantic search across the docs
- ๐งพ Track incomplete docs with watermarks
- ๐ Sync external edits into the vector database
- ๐จ Apply style/theme transformations to docs
- ๐งช Built-in tool decorators for AI agent control
๐ Project Structure
.
โโโ app/
โ โโโ main.py # FastAPI entrypoint with FastMCP + tools
โ โโโ routes/ # Modular endpoints (docs, search, styles, site\_map)
โ โโโ embeddings/ # Embedding model configuration + logic
โ โโโ database.py # PostgreSQL + pgvector connection logic
โ โโโ models/ # DB + Pydantic models for documents
โ โโโโ utils/ # Sync tools, helpers
โ โโโ docs/ # Full editable Docusaurus source (used in dev mode)
โ
โโโ data/
โ โโโ docusaurus/ # Runtime-synced Markdown docs
โ โโโ embeddings/ # Persisted vector embeddings
โ
โโโ Dockerfile # Multi-stage (Node + Python)
โโโ docker-compose.yml # Services: FastAPI, Docusaurus Dev, Postgres
โโโ requirements.txt
โโโ README.md
๐ณ Getting Started (Docker)
# 1. Clone this repository
git clone https://github.com/your-org/mcp-docusaurus.git
cd mcp-docusaurus
# 2. Launch services
docker compose up --build- ๐ MCP API available at: http://localhost:8000
- ๐ Docusaurus live dev server: http://localhost:3000
๐งฐ Tooling Overview (MCP API)
โ Create a New Document
POST /tool/create_document{
"path": "guides/new-feature.md",
"title": "New Feature",
"content": "## Work in Progress..."
}โ๏ธ Update Existing Document
POST /tool/update_docs{
"path": "guides/new-feature.md",
"line_begin": 10,
"line_end": 15,
"new_text": "Updated explanation here."
}๐ง Vector Search (RAG-Style)
POST /tool/search_docs{
"query": "How to authenticate a plugin?"
}๐จ Apply CSS or Theme Style
POST /tool/apply_style{
"style_id": "dark-theme",
"content": "..."
}๐ Embedding Model Support
Pluggable embedding model backend with simple config.
โ Local (Default)
sentence-transformers/all-MiniLM-L6-v2
๐ Optional Remote Support
- OpenAI Embeddings (requires API key)
โ๏ธ Environment Configuration
Use .env file or Docker environment: block:
PG_HOST=postgres
PG_USER=postgres
PG_PASSWORD=postgres
PG_DATABASE=vector_db
EMBEDDING_MODEL=local๐ Security
- ๐ Tool routes are gated with
@tooldecorators - โ๏ธ Document writes are verified before embedding
- ๐ Optional OAuth2 / API Token guardrails available
๐ Docusaurus Notes
- The
doc/directory holds the full Docusaurus source (used for live editing). - The
data/docusaurus/directory contains generated Markdown synced with the vector database.
๐ Metrics & Health
GET /tool/health_checkโ Check if the API is aliveGET /tool/metricsโ Prometheus/Grafana-compatible stats
๐ License
MIT License ยฉ๏ธ [guidry company]
On this page
Languages
Python72.0%JavaScript17.5%MDX7.3%CSS3.2%
Contributors
Created June 27, 2025
Updated February 9, 2026