ASI.EXPRESSFrom Enterprise.Systems

Hoʻopili i kāu ʻelele

Helu wahi o ka server: https://asi.express/mcp. Lawe ʻikepili: Streamable HTTP (POST, nā pane JSON). ʻAʻohe komo inoa, ʻaʻohe kī.

Kāhea mua: search_capabilities me {"query": "weather", "limit": 3}. Hoʻihoʻi ia i results (he papa inoa a hiki i 3 hiki), count (he helu) a me kekahi laina kūlana. ʻAʻole pono ʻoe e heluhelu mua i nā mea hana ʻē aʻe.

Hoʻāʻo ʻia ma 2026-11-22, ma ka production, me nā mana library i kapa ʻia ma kēlā me kēia māhele.

No nā ʻaoʻao ʻekolu nā mea hana mai nā mea hoʻolako ʻē aʻe: e heluhelu i ka mea a kekahi mea hana e hana ai ma mua o kou ʻae ʻana i kāu ʻelele e hoʻohana iā ia, a mai hoʻonoho i ka "ʻAe mau" no nā mea hana e hana ana i nā hana.

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

Ka hopena i manaʻo ʻia: 11 inoa mea hana, me search_capabilities, a laila he helu a hiki i 3 hopena.

OpenAI Agents SDK (openai-agents 0.25.0)

ʻAʻole pono ke kī OpenAI no ka hoʻopili a me ka helu ʻana i nā mea hana; pono hoʻokahi no ka holo ʻana i kekahi model. Inā hoʻonoho ʻia kekahi kī, hoʻouna ka tracing i ka ʻikepili i kekahi ʻaoʻao ʻekolu: hoʻonoho i OPENAI_AGENTS_DISABLE_TRACING=1 inā ʻaʻole ʻoe makemake i kēlā.

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

No ka hāʻawi ʻana i ka server i kekahi ʻelele: Agent(name="x", mcp_servers=[srv]). ʻAʻole i holo ka hoʻāʻo i kekahi model; ʻo ka hoʻopili, ka papa inoa a me ke kāhea ma luna nā mea i hōʻoia ʻia.

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

ʻElua mau ʻāpana kikokikona o ka pane: ka JSON mua, a laila he laina kūlana. E parse i ka mua wale 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)

Hōʻoia ʻia ma o ka MCP adapter e uhi ʻia e ka MCPServerAdapter ponoʻī o CrewAI. ʻAʻole hiki ke hoʻouka ʻia ʻo crewai_tools ponoʻī ma ka kamepiula hoʻāʻo, no laila ʻaʻole i ʻōlelo ʻia kēlā papa 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))

E nānā ʻaʻole hakahaka ka papa inoa mea hana: lele mālie ʻia ka server i hāʻule.

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

Ke kaʻina i hōʻoia ʻia: initialize, notifications/initialized, tools/list, a laila ke kāhea ma luna. ʻAʻole mālama ka server i ka session, no laila ʻaʻole pono ke header Mcp-Session-Id. ʻAe ʻia nō hoʻi ke kāhea wale; hoʻohui i -m 30 e kaupalena i ke kali ʻana.

Claude Code (claude 2.1.330)

E mālama i kēia ma ke ʻano he faila, e laʻa asi-mcp.json:

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

A laila e hoʻomaka iā Claude Code me claude --mcp-config asi-mcp.json. Hōʻike ʻia ka server asi ma ke ʻano i hoʻopili ʻia, a ʻike ʻia kāna mau mea hana ma ke ʻano ʻo mcp__asi__search_capabilities a pēlā aku.

Ua hoʻāʻo ʻia kēia ʻano ma ka production ma 2026-11-22.

Manaʻo ʻia e hana pū ke komo like i loko o kekahi faila papahana .mcp.json, a i ʻole i hoʻohui ʻia me claude mcp add --transport http asi https://asi.express/mcp (noi ʻo Claude Code iā ʻoe e ʻae i kekahi server papahana). ʻAʻole mākou i hoʻāʻo i kēia mau ʻano ma ka production.

Hoʻohui ʻia nā client ʻē aʻe ma ʻaneʻi ma hope wale nō o ko lākou hala ʻana i kekahi hoʻāʻo ma ka production.