ai-docs-mcp

LaserFocused-ee/ai-docs-mcp

3.2

If you are the rightful owner of ai-docs-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Knowledge Hub is a Model Context Protocol (MCP) server that provides AI assistants with unified access to organizational knowledge across multiple platforms.

Knowledge Hub

A Model Context Protocol (MCP) server that provides AI assistants with unified access to organizational knowledge across multiple platforms. This server bridges the gap between AI tools and your organization's knowledge repositories, enabling intelligent document creation, retrieval, and management across local docs, Guru, and Notion.

๐Ÿš€ What is this?

Knowledge Hub is a production-ready MCP server that provides:

  • ๐Ÿ“š Local Documentation Access - Read and serve markdown files from your local docs directory
  • ๐Ÿง  Guru Knowledge Base Integration - Search, read, and manage Guru cards and collections
  • ๐Ÿ“ Notion Database Management - Create, query, update, and manage documentation in Notion databases
  • ๐Ÿ” Advanced Query & Search - Powerful filtering, sorting, and search capabilities across all platforms
  • ๐Ÿ› ๏ธ Content Creation & Management - Convert markdown to Notion pages with proper metadata and code block validation
  • ๐Ÿ”„ Bi-directional Sync - Export Notion pages back to markdown format
  • ๐Ÿ—๏ธ Development & Production Modes - Flexible deployment options for different environments

๐Ÿ—๏ธ Architecture

Built with TypeScript/Node.js (โ‰ฅ20.0.0), MCP SDK v1.12.0, and Zod validation for type safety. Features a clean, modular architecture with separated concerns:

src/
โ”œโ”€โ”€ index.ts              # Main MCP server entry point
โ”œโ”€โ”€ server.ts             # Server configuration and tool registration
โ”œโ”€โ”€ services/             # API services (Notion, Guru)
โ”œโ”€โ”€ tools/                # MCP tool implementations
โ”œโ”€โ”€ types/                # TypeScript type definitions
โ””โ”€โ”€ utils/                # Conversion utilities and helpers

๐Ÿ› ๏ธ Available Tools (11 Total)

๐Ÿ“š Local Documentation (2 tools)

  • legacy-list-docs - Lists all available local documentation files by category
  • legacy-read-doc - Reads specific documentation files with fuzzy matching

๐Ÿง  Guru Knowledge Base (3 tools)

  • guru-list-cards - Search and filter Guru cards with advanced queries
  • guru-read-card - Read complete card content with formatting
  • guru-get-card-attachments - List and download card attachments

๐Ÿ“ Notion Database Management (5 tools)

  • list-database-pages - Advanced query and search with filtering by category, tags, status
  • create-page-from-markdown - Create pages from markdown with metadata and code block validation
  • update-page - Update existing pages (content and/or metadata)
  • archive-page - Archive pages by moving to trash
  • export-page-to-markdown - Export pages to clean markdown format

๐Ÿ”ง Utility (1 tool)

  • hello - Example tool demonstrating MCP capabilities

โš™๏ธ Configuration & Setup

๐Ÿš€ Installation

# Clone and install
git clone https://github.com/LaserFocused-ee/ai-docs-mcp.git
cd ai-docs-mcp/mcp_server
npm install

# Development
npm run dev

# Production build
npm run build && npm start

๐Ÿ”— Claude Desktop Integration

Development Configuration
{
  "mcpServers": {
    "ai-knowledge-hub-dev": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "NODE_ENV": "development",
        "DEV_HOME": "/path/to/your/mcp_server",
        "GURU_TOKEN": "username:token",
        "NOTION_TOKEN": "your-notion-token",
        "NOTION_MCP_DATABASE_ID": "your-database-id"
      }
    }
  }
}
Production Configuration
{
  "mcpServers": {
    "ai-knowledge-hub": {
      "command": "npx",
      "args": ["ai-knowledge-hub"],
      "env": {
        "GURU_TOKEN": "username:token",
        "NOTION_TOKEN": "your-notion-token",
        "NOTION_MCP_DATABASE_ID": "your-database-id"
      }
    }
  }
}

๐Ÿ”‘ API Credentials

Guru: Log into Guru โ†’ Settings โ†’ API Access โ†’ Generate token โ†’ Format as username:token

