docsgrep

docsgrep

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

Category
访问服务器

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. 🚀

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选