We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kLabUM/SWMM-MCP-PUB'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test.py•786 B
"""
Framework for testing endpoints during development.
"""
from fastmcp import Client
import asyncio
from server import mcp
import pprint
# ========= CONFIG ===========
tool_name = "list_models"
tool_parameters = {
}
# ============================
async def main():
global tool_name, tool_parameters
async with Client(mcp) as client:
result = await client.call_tool(tool_name, tool_parameters)
if result:
if result.data:
pprint.pprint(result.data)
elif result.content:
pprint.pprint(result.content)
else:
pprint.pprint(result)
return result
print("Nothing returned from tool.")
return None
if __name__ == "__main__":
asyncio.run(main())