इंस्टॉलेशन
API कुंजी
सर्वर बनाएँ
http://127.0.0.1:8000/mcp पर स्टार्ट हो जाता है।
Client के साथ परीक्षण करें
डिप्लॉय
डिप्लॉयमेंट गाइड
स्क्रीनशॉट्स के साथ चरण-दर-चरण डिप्लॉयमेंट वॉकथ्रू।
5 मिनट में MCP सर्वर तैयार करें और परिनियोजित करें।
pip install dedalus-mcp dedalus-labs
export DEDALUS_API_KEY="your-api-key"
# server.py
from dedalus_mcp import MCPServer, tool
@tool(description="Add two numbers")
def add(a: int, b: int) -> int:
return a + b
@tool(description="दो संख्याएँ गुणा करें")
def multiply(a: int, b: int) -> int:
return a * b
server = MCPServer("calculator")
server.collect(add, multiply)
if __name__ == "__main__":
import asyncio
asyncio.run(server.serve())
python server.py
http://127.0.0.1:8000/mcp पर स्टार्ट हो जाता है।
# client.py
from dedalus_mcp.client import MCPClient
import asyncio
async def main():
client = await MCPClient.connect("http://127.0.0.1:8000/mcp")
# उपलब्ध tools की सूची बनाएं
tools = await client.list_tools()
print([t.name for t in tools.tools]) # ['add', 'multiply']
# एक tool को कॉल करें
result = await client.call_tool("add", {"a": 2, "b": 3})
print(result.content[0].text) # "5"
await client.close()
asyncio.run(main())
वाज़ दिस पेज हेल्पफुल