Documentation Hub MCP Server
LocalAbout Documentation Hub MCP Server
A documentation retrieval MCP server for AI clients looking up React, Node.js, and Python documentation. It classifies the domain, extracts topics, builds targeted documentation URLs, and fetches relevant content.
Key features
- 01Classify technical domains
- 02Extract topics from queries
- 03Construct targeted documentation URLs
- 04Fetch content across documentation domains
- 05Extend support to other domains
Use cases
- 01Find documentation for a React topic
- 02Retrieve Node.js technical references
- 03Look up Python documentation
- 04Map a technical question to a documentation page
MCP support
The MCP server exposes domain classification, topic extraction, and documentation retrieval tools to compatible clients, along with React, Node.js, Python, and general documentation resources.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEDocumentation Hub MCP Server
A Model Context Protocol (MCP) server for intelligent documentation retrieval across multiple technical domains.
Overview
This project implements an MCP server that provides targeted documentation retrieval for technical queries. It uses a hybrid approach to:
- Determine the technical domain of a query (React, Node.js, Python)
- Extract specific topics from the query
- Construct precise documentation URLs
- Fetch and return the most relevant documentation
The server is built using TypeScript and the MCP SDK, providing a standardized interface for AI models to access documentation resources.
Features
- Domain Classification: Automatically identifies whether a query is about React, Node.js, Python, or general topics
- Topic Extraction: Uses regex pattern matching to identify specific technical concepts in queries
- URL Construction: Builds targeted documentation URLs based on identified topics
- Multiple Documentation Sources: Supports documentation from React, Node.js, Python, and can be extended to other domains
- Standardized Interface: Implements the Model Context Protocol for interoperability with MCP-compatible clients
Installation
# Clone the repository
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Usage
Running the Server
node build/index.js
Testing Topic Extraction
The project includes a test script to demonstrate how topic extraction and URL construction work:
# Build the test script
npx tsc src/test.ts --outDir build
# Run the test
node build/test.js
Integrating with Clients
The server can be integrated with any MCP-compatible client. Here's an example of how a client might interact with the server:
// Example client code (not included in this project)
const client = new McpClient();
const result = await client.callTool("fetch-documentation", {
query: "How do I use useState hook in React?",
});
console.log(result);
// Output: {
// domain: "react-docs",
// topics: ["useState", "state"],
// specificUrl: "https://react.dev/reference/react/useState",
// content: "...",
// source: "https://react.dev/reference/react/useState"
// }
Project Structure
src/index.ts- Main server implementationsrc/test.ts- Test script for topic extraction and URL constructionbuild/- Compiled JavaScript outputpackage.json- Project configuration and dependencies
Available Tools
The server exposes the following tools:
determine-domain
Determines which technical domain a query belongs to.
{
query: string; // The user query to classify
}
Returns:
{
domain: string; // The identified domain
confidence: string; // "high" or "low"
}
extract-topics
Extracts specific topics from a query for a given domain.
{
query: string; // The user query to analyze
domain: string; // The technical domain to extract topics for
}
Returns:
{
topics: string[]; // Array of identified topics
count: number; // Number of topics found
}
fetch-documentation
Fetches documentation based on query and domain.
{
query: string; // The user query
domain?: string; // Optional domain override
}
Returns:
{
domain: string; // The identified domain
topics: string[]; // Array of identified topics
specificUrl: string | null; // The constructed URL if available
content: string; // The fetched documentation content
source: string; // The source URL
}
Available Resources
The server provides the following documentation resources:
react-docs- React.js documentationnode-docs- Node.js documentationpython-docs- Python documentationgeneral- General documentation when domain is unclear
Extending the Server
Adding New Domains
To add support for a new technical domain:
- Add domain keywords to the
domainKeywordsobject in thedetermineDomainfunction - Add topic patterns to the
topicPatternsobject in theextractTopicsfunction - Add URL construction logic to the
constructSpecificUrlfunction - Add a new resource handler in the server configuration
Improving Topic Extraction
The topic extraction can be improved by:
- Enhancing regex patterns for existing topics
- Adding new topics to existing domains
- Implementing more sophisticated NLP techniques for topic extraction
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.