> ## 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 protected Act thread 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 target/capability IDs, `threadId`, revision, and cursor outside the model conversation, and return typed decisions or browser interactions to the application.

[Review LlamaIndex's current MCP documentation](https://docs.llamaindex.ai/en/stable/examples/tools/mcp/) for adapter updates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.