Skip to main content
Glama
LoganZechella

MCP DeepWiki Server

MCP DeepWiki Server - Production Ready

A fully functional Model Context Protocol (MCP) server for DeepWiki integration with real GitHub search capabilities. This server provides comprehensive repository search and documentation fetching optimized for Claude Desktop.

🚀 Key Features

Real Repository Search

  • GitHub Integration: Uses GitHub's search API for real repository results

  • Advanced Filtering: Search by language, topics, stars, and more

  • Rich Metadata: Comprehensive repository information including stars, forks, license, topics

  • Rate Limiting: Intelligent handling of GitHub API limits with token support

DeepWiki Documentation Fetching

  • Multi-mode Content: Aggregate, pages, and structured content retrieval

  • Loading Detection: Automatically detects and retries when content is still generating

  • Content Validation: Ensures substantial content before returning results

  • Fallback Mechanisms: GitHub API fallback when DeepWiki is unavailable

Claude Desktop Optimized

  • 45-second timeout (configurable via MCP_TIMEOUT)

  • Content size limits (500KB max for Claude Desktop compatibility)

  • Exponential backoff retry mechanism

  • Progress reporting for long-running operations

Related MCP server: GitHub MCP Server

Installation & Setup

Prerequisites

  • Node.js 18+

  • GitHub Personal Access Token (for search functionality)

1. Clone and Install

git clone <repository-url>
cd mcp-deepwiki-server
npm install
npm run build

2. Environment Configuration

# Copy example environment file
cp .env.example .env

# Edit .env and add your GitHub token
GITHUB_TOKEN=your_github_personal_access_token_here

Get GitHub Token:

  1. Go to https://github.com/settings/tokens

  2. Click "Generate new token (classic)"

  3. Select scope: public_repo (for public repositories)

  4. Copy the generated token to your .env file

3. Claude Desktop Configuration

Add to your Claude Desktop config file:

