We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/digital-duck/mcp_demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
{
"cells": [
{
"cell_type": "code",
"execution_count": 13,
"id": "64c33256-22ab-4009-b070-75aa7be36218",
"metadata": {},
"outputs": [],
"source": [
"from fastmcp import Client\n",
"import asyncio"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "4dafae42-876d-49f1-baf3-ad5ee5dc022f",
"metadata": {},
"outputs": [],
"source": [
"async def run_llm_demo(server_path: str = \"mcp_server.py\"):\n",
" async with Client(server_path) as client:\n",
" tools = await client.list_tools()\n",
" print(f\"tools: {tools}\")"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "2553885a-9df9-4bc5-bc0c-503559f6645d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tools: [Tool(name='calculator', description='\\nPerforms arithmetic operations on two numbers.\\nSupports: add, subtract, multiply, divide, power\\n', inputSchema={'properties': {'operation': {'title': 'Operation', 'type': 'string'}, 'num1': {'title': 'Num1', 'type': 'number'}, 'num2': {'title': 'Num2', 'type': 'number'}}, 'required': ['operation', 'num1', 'num2'], 'type': 'object'}, annotations=None), Tool(name='trig', description='\\nPerforms trigonometric operation on an angle in degree.\\nSupports: sine, cosine, tangent\\n', inputSchema={'properties': {'operation': {'title': 'Operation', 'type': 'string'}, 'theta': {'title': 'Theta', 'type': 'number'}}, 'required': ['operation', 'theta'], 'type': 'object'}, annotations=None), Tool(name='stock_quote', description='\\nRetrieves live stock data for a given ticker symbol.\\nExample: AAPL, GOOGL, MSFT, TSLA\\n', inputSchema={'properties': {'ticker': {'title': 'Ticker', 'type': 'string'}}, 'required': ['ticker'], 'type': 'object'}, annotations=None), Tool(name='health', description='\\nSimple health check to verify server is running.\\n', inputSchema={'properties': {}, 'type': 'object'}, annotations=None), Tool(name='echo', description='\\nEcho back the provided message. Useful for testing.\\n', inputSchema={'properties': {'message': {'title': 'Message', 'type': 'string'}}, 'required': ['message'], 'type': 'object'}, annotations=None)]\n"
]
}
],
"source": [
"# In Jupyter, just use await directly:\n",
"await run_llm_demo()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5f746e72-1539-46b5-82ae-3f50ac5c044f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}