Cover image
Try Now
2025-04-06

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Documentation 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:

  1. Determine the technical domain of a query (React, Node.js, Python)
  2. Extract specific topics from the query
  3. Construct precise documentation URLs
  4. 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 implementation
  • src/test.ts - Test script for topic extraction and URL construction
  • build/ - Compiled JavaScript output
  • package.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 documentation
  • node-docs - Node.js documentation
  • python-docs - Python documentation
  • general - General documentation when domain is unclear

Extending the Server

Adding New Domains

To add support for a new technical domain:

  1. Add domain keywords to the domainKeywords object in the determineDomain function
  2. Add topic patterns to the topicPatterns object in the extractTopics function
  3. Add URL construction logic to the constructSpecificUrl function
  4. Add a new resource handler in the server configuration

Improving Topic Extraction

The topic extraction can be improved by:

  1. Enhancing regex patterns for existing topics
  2. Adding new topics to existing domains
  3. Implementing more sophisticated NLP techniques for topic extraction

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    5 (1)
    Avatar
    user_96ai8BKV
    2025-04-18

    The mcp-server by deep-poharkar is an exceptional tool for managing multiple cloud platforms efficiently. It's intuitive and reliable, significantly easing the process of integration and monitoring. The comprehensive documentation and active support community further enhance the user experience. Highly recommend checking it out: https://github.com/deep-poharkar/mcp-server.