Skip to main content
Glama

MCP Boilerplate Server

by shazaaly
client.py946 B
import asyncio from fastmcp import Client async def test_server(): client = Client("server.py") async with client: # Test greeting tool result = await client.call_tool("greet", {"name": "World"}) print("Greet result:", result) # Test math tools add_result = await client.call_tool("add", {"a": 5, "b": 3}) print("Add result:", add_result) multiply_result = await client.call_tool("multiply", {"a": 4, "b": 7}) print("Multiply result:", multiply_result) # Test user info tool user_result = await client.call_tool("get_user_info", {"user_id": 1}) print("User info result:", user_result) # Test non-existent user missing_user = await client.call_tool("get_user_info", {"user_id": 99}) print("Missing user result:", missing_user) if __name__ == "__main__": asyncio.run(test_server())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shazaaly/mcp-boilerplate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server