npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

company-specific-docs-mcp-server

v1.0.14

Published

Company-specific documentation management system with MCP integration

Readme

Company Specific Docs MCP Server

A Model Context Protocol (MCP) server implementation for managing and searching company documents. This server provides tools for searching, retrieving, and managing company documentation using MongoDB for storage and Typesense for search capabilities.

Features

  • Document search using Typesense
  • Vector search capabilities
  • Company manual management
  • User details and document content retrieval
  • MCP protocol implementation for seamless integration
  • NPX support for easy installation and usage

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB connection
  • Typesense instance

Installation

Using NPX (Recommended)

You can run the server directly using NPX without installing it globally:

npx company-specific-docs-mcp-server@latest --mongo-uri "mongodb://<username>:<password>@<host>:<port>/<database>?authSource=<auth-db>" \
  --db-name "<database-name>" \
  --typesense-host "<typesense-host>" \
  --typesense-port "<typesense-port>" \
  --typesense-protocol "<typesense-protocol>" \
  --typesense-api-key "<typesense-api-key>"

Manual Installation

  1. Clone the repository:
git clone <repository-url>
cd company-specific-docs-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

The server requires the following environment variables or command-line arguments:

Environment Variables

Create a .env file in the project root with the following variables:

MONGO_URI=mongodb://<username>:<password>@<host>:<port>/<database>?authSource=<auth-db>
DB_NAME=<database-name>
TYPESENSE_HOST=<typesense-host>
TYPESENSE_PORT=<typesense-port>
TYPESENSE_PROTOCOL=<typesense-protocol>
TYPESENSE_API_KEY=<typesense-api-key>
COHERE_API_KEY=<cohere-api-key>
OPENAI_API_KEY=<openai-api-key>
S3_API_TOKEN=<s3-api-token>
PERPLEXITY_API_KEY=<perplexity-api-key>

Command-line Arguments

You can pass these values as command-line arguments:

npm start -- \
  --mongo-uri "mongodb://<username>:<password>@<host>:<port>/<database>?authSource=<auth-db>" \
  --db-name "<database-name>" \
  --typesense-host "<typesense-host>" \
  --typesense-port "<typesense-port>" \
  --typesense-protocol "<typesense-protocol>" \
  --typesense-api-key "<typesense-api-key>" \
  --cohere-api-key "<cohere-api-key>" \
  --openai-api-key "<openai-api-key>" \
  --s3-api-token "<s3-api-token>" \
  --perplexity-api-key "<perplexity-api-key>"

Running the Server

Development Mode

npm run dev

Production Mode

npm start

API Endpoints

The server implements the following MCP endpoints:

Resources

  • resources.list - List available resources
  • resources.read - Read a specific resource
  • resources.templates - List resource templates

Tools

  • tools.list - List available tools
  • tools.call - Call a specific tool

Available Tools:

  • list_company_manuals - List all company manuals with optional document type filter
  • smart_company_manual_search - Search company manuals using Typesense with query and optional document type filter
  • fetch_company_documents_by_vector_search - Search documents using vector similarity with query and optional result limit
  • get_by_company_document_name_or_num - Get a specific company document by its name or document number with optional exact match
  • get_company_manual_structure - Get the structure/outline of a company manual by document ID
  • get_company_manual_chapter_overview - Get an overview of a specific chapter in a company manual
  • read_company_manual_section - Read a specific section of a company manual
  • read_company_manual_by_page_range - Read a specific range of pages from a company manual
  • create_update_casefile - Create or update a case file with the provided information
  • google_search - Perform a Google search and return the results (requires API configuration)
  • get_mcp_build_version - Get the current MCP build version

Example tool usage:

{
  "method": "tools.call",
  "params": {
    "name": "get_company_manual_structure",
    "arguments": {
      "documentId": "document_id_here"
    }
  }
}

Prompts

  • prompts.list - List available prompts
  • prompts.get - Get a specific prompt

Testing

To test the server functionality, you can use the MCP inspector or interact with the server directly through stdio. Here are some example requests in JSON format that you can send to the server:

  1. List Resources:
{
  "method": "resources.list"
}
  1. List Tools:
{
  "method": "tools.list"
}
  1. Search Documents:
{
  "method": "tools.call",
  "params": {
    "name": "smart_company_manual_search",
    "arguments": {
      "query": "your search query"
    }
  }
}

To test the server:

  1. Start the server:
npm start
  1. Send the JSON requests to the server's stdin. The server will respond through stdout.

Note: The server uses the Model Context Protocol (MCP) with stdio transport, which means it communicates through standard input/output rather than HTTP endpoints. This is the standard way MCP servers operate, allowing for direct integration with AI models and other MCP-compatible systems.

Development

Project Structure

src/
├── index.ts              # Main server entry point
├── tools/               # Tool definitions and handlers
├── resources/           # Resource definitions and handlers
├── prompts/            # Prompt definitions and handlers
└── utils/              # Utility functions and configurations
    ├── config.ts       # Configuration management
    ├── mongodb.ts      # MongoDB client setup
    └── typesense.ts    # Typesense client setup

Adding New Tools

  1. Define the tool in src/tools/index.ts
  2. Implement the handler function
  3. Add the tool to the toolDefinitions array

Adding New Resources

  1. Define the resource in src/resources/index.ts
  2. Implement the handler function
  3. Add the resource to the resourceList array

License

This project is licensed under the MIT License.