For the complete documentation index, see llms.txt. This page is also available as Markdown.

LlamaIndex 集成

將LlamaIndex代理連接到TalorData MCP服務器,即可將實时網絡搜索、抓取和結構化數據檢索添加到您的RAG和索引筦道中。

託管 MCP

1

獲取您的 API 令牌

  • 前往 SERP API-API Token 創建API Token

  • 複製您的 API 令牌(格式如下:sk_7qBRe***************************

2

安裝LlamaIndex MCP工具包

pip install llama-index-tools-mcp

3

配寘您的MCP服務器

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())

4

測試一下是否有效

  • 使用手動工具運行您的LlamaIndex腳本

  • 你應該能在Markdown中看到請求的URL

5

監控使用情况

在 TalorData SERP API-使用記錄 中查看您的 API 使用情况。

最后更新于