> ## Documentation Index
> Fetch the complete documentation index at: https://darwin.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LlamaIndex

> Use Darwin as an executable capability source in a LlamaIndex agent.

Use LlamaIndex's MCP tool adapter to discover Darwin's current tools at runtime. Darwin Search finds capabilities that can perform work; your LlamaIndex retrieval layer still owns document retrieval and citations.

## Get started

```bash theme={null}
pip install llama-index-tools-mcp
```

```python theme={null}
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec

client = BasicMCPClient("https://mcp.darwin.so/mcp")
spec = McpToolSpec(client=client)
darwin_tools = await spec.to_tool_list_async()
```

Pass `darwin_tools` to the agent or workflow that needs Darwin. Complete OAuth through the MCP transport before exposing Action tools.

## Try it

```text theme={null}
Search Darwin for a capability that can extract text from a PDF. Show the exact
capability ID and revision, and do not start an Action.
```

## Retrieval versus capability discovery

| Question                       | Best source                                  |
| ------------------------------ | -------------------------------------------- |
| “What do these documents say?” | Your LlamaIndex retrieval and citation layer |
| “What can perform this work?”  | Darwin Search                                |
| “Run the option I selected.”   | Darwin Act                                   |

Keep citations, capability evidence, and execution state labeled separately. Persist the selected revision and `actionId` outside the model conversation, and return typed approval or browser interactions to the application.

[View the complete Darwin recipe](https://github.com/darwin-studios/darwin-integrations/blob/main/frameworks/llamaindex.md) or LlamaIndex's [current MCP documentation](https://docs.llamaindex.ai/en/stable/examples/tools/mcp/).
