ASI.EXPRESSFrom Enterprise.Systems

پنهنجي ايجنٽ کي ڳنڍيو

سرور جو پتو: https://asi.express/mcp. ٽرانسپورٽ: Streamable HTTP (POST، JSON جواب). نه سائن ان، نه ڪا ڪنجي.

پهرين ڪال: {"query": "weather", "limit": 3} سان search_capabilities. اها 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 ڪنجي جي ضرورت ناهي؛ ماڊل هلائڻ لاءِ ان جي ضرورت آهي. جڏهن ڪنجي سيٽ هجي، 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(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)

ان MCP اڊاپٽر ذريعي ثابت ڪيو ويو جنهن کي CrewAI جو پنهنجو MCPServerAdapter ريپ ڪري ٿو. 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 Code کي claude --mcp-config asi-mcp.json سان شروع ڪريو. asi سرور ڳنڍيل ڏيکاري ٿو، ۽ ان جا ٽول mcp__asi__search_capabilities وغيره طور ظاهر ٿين ٿا.

هي روپ 2026-11-22 تي پروڊڪشن تي ٽيسٽ ڪيو ويو.

ساڳي داخلا پروجيڪٽ جي .mcp.json فائل ۾، يا claude mcp add --transport http asi https://asi.express/mcp سان شامل ڪرڻ تي به ڪم ڪرڻ گهرجي (Claude Code توهان کان پروجيڪٽ سرور منظور ڪرڻ لاءِ پڇي ٿو). اسان اهي روپ پروڊڪشن تي ٽيسٽ نه ڪيا آهن.

ٻيا ڪلائنٽ صرف پروڊڪشن تي ٽيسٽ پاس ڪرڻ کان پوءِ هتي شامل ڪيا ويندا آهن.