Notion: Go to Notion Integrations โ†’ Create integration โ†’ Get API key โ†’ Share database with integration โ†’ Copy database ID from URL

๐Ÿ“ Documentation Structure

Local documentation organized in docs/ directory:

docs/
โ”œโ”€โ”€ code_guidelines/
โ”‚   โ”œโ”€โ”€ flutter/architecture/    # Flutter architecture patterns
โ”‚   โ”œโ”€โ”€ react/                   # React best practices
โ”‚   โ”œโ”€โ”€ nestjs/                  # NestJS guidelines
โ”‚   โ””โ”€โ”€ git/                     # Git workflows
โ””โ”€โ”€ service-docs/                # API guides and references

๐ŸŒŸ Key Features

๐Ÿ“„ Markdown โ†” Notion Conversion

  • Code Block Validation: Automatically validates code blocks against Notion's 2000 character limit
  • Intelligent Error Handling: Provides specific guidance for splitting large code blocks while preserving logical boundaries
  • Rich Formatting Support: Tables, lists, headers, links, code blocks, and more
  • Metadata Preservation: Categories, tags, descriptions, and status values

๐Ÿ” Advanced Query System

  • Multi-Platform Search: Unified search across local docs, Guru, and Notion
  • Smart Filtering: Filter by category, tags, status, dates with flexible sorting
  • Pagination Support: Handle large datasets efficiently

๐Ÿ› ๏ธ Development Support

  • Environment Detection: Automatic dev/production mode switching
  • Hot Reload: Development mode with file watching
  • MCP Inspector Integration: Comprehensive testing tools
  • Type Safety: Full TypeScript with Zod validation

๐Ÿงช Testing & Validation

Quick Testing

# Interactive UI testing
npm run inspect

# Basic validation
npm run validate

# Comprehensive test suite
npm run test:inspector

Example Tool Calls

# List available documentation
npx @modelcontextprotocol/inspector --cli node dist/index.js \
  --method tools/call --tool-name legacy-list-docs

# Search Notion pages
npx @modelcontextprotocol/inspector --cli node dist/index.js \
  --method tools/call --tool-name list-database-pages \
  --tool-arg search="testing" --tool-arg limit=5

# Search Guru knowledge
npx @modelcontextprotocol/inspector --cli node dist/index.js \
  --method tools/call --tool-name guru-list-cards \
  --tool-arg searchTerms="API documentation" --tool-arg maxResults=5

๐Ÿ’ก Usage Patterns

Local Documentation

legacy-list-docs()  # Discover available docs
legacy-read-doc(category="code_guidelines/flutter", name="best-practices")

Notion Management

# Context-aware search
list-database-pages(search="testing", tags=["react"], status="published")

# Create with metadata
create-page-from-markdown(
  markdown="# API Guide\n\nDocumentation...",
  metadata={category: "api-reference", tags: ["api", "rest"]}
)

Guru Knowledge Access

guru-list-cards(searchTerms="troubleshooting", maxResults=10)
guru-read-card(cardId="card-uuid")

๐Ÿš€ Releases & Publishing

This package uses automated GitHub Actions workflows for professional release management.

๐Ÿ“ฆ For Users

๐Ÿ› ๏ธ For Contributors/Maintainers

  • Automated Releases: Use GitHub Actions for safe, validated releases
  • Version Management: Supports semantic versioning (patch/minor/major)
  • Quality Assurance: Automated testing and validation before publishing

๐Ÿ“‹ Full setup guide: See for complete instructions on:

  • Setting up npm tokens and GitHub secrets
  • Using the automated release workflow
  • Understanding semantic versioning
  • Troubleshooting common issues

๐Ÿ”’ Security & Requirements

  • Node.js: โ‰ฅ20.0.0 required
  • Secure Credentials: Environment variable handling only
  • File Access: Restricted to docs directory
  • Input Validation: Zod schema validation for all parameters
  • API Rate Limiting: Automatic handling

๐Ÿ“„ License

MIT License - See package.json for details.


Knowledge Hub transforms static documentation, institutional knowledge, and content management into an intelligent, queryable ecosystem for AI assistants. It enables context-aware development guidance, comprehensive documentation management, and seamless access to your organization's collective knowledge across multiple platforms through a unified, powerful API.