AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Company Docs Mcp

mcp-southleft-company-docs-mcp · by southleft

AI-powered company knowledge MCP. Unified place for internal policies, values, documentation, and governance. Agents can search, cite, and answer questions using real company docs.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add mcp-southleft-company-docs-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-southleft-company-docs-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Company Docs Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Company Docs MCP

Turn any documentation into an AI-searchable knowledge base. Feed it markdown, HTML, PDFs, web pages, or plain text — publish to a database and let anyone on your team query it through AI tools like Claude, Cursor, or Slack. Powered by the Model Context Protocol.

What This Does

  1. Ingest — Point the CLI at your content. It accepts markdown files, HTML pages, PDFs, live URLs, or even an entire website via crawl.
  2. Publish — Run a command that converts your content into searchable vectors and stores it in a database.
  3. Query — Connect any MCP-compatible AI tool to your server. Ask questions in plain English and get answers sourced directly from your documentation.

Two Ways to Use This

There are two distinct roles when working with Company Docs MCP. Most people on your team only need the first one.

If someone already set up the server for your team

You just need a URL. No accounts, no installation, no terminal commands.

  1. Get the server URL from whoever set it up (it looks like https://company-docs-mcp.example.workers.dev/mcp)
  2. Add it to your AI tool:
  • Claude: Settings > Connectors > Add custom connector > paste the URL
  • Cursor / Windsurf: Add the URL as a remote MCP server in settings
  1. Start asking questions about your documentation

That's it. Cloudflare, Supabase, and the CLI are only needed by the person who sets up and maintains the server.

If you're setting up the server (admin/maintainer)

The rest of this README is for you. Follow the setup guide below to get everything running.

How the Pieces Fit Together

The system uses three services. All three offer free tiers that are sufficient for most teams.

flowchart TD
    A["Your ContentMarkdown, HTML, PDFs, URLs"]
    B["Cloudflare Workers AI"]
    C[("Supabase")]
    D["Your TeamClaude, Cursor, Slack, Chat UI"]
    E["Cloudflare Worker"]

    A -- "ingest + publish" --> B
    B -- "store vectors" --> C

    D -- "ask a question" --> E
    E -- "vector search" --> C
    C -. "matching docs" .-> E
    E -. "answers" .-> D

    style A fill:#f9f9f9,stroke:#333,color:#333
    style B fill:#dbeafe,stroke:#1d4ed8,color:#333
    style C fill:#d4edda,stroke:#155724,color:#333
    style D fill:#f0fdf4,stroke:#15803d,color:#333
    style E fill:#dbeafe,stroke:#1d4ed8,color:#333

| Service | What it does | Why it's needed | |---------|-------------|-----------------| | Cloudflare | Hosts your server and converts text into searchable vectors using its built-in AI | This is where your server runs 24/7 so your team can query docs at any time. It also handles the AI processing that makes semantic search possible — no separate AI subscription needed. | | Supabase | Stores your documentation in a PostgreSQL database with vector search | Powers "smart" search — asking "how do I deploy?" will find documents about releases, CI/CD, and shipping, not just pages containing the word "deploy." | | npm package | A command-line tool that ingests your content (markdown, HTML, PDFs, URLs) and publishes it to the database | You run this on your computer whenever you add or update documentation. |

No third-party AI API keys are required. Cloudflare provides the AI capabilities through its Workers AI service, which is included with every Cloudflare account at no extra cost.

What You'll Need

Before starting, create free accounts on these two services:

  • Node.js 18 or later — the runtime that powers the CLI tool (download here)
  • A Cloudflare account — for hosting and AI (sign up here, free tier works)
  • A Supabase account — for the database (sign up here, free tier works)

That's it. No OpenAI, Anthropic, or Google API keys needed.

Setup Guide

Follow these steps in order. Each one builds on the previous.

Step 1: Install the Package

Open your terminal in the project where your documentation lives and run:

npm install company-docs-mcp

This downloads the CLI tool to your project. No external services are contacted yet.

Step 2: Create Your Database (Supabase)

Your documentation needs a database to store content and make it searchable.

  1. Go to supabase.com and create a new project
  2. Go to Settings > API and copy three values (you'll need these in Step 4):
  • Project URL (looks like https://abc123.supabase.co)
  • anon key (a long string starting with eyJ)
  • service_role key (another long string starting with eyJ — keep this private)
  1. Open the SQL Editor in the left sidebar, paste the contents of [database/schema.sql](database/schema.sql), and click Run

This creates the database tables and search functions the system uses.

> The schema file is included in the npm package at node_modules/company-docs-mcp/database/schema.sql.

Step 3: Log In to Cloudflare

The CLI needs access to Cloudflare's AI service to convert your documentation into searchable vectors. The simplest way to connect is through the Wrangler CLI (Cloudflare's command-line tool, included with this package).

Run this command:

npx wrangler login

A browser window will open asking you to log in to your Cloudflare account and grant permission. Click Allow and return to your terminal.

You also need your Cloudflare Account ID:

  1. Go to dash.cloudflare.com
  2. Your Account ID is shown on the right side of the overview page — copy it

That's the only Cloudflare setup needed for publishing. The CLI automatically detects the login credentials that wrangler login saved to your computer.

> Token expiration: The login session expires periodically. If you see an authentication error when publishing, just run npx wrangler login again.

Step 4: Configure Your Environment

Create a file called .env in your project root with these values:

# Supabase — where your documentation is stored
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_KEY=eyJ...

# Cloudflare — your Account ID (from Step 3)
CLOUDFLARE_ACCOUNT_ID=your-account-id

Replace the placeholder values with the ones you copied from Supabase (Step 2) and Cloudflare (Step 3).

> Keep this file private. Never commit .env to version control — it contains credentials. Add .env to your .gitignore file.

Step 5: Prepare Your Content

The system accepts multiple content formats. Use whichever fits your workflow:

| Format | How to ingest | Best for | |--------|--------------|----------| | Markdown (.md) | npx company-docs ingest markdown --dir=./docs | Documentation you write and maintain as files | | HTML (.html) | npm run ingest -- html ./file.html | Exported web pages, saved articles | | PDF (.pdf) | npm run ingest -- pdf ./document.pdf | Policies, reports, specs in PDF format | | URL (any web page) | npm run ingest -- url https://example.com/page | Live web content you want to index | | Website crawl | npm run ingest:web -- --url=https://docs.example.com | Entire documentation sites | | CSV of URLs | npm run ingest:csv -- urls.csv | Batch-importing many web pages at once |

> Note: The npx company-docs CLI (from the npm package) directly supports markdown ingestion and publishing. The other formats (HTML, PDF, URL, website crawl, CSV) are available when running from the cloned repository.

Markdown is the most common starting point. Create files in a directory — any folder structure works:

docs/
├── onboarding/
│   ├── new-hire-checklist.md
│   └── tools-and-access.md
├── engineering/
│   ├── deployment-guide.md
│   └── code-review-process.md
└── policies/
    ├── pto-policy.md
    └── expense-guidelines.md

You can optionally add YAML frontmatter to control how each document is categorized:

---
title: Deployment Guide
category: engineering
tags: [deploy, ci-cd, release]
description: How to deploy to production
---

# Deployment Guide

Your content here...

If you don't include frontmatter, the system will auto-detect a category and extract tags from the content.

Step 6: Ingest and Publish

Two steps turn your content into a searchable knowledge base:

Step 1 — Ingest (converts your content into structured entries):

# Markdown (most common)
npx company-docs ingest markdown --dir=./docs

# Or from the cloned repo, for other formats:
npm run ingest -- html ./exported-page.html
npm run ingest -- pdf ./policy-document.pdf
npm run ingest -- url https://wiki.example.com/important-page

Step 2 — Publish (pushes entries to the database with search vectors):

npx company-docs publish

What happens:

  1. The ingest step reads your content, extracts titles and sections, and saves structured entries as JSON files in a content/entries/ folder in your project.
  2. publish sends each entry to Cloudflare's AI to generate search vectors, then stores everything in your Supabase database. A content hash automatically skips entries that haven't changed, so re-running is fast.

To preview what would be published without actually writing to the database:

npx company-docs publish --dry-run

Updating content: Whenever you change your source files, run both steps again. Only changed entries are re-processed.

Step 7: Deploy the Server (Cloudflare Worker)

The server is what runs 24/7 and handles search queries from your team's AI tools. It's deployed as a Cloudflare Worker.

Clone the repository
git clone https://github.com/southleft/company-docs-mcp.git
cd company-docs-mcp
npm install
Configure the Worker

Edit wrangler.toml with your organization name:

name = "company-docs-mcp"
main = "src/index.ts"
compatibility_date = "2024-01-01"
compatibility_flags = ["nodejs_compat"]

[ai]
binding = "AI"

[vars]
ORGANIZATION_NAME = "Your Organization"
VECTOR_SEARCH_ENABLED = "true"
VECTOR_SEARCH_MODE = "vector"
Create a search cache

The Worker caches recent search results to keep things fast. Run this command to create the cache:

npx wrangler kv namespace create CONTENT_CACHE

It will print an ID. Add it to wrangler.toml:

[[kv_namespaces]]
binding = "CONTENT_CACHE"
id = "the-id-that-was-printed"
Add your database credentials to the Worker

These are stored securely as encrypted secrets — they never appear in plain text in the dashboard or config files.

echo "your-supabase-url" | npx wrangler secret put SUPABASE_URL
echo "your-anon-key" | npx wrangler secret put SUPABASE_ANON_KEY
echo "your-service-key" | npx wrangler secret put SUPABASE_SERVICE_KEY
Deploy

Make sure you're logged in (you should be from Step 3 — if not, run npx wrangler login again), then:

npm run deploy

Your server is now live at https://company-docs-mcp..workers.dev.

Step 8: Connect and Test

Share this URL with your team:

https://company-docs-mcp..workers.dev/mcp

Claude: Settings > Connectors > Add custom connector > paste the URL.

Cursor / Windsurf / Other MCP clients: Add the URL as a remote MCP server in your client's settings.

Once connected, your AI tool will have access to these search tools:

| Tool | What it does | |------|-------------| | search_documentation | Finds documentation that matches your question using semantic search | | search_chunks | Searches specific sections within documents | | browse_by_category | Lists all documentation in a category (categories come from frontmatter, the --category flag, or auto-detection) | | get_all_tags | Lists every tag used across your documentation |

Cloudflare's Role — A Quick Summary

Since Cloudflare appears in several steps, here's a plain-language summary of what it does and when:

| When | What Cloudflare does | How it's accessed | |------|---------------------|-------------------| | Publishing docs (Step 6) | Converts your text into numerical vectors that enable semantic search | CLI calls the Cloudflare REST API using your wrangler login credentials | | Running the server (Step 7+) | Hosts the always-on server that your team queries; generates vectors for incoming questions | Built-in — no API keys needed at runtime |

Is Cloudflare optional? No — it's required for both publishing and hosting. However, the free tier is more than sufficient and no separate AI subscription is needed. The only setup required is creating an account and running npx wrangler login.

CLI Reference

npm Package Commands

These work anywhere via npx company-docs:

company-docs  [options]

| Command | Description | |---------|-------------| | ingest markdown | Parse markdown files into content/entries/ | | publish | Push entries to the database with AI-generated vectors | | ingest supabase | Same as publish | | manifest | Generate content/manifest.json (used during Worker deployment) |

Repository Commands

These are available when running from the cloned repository:

| Command | Description | |---------|-------------| | npm run ingest -- html | Ingest an HTML file | | npm run ingest -- pdf | Ingest a PDF document | | npm run ingest -- url | Ingest a single web page | | npm run ingest:csv -- | Ingest URLs listed in a CSV file | | npm run ingest:web -- --url= | Crawl and ingest an entire website |

Ingest Markdown Options

| Option | Description | Default | |--------|-------------|---------| | --dir, -d | Folder containing your markdown files | ./docs | | --category, -c | Category label for the content (overrides frontmatter) | documentation | | --recursive | Include files in subfolders | true | | --verbose, -v | Show detailed output | false |

Publish Options

| Option | Description | |--------|-------------| | --clear | Delete all existing data before publishing (start fresh) | | --dry-run | Preview what would change without writing to the database | | --verbose | Show detailed per-entry progress |

Examples

# Ingest markdown from different folders with different categories
npx company-docs ingest markdown --dir=./docs/engineering --category=engineering
npx company-docs ingest markdown --dir=./docs/policies --category=hr
npx company-docs publish

# Ingest a PDF and a web page (from cloned repo)
npm run ingest -- pdf ./policies/employee-handbook.pdf
npm run ingest -- url https://wiki.example.com/onboarding
npx company-docs publish

# Crawl an entire documentation site (from cloned repo)
npm run ingest:web -- --url=https://docs.example.com --max-pages=50

# Full re-publish from scratch
npx company-docs publish --clear

# Preview changes
npx company-docs publish --dry-run --verbose

YAML Frontmatter Reference

Each markdown file can optionally include a YAML frontmatter block at the very top. The system reads these fields:

---
title: Page Title
category: engineering
tags: [deploy, ci-cd, release]
description: A short summary of this page
status: stable
version: 1.0.0
source: src/path/to/source.ts
figma: https://figma.com/...
author: Jane Smith
department: Engineering
---

| Field | Effect | |-------|--------| | title | Used as the document title (overrides the first # Heading) | | category | Sets the browseable category for this document | | tags | Adds tags for filtering and discovery | | description | Stored as metadata, returned in search results | | status | Stored as metadata (e.g., draft, stable, deprecated) | | version | Stored as metadata | | source, figma, author, department | Stored as metadata, available in search results |

All fields are optional. If no frontmatter is pr

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.