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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@docsyncdev/mcp-server

v1.1.1

Published

MCP server for DocSync - enables AI coding assistants to search and update documentation

Readme

@docsyncdev/mcp-server

MCP (Model Context Protocol) server for DocSync - enables AI coding assistants like Claude Code and Cursor to search and interact with your documentation.

Features

  • Context-Aware Docs: Get documentation for any source file with full hierarchy (unit → topic → module)
  • Semantic Search: Search your documentation using natural language queries
  • Documentation Browser: List and browse docs by level (module, topic, unit)
  • Full Document Retrieval: Get complete document content by ID
  • Compact Mode: Condensed output for quick lookups (reduces token usage ~30%)
  • Caching: Built-in LRU cache reduces API calls and improves latency
  • Rate Limiting: Server-side rate limiting prevents abuse

Quick Start

1. Get Your API Key

  1. Go to your DocSync dashboard at docsync.dev
  2. Navigate to Settings > API Keys
  3. Click Create API Key and copy the key

2. Get Your Project ID

  1. In DocSync dashboard, go to Settings > API Keys
  2. Select your project from the dropdown
  3. Copy the project ID from the generated config

3. Configure Your AI Assistant

Claude Code

Add to your claude_desktop_config.json or .claude/settings.json:

{
  "mcpServers": {
    "docsync": {
      "command": "npx",
      "args": ["-y", "@docsyncdev/mcp-server"],
      "env": {
        "DOCSYNC_API_KEY": "ds_your_api_key_here",
        "DOCSYNC_PROJECT_ID": "your-project-uuid"
      }
    }
  }
}

Cursor

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "docsync": {
      "command": "npx",
      "args": ["-y", "@docsyncdev/mcp-server"],
      "env": {
        "DOCSYNC_API_KEY": "ds_your_api_key_here",
        "DOCSYNC_PROJECT_ID": "your-project-uuid"
      }
    }
  }
}

Available Tools

search_docs

Search documentation semantically. Returns relevant chunks matching your query.

Parameters:

  • query (string, required): Natural language search query
  • limit (number, optional): Maximum results (default 10, max 50)
  • compact (boolean, optional): Return condensed output with just paths and scores (default: false)

Example:

How does authentication work in this project?

Compact mode example:

search_docs({ query: "authentication", compact: true })

→ **5 results for "authentication"**
  - docs/topics/auth.md (95%)
  - docs/modules/security.md (82%)
  - ...

get_docs_for_file ⭐

The killer feature. Get documentation relevant to a source code file, with full context.

When you're working on src/auth/jwt.ts, this returns:

  • Unit doc (JWT implementation details) - full content
  • Module doc (Security architecture) - full content
  • Related topics based on concepts (Auth, Tokens, etc.) - summaries only

One call for immediate context. Related topics give you paths to dive deeper if needed.

Parameters:

  • file_path (string, required): Path to the source code file
  • include_content (boolean, optional): Include full content (default: true)
  • compact (boolean, optional): Return condensed output for quick lookups (default: false)

Example:

Get docs for src/services/payment-processor.ts

Returns:

# 📄 Unit Documentation
## PaymentProcessor Class
Detailed API for the payment processor...
[full content]

# 🏗️ Module Context
## Billing & Payments
Overview of the billing system architecture...
[full content]

# 📚 Related Topics (3)
- **Payment Processing** (payments)
  Path: docs/topics/payments.md
  How payments flow through the system

- **Validation** (validation)
  Path: docs/topics/validation.md
  Input validation patterns

- **Error Handling** (errors)
  Path: docs/topics/errors.md
  Error handling strategies

Compact mode returns summaries with topic list:

get_docs_for_file({ file_path: "src/auth/jwt.ts", compact: true })

→ ## src/auth/jwt.ts
  **JWT Handler**
  Handles JWT token creation and validation

  - **Module:** Security — Security patterns

  **Related Topics (2):**
  - Authentication (authentication): docs/topics/auth.md
  - Token Management (tokens): docs/topics/tokens.md

list_docs

Browse all documentation, optionally filtered by level.

Parameters:

  • level (string, optional): Filter by "module", "topic", "unit", or "all" (default)
  • compact (boolean, optional): Return condensed output with just titles and paths (default: false)

Example:

List all module-level docs

Compact mode returns a simple list without summaries:

list_docs({ level: "module", compact: true })

→ **3 docs in MyProject**

  **Module** (3)
  - Authentication: docs/modules/auth.md
  - Billing: docs/modules/billing.md
  - API: docs/modules/api.md

Environment Variables

| Variable | Required | Description | | -------------------- | -------- | ----------------------- | | DOCSYNC_API_KEY | Yes | Your DocSync API key | | DOCSYNC_PROJECT_ID | Yes | Your DocSync project ID |

Rate Limits

  • search_docs: 200 requests per hour
  • get_docs_for_file: 200 requests per hour
  • list_docs: 200 requests per hour

Rate limits are per API key. If you hit a rate limit, the tool will return an error message.

Caching

The MCP server includes an in-memory LRU cache:

  • Cache size: 100 entries per cache type
  • TTL: 5 minutes
  • Repeated queries return cached results instantly

Cache clears when the MCP server process restarts.

Troubleshooting

"DOCSYNC_API_KEY environment variable is required"

Make sure you've added the env section to your MCP configuration with your API key.

"Rate limit exceeded"

Wait a few minutes before making more requests. Consider if your agent is making too many searches.

"Document not found"

The document ID may be stale if documentation was recently updated. Run a new search to get current document IDs.

Connection issues

  1. Make sure your config uses npx with the -y flag: "args": ["-y", "@docsyncdev/mcp-server"]. The -y flag lets npx auto-install the package without prompting, which is required for MCP stdio communication.
  2. Check that your API key is valid in DocSync settings
  3. Verify your project ID is correct
  4. Ensure you have internet connectivity