The Deepwiki MCP Server allows you to fetch and process documentation from Deepwiki repositories, converting them to Markdown format for easy consumption. It offers flexible output options and can be integrated with MCP-compatible clients.
The simplest way to install and use the Deepwiki MCP server is with NPX:
npx -y mcp-deepwiki@latest
To integrate with Cursor, add this to your .cursor/mcp.json
file:
{
"mcpServers": {
"mcp-deepwiki": {
"command": "npx",
"args": ["-y", "mcp-deepwiki@latest"]
}
}
}
If you prefer to install from source:
# Clone the repository
git clone https://github.com/regenrek/deepwiki-mcp.git
cd deepwiki-mcp
# Install dependencies
npm install
# Build the package
npm run build
You can also use Docker to run the server:
# Build the image
docker build -t mcp-deepwiki .
# Run with HTTP transport (for production)
docker run -d -p 3000:3000 mcp-deepwiki --http --port 3000
You can use these prompt formats to fetch documentation:
deepwiki fetch how can i use gpt-image-1 with "vercel ai" sdk
deepwiki fetch how can i create new blocks in shadcn?
To fetch a complete documentation set:
use deepwiki https://deepwiki.com/shadcn-ui/ui
use deepwiki multiple pages https://deepwiki.com/shadcn-ui/ui
For just one page:
use deepwiki fetch single page https://deepwiki.com/tailwindlabs/tailwindcss/2.2-theme-system
You can use repository shorthand notation:
use deepwiki fetch tailwindlabs/tailwindcss
The package registers a tool named deepwiki_fetch
that can be used with any MCP-compatible client:
{
"action": "deepwiki_fetch",
"params": {
"url": "https://deepwiki.com/user/repo",
"mode": "aggregate",
"maxDepth": "1"
}
}
url
(required): The starting URL of the Deepwiki repositorymode
(optional): Output mode, either "aggregate" for a single Markdown document (default) or "pages" for structured page datamaxDepth
(optional): Maximum depth of pages to crawl (default: 10)For HTTP transport, you can make direct API calls:
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"
}
}'
You can customize the server behavior with these environment variables:
DEEPWIKI_MAX_CONCURRENCY
: Maximum concurrent requests (default: 5)DEEPWIKI_REQUEST_TIMEOUT
: Request timeout in milliseconds (default: 30000)DEEPWIKI_MAX_RETRIES
: Maximum retry attempts for failed requests (default: 3)DEEPWIKI_RETRY_DELAY
: Base delay for retry backoff in milliseconds (default: 250)Create a .env
file in the project root to set these values:
DEEPWIKI_MAX_CONCURRENCY=10
DEEPWIKI_REQUEST_TIMEOUT=60000
DEEPWIKI_MAX_RETRIES=5
DEEPWIKI_RETRY_DELAY=500
Permission Denied: If you get EACCES errors when running the CLI, make the binary executable:
chmod +x ./node_modules/.bin/mcp-deepwiki
Connection Refused: Check if the port is available and not blocked by a firewall:
# Check if port is in use
lsof -i :3000
Timeout Errors: For large repositories, increase the timeout and concurrency:
DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_CONCURRENCY=10 npx mcp-deepwiki
This server is currently not working since DeepWiki has restricted scraping. It's recommended to use the official DeepWiki MCP server at https://docs.devin.ai/work-with-devin/deepwiki-mcp for the time being.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-deepwiki" '{"command":"npx","args":["-y","mcp-deepwiki@latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-deepwiki": {
"command": "npx",
"args": [
"-y",
"mcp-deepwiki@latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-deepwiki": {
"command": "npx",
"args": [
"-y",
"mcp-deepwiki@latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect