Quick Start: Fetching Your First Document
This guide will walk you through a basic example of using the deepwiki_fetch
tool to retrieve documentation as Markdown. This assumes you have already set up the server as described in the Installation guide.
Goal
Our goal is to fetch the main documentation page for the shadcn-ui/ui
library from Deepwiki and receive it as a single, clean Markdown document.
Example Command
Within a client that supports MCP, like Cursor, you can invoke the tool with a simple prompt. The tool is designed to understand natural language and shorthand repository names.
Here is a typical prompt you could use:
deepwiki fetch shadcn-ui/ui
This command triggers the deepwiki_fetch
tool and passes shadcn-ui/ui
to the url
parameter.
Under the Hood: The MCP Call
The prompt above translates into the following MCP tool call:
{
"action": "deepwiki_fetch",
"params": {
"url": "https://deepwiki.com/shadcn-ui/ui",
"mode": "aggregate",
"maxDepth": 1
}
}
url
: The tool automatically resolvesshadcn-ui/ui
into the full Deepwiki URL.mode
: By default, the mode isaggregate
, which means all crawled pages will be combined into a single Markdown output, separated by---
.maxDepth
: The default crawl depth is sufficient to get linked pages from the main entry point.
Expected Output
The server will crawl the page, sanitize the HTML, convert it to Markdown, and return a response. In aggregate
mode, the successful response is a single string containing the content.
Here is a snippet of what you might expect:
## shadcn-ui/ui
This is a collection of re-usable components that you can copy and paste into your apps.
**What do you mean by copy and paste?**
I mean you literally copy and paste the code into your project and customize to your needs. The code is yours.
*Use this as a reference to build your own component libraries.*
### Components
- Accordion
- Alert
- AlertDialog
- AspectRatio
- ... and more
---
## Accordion
A vertically stacking set of interactive headings that each reveal a section of content.
### Installation
```bash
npx shadcn-ui@latest add accordion
```
### Usage
```tsx
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"
<Accordion type="single" collapsible>
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>
Yes. It adheres to the WAI-ARIA design pattern.
</AccordionContent>
</AccordionItem>
</Accordion>
```
This demonstrates how the tool fetches the main page and a linked component page, then combines them into one document for easy consumption by an AI model.