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

AgentScope

Connect AgentScope applications to Data Product MCP with an HTTP client.

Connect Data Product MCP to an AgentScope application with the HttpStatelessClient, so your agent works from governed products instead of guessing.

Prerequisites

Python 3.9 or later, your DataOS instance URL, and a DataOS API token.

Connect

  1. Install AgentScope with the service extra:

pip install agentscope[service]
  1. Register the MCP client, replacing the placeholders:

import asyncio
from agentscope.mcp import HttpStatelessClient
from agentscope.tool import Toolkit

client = HttpStatelessClient(
    name="DataProduct-MCP",
    transport="streamable_http",
    url="https://<instance-url>/dataproduct-mcp/api/v1",
    headers={"apikey": "<API_TOKEN>"},
)

async def main():
    toolkit = Toolkit()
    await toolkit.register_mcp_client(client)
    print(f"Loaded {len(toolkit.get_json_schemas())} tools from DataOS MCP")

asyncio.run(main())

The toolkit holds the registered Data Product MCP tools and their schemas. Pass it to your AgentScope agents as you would any other toolkit.

Verify

Run the script and confirm the toolkit loads Data Product MCP tools. Then ask the agent What data products am I authorized to access?. A working connection returns products scoped to your token.

Last updated

Was this helpful?