ASI.EXPRESSFrom Enterprise.Systems

Kết nối agent của bạn

Địa chỉ máy chủ: https://asi.express/mcp. Giao thức truyền tải: Streamable HTTP (POST, phản hồi dạng JSON). Không cần đăng nhập, không cần khóa.

Lệnh gọi đầu tiên: search_capabilities với {"query": "weather", "limit": 3}. Lệnh này trả về results (danh sách tối đa 3 khả năng), count (một số) và một dòng trạng thái. Bạn không cần đọc các công cụ khác trước.

Đã kiểm thử ngày 2026-11-22, trên môi trường production, với các phiên bản thư viện được nêu trong từng phần.

Công cụ từ các nhà cung cấp khác là của bên thứ ba: hãy đọc xem một công cụ làm gì trước khi cho phép tác tử của bạn chạy nó, và đừng đặt "Luôn cho phép" cho các công cụ thực hiện hành động.

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

Kết quả mong đợi: 11 tên công cụ, trong đó có search_capabilities, sau đó là một số đếm và tối đa 3 kết quả.

OpenAI Agents SDK (openai-agents 0.25.0)

Không cần khóa OpenAI để kết nối và liệt kê công cụ; chạy một mô hình thì cần. Khi đã đặt khóa, tracing sẽ gửi dữ liệu cho bên thứ ba: hãy đặt OPENAI_AGENTS_DISABLE_TRACING=1 nếu bạn không muốn điều đó.

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

Để giao máy chủ cho một agent: Agent(name="x", mcp_servers=[srv]). Bài kiểm thử không chạy mô hình; những gì đã được chứng minh là việc kết nối, liệt kê và lệnh gọi ở trên.

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

Phản hồi có hai mục văn bản: JSON trước, sau đó là một dòng trạng thái. Chỉ parse mục đầu tiên.

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)

Đã được chứng minh qua MCP adapter mà MCPServerAdapter của chính CrewAI bao bọc. Bản thân crewai_tools không tải được trên máy kiểm thử, nên không khẳng định gì về lớp wrapper đó.

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

Hãy kiểm tra để đảm bảo danh sách công cụ không trống: máy chủ bị lỗi sẽ bị bỏ qua mà không báo.

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}}}'

Trình tự đã được chứng minh: initialize, notifications/initialized, tools/list, sau đó là lệnh gọi ở trên. Máy chủ không lưu phiên, nên không cần header Mcp-Session-Id. Chỉ gửi riêng lệnh gọi cũng được chấp nhận; thêm -m 30 để giới hạn thời gian chờ.

Claude Code (claude 2.1.330)

Lưu nội dung này thành một tệp, ví dụ asi-mcp.json:

{"mcpServers": {"asi": {"type": "http", "url": "https://asi.express/mcp"}}}

Sau đó khởi động Claude Code bằng claude --mcp-config asi-mcp.json. Máy chủ asi hiển thị là đã kết nối, và các công cụ của nó xuất hiện dưới dạng mcp__asi__search_capabilities, v.v.

Cách này đã được kiểm thử trên production ngày 2026-11-22.

Cùng mục đó trong tệp .mcp.json của dự án, hoặc được thêm bằng claude mcp add --transport http asi https://asi.express/mcp, dự kiến cũng hoạt động (Claude Code yêu cầu bạn phê duyệt máy chủ của dự án). Chúng tôi chưa kiểm thử các cách này trên production.

Các client khác chỉ được thêm vào đây sau khi vượt qua bài kiểm thử trên production.