import asyncio
from fastmcp import Client

# MCPサーバーのURL
endpoint = "http://localhost:8700/mcp"

# MCPクライアントのオブジェクト
mcpclient = Client(endpoint)

async def run_client():
  async with mcpclient:
    # MCPサーバーから関数の一覧を取得する
    tools = await mcpclient.list_tools()
    for tool in tools:
      print(f"関数名:{tool.name}")
      if tool.inputSchema:
        print(f"引数の情報:{tool.inputSchema}")

asyncio.run(run_client())