ASI.EXPRESSFrom Enterprise.Systems

連接您的 agent

伺服器位址:https://asi.express/mcp。傳輸方式:Streamable HTTP(POST,JSON 回應)。無需登入,無需金鑰。

第一次呼叫:search_capabilities,參數為 {"query": "weather", "limit": 3}。它會回傳 results(最多 3 項功能的清單)、count(一個數字)以及一行狀態訊息。您不需要先閱讀其他工具。

已於 2026-11-22 在正式環境(production)上測試,使用各節中註明的函式庫版本。

來自其他供應商的工具屬於第三方:在讓你的代理程式執行某個工具之前,先閱讀它會做什麼;對於會執行動作的工具,請勿設定「一律允許」。

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

預期結果: 11 個工具名稱,包括 search_capabilities,接著是一個計數及最多 3 筆結果。

OpenAI Agents SDK (openai-agents 0.25.0)

連接及列出工具不需要 OpenAI 金鑰;執行模型則需要。設定金鑰後,tracing 會將資料傳送給第三方:若您不希望如此,請設定 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: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 adapter 驗證。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 會要求您核准專案伺服器)。我們尚未在正式環境上測試這些形式。

其他用戶端只有在通過正式環境上的測試後才會加入此處。