अपन एजेंट कनेक्ट करू
सर्वरक पता: 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)
CrewAI क अपन MCPServerAdapter जाहि MCP एडाप्टरकेँ रैप करैत अछि, ताहि द्वारा प्रमाणित। 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 अहाँसँ प्रोजेक्ट सर्वर स्वीकृत करबाक लेल कहैत अछि)। हम सभ ई रूप सभ प्रोडक्शन पर परीक्षण नहि कएने छी।
आन क्लाइंट प्रोडक्शन पर परीक्षण पास कएलाक बादे एतए जोड़ल जाइत अछि।