Deepwiki MCP Server

by regenrek
MIT License
0
38
  • Linux
  • Apple

Integrations

  • Supports configuration through environment variables loaded via .env files, enabling customization of server behavior like concurrency and timeout settings.

  • Mentioned as a contact method for the author through their Bluesky handle, but no explicit integration functionality is described.

  • Provides deployment options through Docker containers, allowing the MCP server to be containerized and run in various environments.

Deepwiki MCP サーバー

これは非公式のDeepwiki MCPサーバーです

MCP 経由で Deepwiki URL を受け取り、関連するすべてのページをクロールし、それらを Markdown に変換して、1 つのドキュメントまたはページごとのリストを返します。

特徴

  • 🔒ドメインの安全性: deepwiki.com からの URL のみを処理します
  • 🧹 HTMLサニタイズ:ヘッダー、フッター、ナビゲーション、スクリプト、広告を削除します
  • 🔗リンク書き換え:Markdownで動作するようにリンクを調整します
  • 📄複数の出力形式:1つのドキュメントまたは構造化されたページを取得
  • 🚀パフォーマンス: 同時実行性と深度を調整できる高速クロール

使用法

使用できるプロンプト:

deepwiki fetch url deepwiki fetch <name>/<repo>

完全なドキュメントを取得する(デフォルト)

use deepwiki https://deepwiki.com/shadcn-ui/ui use deepwiki multiple pages https://deepwiki.com/shadcn-ui/ui

シングルページ

use deepwiki fetch single page https://deepwiki.com/tailwindlabs/tailwindcss/2.2-theme-system

ショートフォームで取得

use deepwiki fetch tailwindlabs/tailwindcss

カーソル

これを.cursor/mcp.jsonファイルに追加します。

{ "mcpServers": { "mcp-deepwiki": { "command": "npx", "args": ["-y", "mcp-deepwiki@latest"] } } }

MCPツール統合

このパッケージは、MCP 互換クライアントで使用できるdeepwiki_fetchというツールを登録します。

{ "action": "deepwiki_fetch", "params": { "url": "https://deepwiki.com/user/repo", "mode": "aggregate", "maxDepth": "1" } }
パラメータ
  • url (必須): Deepwikiリポジトリの開始URL
  • mode (オプション): 出力モード。単一の Markdown ドキュメントの場合は「aggregate」(デフォルト)、構造化されたページデータの場合は「pages」
  • maxDepth (オプション):クロールするページの最大深度(デフォルト:10)

応答フォーマット

成功応答(集約モード)
{ "status": "ok", "data": "# Page Title\n\nPage content...\n\n---\n\n# Another Page\n\nMore content...", "totalPages": 5, "totalBytes": 25000, "elapsedMs": 1200 }
成功応答(ページモード)
{ "status": "ok", "data": [ { "path": "index", "markdown": "# Home Page\n\nWelcome to the repository." }, { "path": "section/page1", "markdown": "# First Page\n\nThis is the first page content." } ], "totalPages": 2, "totalBytes": 12000, "elapsedMs": 800 }
エラー応答
{ "status": "error", "code": "DOMAIN_NOT_ALLOWED", "message": "Only deepwiki.com domains are allowed" }
部分的な成功応答
{ "status": "partial", "data": "# Page Title\n\nPage content...", "errors": [ { "url": "https://deepwiki.com/user/repo/page2", "reason": "HTTP error: 404" } ], "totalPages": 1, "totalBytes": 5000, "elapsedMs": 950 }

進捗イベント

ツールを使用すると、クロール中に進行状況イベントを受け取ります。

Fetched https://deepwiki.com/user/repo: 12500 bytes in 450ms (status: 200) Fetched https://deepwiki.com/user/repo/page1: 8750 bytes in 320ms (status: 200) Fetched https://deepwiki.com/user/repo/page2: 6200 bytes in 280ms (status: 200)

ローカル開発 - インストール

ローカル使用

{ "mcpServers": { "mcp-deepwiki": { "command": "node", "args": ["./bin/cli.mjs"] } } }

ソースから

# Clone the repository git clone https://github.com/regenrek/mcp-deepwiki.git cd mcp-deepwiki # Install dependencies npm install # Build the package npm run build
直接API呼び出し

HTTP トランスポートの場合、直接 API 呼び出しを行うことができます。

curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -d '{ "id": "req-1", "action": "deepwiki_fetch", "params": { "url": "https://deepwiki.com/user/repo", "mode": "aggregate" } }'

構成

環境変数

  • DEEPWIKI_MAX_CONCURRENCY : 最大同時リクエスト数(デフォルト: 5)
  • DEEPWIKI_REQUEST_TIMEOUT : リクエストタイムアウト(ミリ秒)(デフォルト: 30000)
  • DEEPWIKI_MAX_RETRIES : 失敗したリクエストの最大再試行回数(デフォルト: 3)
  • DEEPWIKI_RETRY_DELAY : 再試行バックオフの基本遅延(ミリ秒)(デフォルト: 250)

これらを設定するには、プロジェクト ルートに.envファイルを作成します。

DEEPWIKI_MAX_CONCURRENCY=10 DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_RETRIES=5 DEEPWIKI_RETRY_DELAY=500

Docker デプロイメント (未テスト)

Docker イメージをビルドして実行します。

# Build the image docker build -t mcp-deepwiki . # Run with stdio transport (for development) docker run -it --rm mcp-deepwiki # Run with HTTP transport (for production) docker run -d -p 3000:3000 mcp-deepwiki --http --port 3000 # Run with environment variables docker run -d -p 3000:3000 \ -e DEEPWIKI_MAX_CONCURRENCY=10 \ -e DEEPWIKI_REQUEST_TIMEOUT=60000 \ mcp-deepwiki --http --port 3000

発達

# Install dependencies pnpm install # Run in development mode with stdio pnpm run dev-stdio # Run tests pnpm test # Run linter pnpm run lint # Build the package pnpm run build

トラブルシューティング

よくある問題

  1. 権限が拒否されました: CLI の実行時に EACCES エラーが発生する場合は、バイナリを実行可能にしてください。
    chmod +x ./node_modules/.bin/mcp-deepwiki
  2. 接続が拒否されました: ポートが使用可能であり、ファイアウォールによってブロックされていないことを確認してください。
    # Check if port is in use lsof -i :3000
  3. タイムアウト エラー: 大規模なリポジトリの場合は、タイムアウトと同時実行性を増やすことを検討してください。
    DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_CONCURRENCY=10 npx mcp-deepwiki

貢献

貢献を歓迎します!詳細はCONTRIBUTING.mdをご覧ください。

ライセンス

マサチューセッツ工科大学

リンク

コース

他のプロジェクトもご覧ください:

  • AIプロンプト- Cursor AI、Cline、Windsurf、Github Copilot向けに厳選されたAIプロンプト
  • codefetch - 簡単なターミナルコマンドでコードを LLM 用の Markdown に変換します
  • aidex AI言語モデルに関する詳細な情報を提供し、開発者がニーズに合った適切なモデルを選択できるように支援するCLIツール。# tool-starter

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Deepwiki ドキュメントを取得して Markdown に変換する MCP サーバー。これにより、ユーザーは deepwiki.com リポジトリからページをクロールし、さまざまな出力形式でアクセスできるようになります。

  1. Features
    1. Usage
      1. Cursor
        1. MCP Tool Integration
        2. Response Format
        3. Progress Events
      2. Local Development - Installation
        1. Local Usage
        2. From Source
      3. Configuration
        1. Environment Variables
      4. Docker Deployment (Untested)
        1. Development
          1. Troubleshooting
            1. Common Issues
          2. Contributing
            1. License
              1. Links
                1. Courses
                  1. See my other projects:

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.
                      Last updated -
                      4
                      146
                      12
                      TypeScript
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Python-based MCP server that crawls websites to extract and save content as markdown files, with features for mapping website structure and links.
                      Last updated -
                      1
                      Python
                      MIT License
                    • -
                      security
                      F
                      license
                      -
                      quality
                      An MCP server that enables searching and retrieving content from Confluence documentation systems, providing capabilities for both document searches and full page content retrieval.
                      Last updated -
                      Python
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A MCP server that allows you to search and retrieve content on any wiki site using MediaWiki with LLMs 🤖. wikipedia.org, fandom.com, wiki.gg and more sites using Mediawiki are supported!
                      Last updated -
                      2
                      1
                      Python

                    View all related MCP servers

                    ID: 083ng0n9r5