{
  "mcpServers": {
    "deepwiki": {
      "command": "node",
      "args": [
        "/path/to/mcp-deepwiki-server/dist/index.js"
      ],
      "env": {
        "GITHUB_TOKEN": "your_github_token_here",
        "MCP_TIMEOUT": "45000",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Usage Examples

Search for Python machine learning repositories with the deepwiki_search tool

Example Result:

  • Real repositories like scikit-learn/scikit-learn, tensorflow/tensorflow

  • Rich metadata: stars, forks, topics, license information

  • DeepWiki URLs for documentation access

Documentation Fetching

Use deepwiki_fetch to get comprehensive documentation for facebook/react

AI-Powered Summaries

Generate a technical summary of the numpy documentation using deepwiki_summarize

API Reference

Search for GitHub repositories with DeepWiki documentation.

Parameters:

  • query (string, required): Search query

  • language (string, optional): Filter by programming language

  • topics (array, optional): Filter by repository topics

  • limit (number, optional): Maximum results (default: 10, max: 50)

Example:

{
  "name": "deepwiki_search",
  "arguments": {
    "query": "web framework",
    "language": "JavaScript",
    "topics": ["react", "frontend"],
    "limit": 5
  }
}

deepwiki_fetch

Retrieve repository documentation from DeepWiki.

Parameters:

  • url (string, required): DeepWiki URL or owner/repo format

  • mode (enum, optional): 'aggregate', 'pages', or 'structured'

  • maxDepth (number, optional): Maximum crawling depth

  • includeMetadata (boolean, optional): Include repository metadata

  • contentFilter (enum, optional): 'all', 'documentation', 'code', 'examples'

deepwiki_summarize

Generate AI-powered summaries of repository documentation.

Parameters:

  • url (string, required): Repository URL

  • summaryType (enum, optional): 'overview', 'technical', 'quickstart', 'api'

  • maxLength (number, optional): Maximum summary length in words

Rate Limits & Performance

GitHub API Limits

  • Without Token: 60 requests/hour

  • With Token: 5,000 requests/hour

  • Automatic Handling: Exponential backoff and meaningful error messages

Performance Optimization

  • Content Caching: Reduces API calls for repeated requests

  • Size Limits: 500KB max content for Claude Desktop compatibility

  • Timeout Management: 45-second default timeout with configurable limits

Testing

Run All Tests

npm test

Unit Tests Only

npm run test:unit

Integration Tests (requires GitHub token)

GITHUB_TOKEN=your_token npm run test:integration

Test Coverage

npm run test:coverage

Troubleshooting

Common Issues

"Repository search failed" Error

  • Cause: Missing or invalid GitHub token

  • Solution: Add valid GITHUB_TOKEN to environment variables

  • Check: Verify token has public_repo scope

"GitHub API rate limit exceeded"

  • Cause: Too many requests without token or token quota exhausted

  • Solution: Add GitHub token or wait for rate limit reset

  • Prevention: Use caching and avoid rapid successive requests

"No repositories found"

  • Cause: Search query too specific or no matching repositories

  • Solution: Try broader search terms or remove filters

"DeepWiki content not ready"

  • Cause: Repository documentation still being generated

  • Solution: Wait a few minutes and retry, or use GitHub fallback

Debug Mode

LOG_LEVEL=debug npm start

Health Check

# Test basic functionality
npm run test:unit

# Test GitHub integration
GITHUB_TOKEN=your_token npm run test:integration

Architecture

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   Claude        │    │  MCP DeepWiki    │    │   GitHub API    │
│   Desktop       │◄──►│  Server          │◄──►│   (Search)      │
│                 │    │                  │    │                 │
└─────────────────┘    └──────────────────┘    └─────────────────┘
                                │
                                ▼
                       ┌─────────────────┐
                       │   DeepWiki      │
                       │ (Documentation) │
                       └─────────────────┘

Development

Setup Development Environment

# Install dependencies
npm install

# Run in development mode
npm run dev

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

Build for Production

npm run build
npm start

Environment Variables

Variable

Required

Description

GITHUB_TOKEN

Yes

GitHub Personal Access Token for search

MCP_TIMEOUT

No

Request timeout in milliseconds (default: 45000)

LOG_LEVEL

No

Logging level: error, warn, info, debug

SEARCH_MAX_RESULTS

No

Maximum search results per query (default: 50)

REQUEST_TIMEOUT

No

HTTP request timeout (default: 30000)

Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature/your-feature

  3. Make your changes

  4. Run tests: npm test

  5. Commit changes: git commit -am 'Add your feature'

  6. Push to branch: git push origin feature/your-feature

  7. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

  • Documentation: Check this README and inline code comments

  • Issues: Open an issue on GitHub with detailed error messages

  • Testing: Use npm run test:unit for quick validation

  • Logs: Set LOG_LEVEL=debug for detailed debugging information

Available Tools

3 tools
deepwiki_fetchDeepWiki Documentation FetcherC

Retrieves GitHub repository documentation from DeepWiki with enhanced content organization and filtering capabilities.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentFilterNoFilter content by type (default: 'all')
includeMetadataNoInclude repository metadata in output (default: false)
maxDepthNoMaximum depth for crawling pages (default: 10)
modeNoOutput mode: 'aggregate' (combined content), 'pages' (JSON list), 'structured' (organized by content type)
urlYesDeepWiki URL or GitHub repository identifier (e.g., 'https://deepwiki.com/owner/repo' or 'owner/repo')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'enhanced content organization and filtering capabilities' but lacks details on critical behaviors such as rate limits, authentication requirements, error handling, or what 'enhanced' entails. For a tool with 5 parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and waste, though it could be slightly more structured by explicitly separating purpose from capabilities. Overall, it's appropriately concise for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain the return format, error conditions, or how 'enhanced' features work, leaving gaps for the agent. With no output schema and minimal behavioral context, it fails to provide sufficient information for reliable tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, providing detailed descriptions for all parameters. The description adds minimal value beyond the schema, mentioning 'filtering capabilities' which loosely relates to parameters like contentFilter and mode, but doesn't elaborate on their semantics or interactions. Baseline 3 is appropriate as the schema handles most documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Retrieves') and resource ('GitHub repository documentation from DeepWiki'), and mentions enhanced capabilities. However, it doesn't explicitly differentiate from sibling tools like deepwiki_search or deepwiki_summarize, which likely have different retrieval or processing approaches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (deepwiki_search, deepwiki_summarize). It mentions 'enhanced content organization and filtering capabilities' but doesn't specify what makes it preferable or when alternatives should be considered, leaving the agent without clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

deepwiki_summarizeDeepWiki Documentation SummarizerB

Generates AI-powered summaries of GitHub repository documentation with different focus types (overview, technical, quickstart, api).

ParametersJSON Schema
NameRequiredDescriptionDefault
maxLengthNoMaximum length of summary in words (default: 1000)
summaryTypeNoType of summary: overview (default), technical, quickstart, or api
urlYesDeepWiki URL or GitHub repository identifier (e.g., 'https://deepwiki.com/owner/repo' or 'owner/repo')

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions AI-powered summarization but does not disclose details like rate limits, authentication needs, output format, or error handling. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and key features (AI-powered summaries, focus types). Every word earns its place with no redundancy or unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of AI-powered summarization, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., processing time, limitations), output format, and error cases, making it inadequate for a tool with three parameters and no structured support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents parameters like 'url', 'summaryType', and 'maxLength'. The description adds minimal value by mentioning 'different focus types' which aligns with the 'summaryType' enum, but does not provide additional semantics beyond what the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generates AI-powered summaries'), resource ('GitHub repository documentation'), and scope ('with different focus types'), distinguishing it from siblings like 'deepwiki_fetch' and 'deepwiki_search' which likely retrieve or search documentation rather than summarize it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for summarizing documentation with specific focus types but does not explicitly state when to use this tool versus alternatives like 'deepwiki_fetch' or 'deepwiki_search', nor does it mention prerequisites or exclusions. The context is clear but lacks explicit guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: fetch retrieves documentation, search finds repositories, and summarize generates AI summaries. There is no overlap in functionality, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent 'deepwiki_' prefix with descriptive action suffixes (fetch, search, summarize). This uniform naming pattern enhances predictability and readability.

Tool Count4/5

Three tools is appropriate for a focused documentation server, covering core operations. It might be slightly lean, but each tool serves a distinct, valuable purpose without redundancy.

Completeness4/5

The tools cover key workflows: searching for repositories, fetching documentation, and summarizing content. Minor gaps may exist, such as advanced filtering or update operations, but the core domain is well-covered for typical agent tasks.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LoganZechella/mcp-deepwiki-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server