> For the complete documentation index, see [llms.txt](https://docs.talordata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talordata.com/serp-api/integration/mcp-integration/llamaindex-integration.md).

# LlamaIndex Integration

Connect LlamaIndex agents to the TalorData MCP server to add real-time web search, scraping, and structured data retrieval to your RAG and indexing pipelines.

### Hosted MCP

{% stepper %}
{% step %}

#### Get your API token

* Go to [SERP API-API Token](https://dashboard.talordata.com/scraping/serp-api/api-token/) to create an API Token;
* Copy your API Token (format as: `sk_7qBRe***************************`）
  {% endstep %}

{% step %}

#### Install the LlamaIndex MCP toolkit

```
pip install llama-index-tools-mcp
```

{% endstep %}

{% step %}

#### Configure your MCP server

```
import asyncio
from llama_index.tools.mcp import BasicMCPClient

async def main():
    http_client = BasicMCPClient("https://mcp.talordata.com/API_TOKEN/mcp")

    # List tools
    tools = await http_client.list_tools()
    print("Tools:", tools)

    # Call a tool
    result = await http_client.call_tool("scrape_as_markdown", {"url":"https://docs.llamaindex.ai/en/stable/examples/tools/mcp/"})
    print("Result:", result)

asyncio.run(main())

```

{% endstep %}

{% step %}

#### Test to see if it works.&#xD;

* Run your LlamaIndex script using the manual tool.
* You should be able to see the requested URL in Markdown.

{% endstep %}

{% step %}

#### Monitor usage

View your API usage in the [TalorData SERP API usage logs](https://dashboard.talordata.com/scraping/serp-api/history).

{% endstep %}
{% endstepper %}
