エージェントを接続する
サーバーアドレス: https://asi.express/mcp。トランスポート: Streamable HTTP(POST、JSON で応答)。サインイン不要、キー不要。
最初の呼び出し: search_capabilities を {"query": "weather", "limit": 3} で呼び出します。results(最大 3 件の機能のリスト)、count(数値)、およびステータス行が返されます。先にほかのツールを読む必要はありません。
2026-11-22 に本番環境で、各セクションに記載したライブラリのバージョンを使ってテストしました。
他の提供元のツールはサードパーティ製です。エージェントにツールを実行させる前に、そのツールが何をするかを読んで確認してください。また、操作を実行するツールには「常に許可」を設定しないでください。
Python, MCP SDK (mcp 1.30.0)
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client("https://asi.express/mcp") as (r, w, _):
async with ClientSession(r, w) as s:
await s.initialize()
print([t.name for t in (await s.list_tools()).tools])
res = await s.call_tool("search_capabilities", {"query": "weather", "limit": 3})
print(res.structuredContent["count"], len(res.structuredContent["results"]))
asyncio.run(main())期待される結果: search_capabilities を含む 11 個のツール名、続いて件数と最大 3 件の結果。
OpenAI Agents SDK (openai-agents 0.25.0)
接続とツール一覧の取得に OpenAI のキーは不要ですが、モデルの実行には必要です。キーが設定されていると、トレーシングによってデータが第三者に送信されます。それを望まない場合は OPENAI_AGENTS_DISABLE_TRACING=1 を設定してください。
import asyncio
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(name="asi", params={"url": "https://asi.express/mcp"},
cache_tools_list=True, client_session_timeout_seconds=30) as srv:
print([t.name for t in await srv.list_tools()])
res = await srv.call_tool("search_capabilities", {"query": "weather", "limit": 3})
print(res.structuredContent["count"])
asyncio.run(main())サーバーをエージェントに渡すには: Agent(name="x", mcp_servers=[srv])。テストではモデルを実行していません。実証されたのは上記の接続、一覧取得、呼び出しです。
LangChain / LangGraph (langchain-mcp-adapters 0.3.2)
import asyncio, json
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_mcp_adapters.tools import load_mcp_tools
async def main():
client = MultiServerMCPClient({"asi": {"transport": "streamable_http", "url": "https://asi.express/mcp"}})
async with client.session("asi") as s:
tools = await load_mcp_tools(s)
tool = [t for t in tools if t.name == "search_capabilities"][0]
out = await tool.ainvoke({"query": "weather", "limit": 3})
text = out[0]["text"] if isinstance(out, list) else out # the JSON is the FIRST text item; a status line follows
print(json.loads(text)["count"])
asyncio.run(main())応答には二つのテキスト項目があります。最初が JSON、次がステータス行です。最初の項目だけをパースしてください。
LlamaIndex (llama-index-tools-mcp 0.4.8)
import asyncio
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
async def main():
client = BasicMCPClient("https://asi.express/mcp") # a URL ending /mcp = Streamable HTTP
tools = await McpToolSpec(client=client, allowed_tools=["search_capabilities"]).to_tool_list_async()
res = await client.call_tool("search_capabilities", {"query": "weather", "limit": 3})
print(res.structuredContent["count"])
asyncio.run(main())CrewAI (crewai 1.6.1 with mcpadapt 0.1.20)
CrewAI 自身の MCPServerAdapter がラップしている MCP アダプターを通じて実証しました。crewai_tools 自体はテスト用コンピューターで読み込めなかったため、そのラッパークラスについては何も主張しません。
from mcpadapt.core import MCPAdapt
from mcpadapt.crewai_adapter import CrewAIAdapter
with MCPAdapt({"url": "https://asi.express/mcp", "transport": "streamable-http"}, CrewAIAdapter(), 30) as tools:
print([t.name for t in tools]) # check the list is not empty: a failed server is skipped quietly
search = [t for t in tools if t.name.endswith("search_capabilities")][0]
print(search.run(query="weather", limit=3))ツール一覧が空でないことを確認してください。失敗したサーバーは通知なしでスキップされます。
Plain HTTP (curl)
curl -sS -X POST https://asi.express/mcp \
-H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_capabilities","arguments":{"query":"weather","limit":3}}}'実証済みの手順: initialize, notifications/initialized, tools/list、その後に上記の呼び出し。サーバーはセッションを保持しないため、Mcp-Session-Id ヘッダーは不要です。呼び出し単独でも受け付けられます。待ち時間を制限するには -m 30 を追加してください。
Claude Code (claude 2.1.330)
これをファイル(例: asi-mcp.json)として保存します:
{"mcpServers": {"asi": {"type": "http", "url": "https://asi.express/mcp"}}}次に claude --mcp-config asi-mcp.json で Claude Code を起動します。asi サーバーが接続済みとして表示され、そのツールは mcp__asi__search_capabilities などとして表示されます。
この形式は 2026-11-22 に本番環境でテストしました。
同じエントリをプロジェクトの .mcp.json ファイルに記述するか、claude mcp add --transport http asi https://asi.express/mcp で追加しても動作するはずです(Claude Code がプロジェクトサーバーの承認を求めます)。これらの形式は本番環境ではテストしていません。
その他のクライアントは、本番環境でのテストに合格した後にのみここに追加されます。