docsgrep

docsgrep

A high-performance MCP server for intelligent documentation search, proactive bug detection, and semantic analysis of codebases.

Category
Visit Server

README

docsgrep

docsgrep is a high-performance Model Context Protocol (MCP) Server that empowers developers and AI agents to master complex codebases through intelligent documentation search, proactive bug detection, and semantic analysis.

🚀 The Vision

Modern codebases are massive, but documentation is often fragmented or stale. docsgrep is the bridge. It doesn't just search text; it understands project structure, import relationships, and implementation truth.


🛠️ Professional Tool Suite (24 Tools)

1. Intelligence & Search 🧠

Tool Description
semantic_search Semantic Search: Understands natural language queries to find docs.
search_docs Contextual Grep: Search with relevance ranking and contextLines.
find_related Topic Discovery: Finds docs matching specific themes or concepts.
summarize_doc Auto-Summary: Summarizes long docs into digestible bites.

2. Implementation Integrity ✅

Tool Description
verify_docs Signature Validation: Checks if documented functions match the code.
measure_coverage Docblock Coverage: Measures how much of the code is documented.
catch_bugs Bug Catcher: Finds logic flaws with smart noise reduction.
check_delta Delta Analysis: Compares documentation claims against reality.
check_stale Staleness Detection: Identifies docs that are outdated or out of sync.

3. Context & Surroundings 🧭

Tool Description
get_context Radar: Finds docs based on imports and file proximity.
check_artefacts Git-Aware: Prioritizes doc updates based on recent code commits.
detect_stack Stack Analysis: Identifies the project's tech stack and lock files.
check_style Style Sniffer: Detects coding conventions and implicit patterns.

4. Code Quality & Security 🛡️

Tool Description
analyze_code Enterprise Audit: Comprehensive quality and documentation scoring.
audit_security Security Guard: OWASP Top 10, Secrets, PII, and Dependency scans.
lint_interactive / security_interactive Interactive Prompts: Targeted auditing via guided selection.

5. Workspace & Utilities 🏕️

Tool Description
init_workspace Initializes a secure workspace for temp files and reports.
clone_repo Clones remote repos with smart caching and branch support.
read_file Reads files with binary protection and large-file streaming.
show_help Self-documenting help system with examples and pro-tips.

💎 Key Feature Highlights

🐛 Smart Bug Detection (catch_bugs)

Engineered for accuracy. It doesn't just flag patterns; it understands context.

  • Try-Catch Awareness: Doesn't complain about await if you've handled it.
  • Test-File Logic: Lowers severity for issues in test files to keep focus on production.

✅ Signature Validation (verify_docs)

Documentation rot is a thing of the past.

  • Arity Check: Validates that documented functions have the correct number of parameters.
  • Existence Check: Ensures every documented symbol actually exists in the code.

🧭 Autonomous Radar (get_context)

The perfect companion for AI Agents.

  • Dependency Tracking: Reads your import statements to suggest relevant docs.
  • Hierarchical Context: Understands README importance and directory relationships.

🎯 Surgical Scope Control

All scanning tools now support advanced filtering:

  • includePath: Target specific modules or files (e.g., ["src/auth/**"]).
  • excludePath: Skip irrelevant noise, merged with your project's .gitignore.
  • Recursive Globbing: Full support for standard glob patterns.

💻 Hybrid Mode (MCP + CLI)

docsgrep is both an automated MCP server and a manual developer tool.

  • Human-Readable Output: Beautifully formatted terminal reports by default.
  • Easy Integration: Run audits directly via npm scripts or npx.

📦 Installation

Add docsgrep to your MCP client (e.g., Claude Desktop, Cursor):

{
  "mcpServers": {
    "docsgrep": {
      "command": "npx",
      "args": ["-y", "docsgrep"]
    }
  }
}

💻 Manual CLI Mode

Beyond MCP, you can run docsgrep manually in your terminal. This is perfect for local audits before committing code.

Usage

npx docsgrep run <tool_name> [--param value]

Examples

# Run a code quality audit on the current directory
npx docsgrep run analyze_code

# Run a security scan and output as JSON
npx docsgrep run audit_security --format json

# Search for a pattern in documentation
npx docsgrep run search_docs --pattern "authentication" --contextLines 2

Pre-configured npm Scripts

If installed locally, you can use these shortcuts:

  • npm run lint: Quality audit.
  • npm run audit: Security audit.
  • npm run bugs: Bug detection.
  • npm run docs:check: Documentation coverage.

🛠️ Developer Setup

# Clone the repository
git clone https://github.com/reasvyn/docsgrep.git
cd docsgrep

# Install and Build
npm install
npm run build

# Run Tests (Strict TS & ESM)
npm test
npm run test:coverage

🔒 Security

  • Safe Pathing: All file operations are resolved against strict base paths.
  • Credential Protection: PII and Secrets are detected but never leaked or logged.
  • Resource Limiting: Built-in concurrency limiter prevents system saturation.

📜 License

MIT License. See LICENSE for details.


Built with ❤️ for the AI-Native Engineering Era. 🚀

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured