Desjajja/docuscribe-mcp-server
If you are the rightful owner of docuscribe-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Docuscribe MCP is a tool designed to interact with documentation libraries using the Model Context Protocol (MCP).
Docuscribe MCP
Overview
Docuscribe MCP is a tool designed to interact with documentation libraries using MCP (Model Context Protocol). It provides two main tools for querying and fetching content:
list_all_docs: Retrieves a pageable catalog of all available documentation libraries with stable IDs.fetch_doc_content: Fetches content from a specific document in three modes: index, single range, and multi-range.
Tools
list_all_docs
Description
Retrieves a pageable catalog of all available documentation libraries (documents) with stable IDs (uids).
Parameters
limit(int, optional): Max number of documents (1..1000, default 100).offset(int, optional): Pagination offset (>=0, default 0).
Returns
A JSON string exactly mirroring backend response:
{
"documents": [
{"id": "uuid", "name": "Title", "hashtags": ["tag1", "tag2"]},
...
]
}
Usage Guidance
- Call this first to discover a document's stable
id. - Use that
idasdoc_uidforfetch_doc_content. - Persist (cache) returned ids; they do not change during session.
- Avoid re-calling once ids are known unless searching for new libraries or pagination needed.
- May store multiple ids for multi-source comparison.
Examples
- Minimal call:
list_all_docs(limit=50, offset=0) - Paginated follow-up:
list_all_docs(limit=100, offset=100)
fetch_doc_content
Description
Fetches documentation content in three modes:
- Index Mode: No parameters -> structural overview (pages, ranges).
- Single Range Mode:
start+max_length-> sequential slice with paging hints (has_more,next_start). - Multi-Range Mode:
rangesparameter -> targeted non-contiguous retrieval.
Parameters
doc_uid(str): Stable document ID fromlist_all_docs.start(int, optional): Starting word index (Single Range Mode).max_length(int, optional): Max words to return (Single Range).ranges(str, optional): Comma-separated list of start-end pairs (e.g., "0-100,200-300") for Multi-Range Mode.
Returns
A JSON string combining backend document and meta. Convenience keys has_more and next_start are surfaced when present.
Usage Guidance
- Step 2: After caching
doc_uid, call Index Mode. - Analyze pages/ranges to identify candidate section(s).
- If uncertain: begin Single Range at
start=0; iterate whilehas_moreand info not found. - Use keyword/heading detection to decide early switch to targeted Multi-Range.
- Accumulate content locally; avoid refetching previously retrieved spans.
Examples
- Index retrieval:
fetch_doc_content(doc_uid="abc123") - Progressive Single Range loop:
fetch_doc_content(doc_uid="abc123", start=0, max_length=500) - Multi-Range targeted fetch:
fetch_doc_content(doc_uid="abc123", ranges="0-120,400-550")
Installation
- Clone the repository:
git clone <repository-url> - Install dependencies:
pip install -r requirements.txt - Set up environment variables:
- Create a
.env.localfile with the following content:SERVER_BACKEND_URL=http://localhost:9002
- Create a
Running the MCP Server
Start the MCP server:
python main.py
Real Use Cases
Notes
- Ensure the backend server is running at the URL specified in
.env.local. - Use
list_all_docsto retrieve document IDs before callingfetch_doc_content. - Cache document IDs to optimize queries and avoid unnecessary lookups.
License
MIT License