Fakafehokotaki hoʻo ʻēsenití
Tuasila ʻo e sēvaá: https://asi.express/mcp. Fetuʻutaki: Streamable HTTP (POST, ngaahi tali JSON). ʻIkai ha hū ki loto, ʻikai ha kī.
Ui ʻuluaki: search_capabilities mo e {"query": "weather", "limit": 3}. ʻOku ne fakafoki mai ʻa e results (ko ha lisi ʻo e ngaahi malava ʻo aʻu ki he 3), count (ko ha fika) mo ha laine tuʻunga. ʻOku ʻikai fie maʻu ke ke lau ʻuluaki ʻa e ngaahi meʻangāue kehé.
Naʻe ʻahiʻahiʻi ʻi he 2026-11-22, ʻi he production, mo e ngaahi paaki library ʻoku fakahingoa ʻi he konga taki taha.
Ko e ngaahi meʻangāue mei he kau tokonaki kehé ʻoku ʻa e kau hono tolu: lau ʻa e meʻa ʻoku fai ʻe ha meʻangāue ki muʻa ke ke tuku ho fakafofonga AI ke ne fakalele ia, pea ʻoua ʻe fokotuʻu ʻa e "Tuku maʻu pē" ki he ngaahi meʻangāue ʻoku nau liliu ha meʻa.
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())Ola ʻoku ʻamanaki ki ai: 11 hingoa meʻangāue, kau ai ʻa e search_capabilities, pea hoko ai ha fika mo e ngaahi ola ʻo aʻu ki he 3.
OpenAI Agents SDK (openai-agents 0.25.0)
ʻOku ʻikai fie maʻu ha kī OpenAI ke fakafehokotaki mo lisi ʻa e ngaahi meʻangāue; ke fakalele ha model ʻoku fie maʻu ha kī. Ka fokotuʻu ha kī, ʻoku ʻave ʻe he tracing ʻa e ngaahi fakamatala ki ha paati hono tolu: fokotuʻu ʻa e OPENAI_AGENTS_DISABLE_TRACING=1 kapau ʻoku ʻikai te ke loto ki ai.
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())Ke ʻoange ʻa e sēvaá ki ha ʻēseniti: Agent(name="x", mcp_servers=[srv]). Naʻe ʻikai fakalele ʻe he ʻahiʻahí ha model; ko e fakafehokotaki, lisi mo e ui ʻi ʻolungá ʻa e meʻa naʻe fakamoʻoniʻi.
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())ʻOku ua ʻa e konga tohi ʻi he talí: ʻuluaki ʻa e JSON, pea hoko ai ha laine tuʻunga. Parse pē ʻa e ʻuluakí.
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)
Fakamoʻoniʻi ʻaki ʻa e MCP adapter ʻoku kofukofuʻi ʻe he MCPServerAdapter pē ʻa CrewAI. Naʻe ʻikai lava ke fakahū ʻa e crewai_tools tonu ki he komipiuta ʻahiʻahí, ko ia ʻoku ʻikai ke fakahaaʻi ai ʻa e kalasi wrapper ko iá.
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))Vakaiʻi ʻoku ʻikai maha ʻa e lisi meʻangāué: ko ha sēvā ʻoku tō ʻoku pasiʻi fakalongolongo.
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}}}'Hokohoko kuo fakamoʻoniʻi: initialize, notifications/initialized, tools/list, pea hoko ai ʻa e ui ʻi ʻolungá. ʻOku ʻikai tauhi ʻe he sēvaá ha session, ko ia ʻoku ʻikai fie maʻu ha header Mcp-Session-Id. ʻOku tali foki mo e ui pē ʻe taha; tānaki ʻa e -m 30 ke fakangatangata ʻa e tatalí.
Claude Code (claude 2.1.330)
Tauhi eni ko ha faile, hangē ko e asi-mcp.json:
{"mcpServers": {"asi": {"type": "http", "url": "https://asi.express/mcp"}}}Pea kamata ʻa Claude Code ʻaki ʻa e claude --mcp-config asi-mcp.json. ʻOku hā ʻa e sēvā asi kuo fakafehokotaki, pea ʻoku hā hono ngaahi meʻangāué ko e mcp__asi__search_capabilities mo e alā meʻa pehē.
Naʻe ʻahiʻahiʻi ʻa e founga ni ʻi he production ʻi he 2026-11-22.
Ko e hū tatau pē ʻi ha faile poloseki .mcp.json, pe tānaki ʻaki ʻa e claude mcp add --transport http asi https://asi.express/mcp, ʻoku totonu ke ngāue foki (ʻoku kole atu ʻa Claude Code ke ke fakangofua ha sēvā poloseki). Naʻe ʻikai te mau ʻahiʻahiʻi ʻa e ngaahi founga ni ʻi he production.
ʻOku tānaki ʻi heni ʻa e ngaahi client kehe pē hili ʻenau lavaʻi ha ʻahiʻahi ʻi he production.